Solution:
Http://www.cnblogs.com/lqb/archive/2008/02/17/1071650.html
Original post content:
In web. config
Add
-
-
XML Code
-
< Anonymousidentification Enabled = "True" /> < Profile Enabled = "True" > < Properties > < Add Name = "Mynewproperty" Allowanonymous = "True" /> </ Properties > </ Profile >
In each page. aspx. CS
-
C # code
-
Access through profile. mynewproperty
Can this be achieved smoothly on other machines?
However, my machine, for any page in the project, appears during debugging:
UserCodeHttpexception not handled
Cannot connect to the SQL Server database.
When browsing directly:
Do not generate user instances in SQL Server. Use sp_configure 'user instances enabled' to generate a user instance.
Find the problem by yourself and discover it again
Provided in ASP. NET configuration->Program-> Aspnetsqlprovider Test
The same error also occurs.
Provider management
Failed to establish database connection. If you have not created an SQL Server database, log out of the website management tool, use the aspnet_regsql command line utility to create and configure the database, and then return to the tool to set the provider.
Run aspnet_regsql under SDK to enable wizard configuration.
Failed to query the list of database names in SQL Server.
An error occurred while establishing a connection with the server.
SQL Server Management studio express does not see the automatically created ASPnet table.
my machine environment: (the installation sequence is from top to bottom)
Vista Ultimate 32-bit
Vista Ultimate SP1
Visual Studio 2005 team suite
SQL Server 2005 express edition
Visual Studio 2005 team suite SP1
Visual Studio 2005 team suite SP1 for Vista
SQL Server 2005 express Edition SP2 for express edition
IIS 7.0 (including.. Net content)
(no compatibility issues and file read/write permissions issues)