BOOK: Beginning ASP.NET DatabasesAlso see the forum ASP Databases for more general discussions of ASP database issues not directly related to these books.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I have created the user form with the help of createnewuser control in Asp.net c#. In the same form I have added one more form to collect the user contact details and I have created the table for that in .mdf file.
In the .cs file I have written below mentioned code to gather the user data, but it works fine in local server and remote server it gives error.
The error what I am getting is:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I have the SQL server IP address, port no. username and password.
Yes, I am working with the built-in Membership provider.
I hope I have to write some code in Create user button, please let me know how it is to be written and in the web.config file I have mentioned the sql details in below mentioned way. Let me know whether it is correct.
If you're using SQL Server Express Edition, the remote connection to the SQL server are blocked by default so you must to enable it. Follow the link below for detail steps.