The Profile Service is not available in code in Page_Load in ASP.NET Web Projects

The profile that is used for the ASP.NET profile service is not available in the page code behind the files, for example, in Page_Load.

It may just be a problem with installing / configuring Visual Studio, but as another problem, classes hosted in App_Code do not appear in page codes. Even when I add a new ASP.NET folder to my project, "App_Code" is not available as an option.

I tested the whole script using ASP.NET Web Project and an empty ASP.NET web project. This issue exists when you create an ASP.NET website.

Environment: Visual Studio 2010 Ultimate x64, ASP.NET 4.0, Windows Server 2008 R2 x64.

What could be the problem and how can it be solved?

+3
source share
1 answer

Profiles only Work Out-of-the-Box with the Web Site Template.

To use a profile in a web project, you need to apply the crawl , which is available here .

http://code.msdn.microsoft.com/WebProfileBuilder

http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx

+1
source

Source: https://habr.com/ru/post/1748103/


All Articles