ASP.NET user management problem
I've been trying to work on an ASP.NET project which includes user and role management. First thing that I tried to use is the ASP.NET configuration which will open up a website for me where I can add users and roles. I get this website. The next thing is that I click on the "security" tab. That should let me do further configuration. But, when I click on the security tab I get a screen saying "Unable to connect to SQL SERVER DATABASE"
with an option below saying "choose data source"
. When I click on that button it goes into the "providers" tab. Here, I can see one option called "AspNetSqlProvider". When I test this provider I get this message :
Provider Management Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to 开发者_运维问答create and configure the database, and then return to this tool to set the provider.
I don't understand the problem as I have been using SQL SERVER in my applications and it has been working fine.
Please note that I have not installed sql server express edition on my computer. Instead, I have installed the complete version of sql server 2008.
Also, when I try to establish a connection from sql server management studio with windows authentication, I get a message saying :
Cannot connect to SUDHIR-PC 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
But, I've used the same connection in my asp.net project to establish database connection and use the database which has been working fine.
Please guide me to solve this problem.
Named Pipe connections are disabled by default for most SQL2008 versions, I'm not sure which version you mean when you say "complete". Enterprise? Standard? Developer? Here is a link to the defaults.
You will need to enable Named Pipes to connect via SSMS
Here is a comprehensive link that covers enabling the connection and possible Windows Firewall considerations.
I believe that you need to install the ASP.NET Membership database. Follow the instructions in this article:
http://weblogs.asp.net/sukumarraju/archive/2009/10/02/installing-asp-net-membership-services-database-in-sql-server-expreess.aspx
精彩评论