tags:

views:

376

answers:

2

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.

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

+3  A: 

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

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.

source: MSDN Build Provider documentation

Jon Galloway
+3  A: 

Actually, Microsoft does have a solution for this known issue. It's the "Web Profiler Builder". I used it for my Web App and it works great. http://code.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980

nandos