为什么配置文件提供者没有内置Web应用程序? [英] Why was the Profile provider not built into Web Apps?

查看:84
本文介绍了为什么配置文件提供者没有内置Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您创建了一个ASP.NET Web文件的项目,你必须在web.config文件中的配置文件信息的直接访问。如果转换为Web应用程序,并已使用的ProfileCommon等等,那么你必须通过一大堆箍跳,让您的web应用程序的工作。

If you create an ASP.NET web file project you have direct access to the Profile information in the web.config file. If you convert that to a Web App and have been using ProfileCommon etc. then you have to jump through a whole bunch of hoops to get your web app to work.

为什么没有配置文件提供内置的ASP.NET Web应用程序项目,就像是与Web文件的项目?

Why wasn't the Profile provider built into the ASP.NET web app projects like it was with the web file projects?

推荐答案

profile提供使用ASP.NET构建供应商系统,不与Web应用程序项目工作。

The profile provider uses the ASP.NET Build Provider system, which doesn't work with Web Application Projects.

添加自定义BuildProvider
  类Web.config文件中工作
  ASP.NET网站,但不工作
  在ASP.NET Web应用程序项目。
  在Web应用程序项目中,code
  由该BuildProvider生成
  类不能被包括在
  应用程序。

Adding a customized BuildProvider class to the Web.config file works in an ASP.NET Web site but does not work in an ASP.NET Web application project. In a Web application project, the code that is generated by the BuildProvider class cannot be included in the application.

来源: MSDN版本提供文档

这篇关于为什么配置文件提供者没有内置Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆