Question: The SQL Server database cannot be connected when you configure web. config !!! (Resolved)

Source: Internet
Author: User
Tags management studio sql server management sql server management studio
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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.