什么是Webprofile有用? [英] What is Webprofile useful for?
问题描述
我偶然发现了这个项目的 ASP.NET WebProfile发电机
I stumbled upon this project ASP.NET WebProfile Generator
为什么我需要代理类访问配置文件?
Why would I need proxy class to access profile?
推荐答案
由于ASP.NET只支持配置文件外的开箱即用的网站选项。如果您正在使用Web应用程序项目(WAP),那么你必须推出自己的。
Because ASP.NET only supports Profiles out-of-the-box with the Web Site option. If you are using a Web Application Project (WAP), then you have to roll your own.
问题来源于这样的事实是,Web应用程序项目不具备Profile对象自动添加到每一个页面的网站项目,所以我们不能让在我们的网站定义配置文件属性强类型的编程访问。配置文件。
The problem stems from the fact that the Web Application Project does not have the Profile object automatically added to each page as with the Web Site project, so we cannot get strongly-typed programmatic access to the profile properties defined in our web.config file.
好消息是,这是非常可行的:
Good news is that it's very doable:
- 的 ASP.NET:网站与Web应用程序项目
- 如何将登录,角色和配置文件系统添加到ASP.NET 2.0应用程序中只有24行code 的
- Web Profile的构建器
- 网络配置文件生成器Web应用程序项目
- 编写自定义ASP.NET Profile类
- ASP.NET配置文件中的Web应用程序项目
- ASP.NET: Web Site versus Web Application Project
- How to add a Login, Roles and Profile system to an ASP.NET 2.0 app in only 24 lines of code
- Web Profile Builder
- Web Profile Builder for Web Application Projects
- Writing a custom ASP.NET Profile class
- ASP.NET Profiles in Web Application Projects
这篇关于什么是Webprofile有用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!