开发者

unable to change the scope of my settings in .net

开发者 https://www.devze.com 2023-02-24 22:22 出处:网络
can anyone tell me how to change the scope from application to user in .net.. th开发者_开发知识库anksYou set the asp.net-mvc tag so I assume you are creating a web application.

can anyone tell me how to change the scope from application to user in .net.. th开发者_开发知识库anks


You set the asp.net-mvc tag so I assume you are creating a web application.

The scope of settings is actually useful in client application. The application scope settings are stored in the application directory, where the user scope settings are stored in the user profile (in order to allow a non-admin user to change them). As it is in the user profile, each users can have a separate settings file. All of this is handled by the configuration framework.

In web apps, it's completely different. The configuration framework, whichever user is logged in, will use the config in web.config file. If you want to have per-user settings, you will have to manage them yourself. There are OOB classes to manage the profiles : ASP.NET Profile Properties Overview which is good place to start.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号