Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jbushkill
Starting Member
7 Posts |
Posted - 2009-09-28 : 12:05:00
|
I am developing a simple Asp.Net website and am having trouble with my SQL Server connection/configuration. My web page has a GridView that should display my table info. When the page comes up I get:Cannot open database "Test" requested by the login. The login failed.(depending on the other changes I've made I get one of the following:) Login failed for user 'NT AUTHORITY\IUSR'Login failed for user 'NT AUTHORITY\NETWORK SERVICE'Login failed for user ''My particulars are: Asp.Net 3.5, C# 2008, SQL Server 2008 Express, IIS 7.My SQL Server Properties are:Authentication Method = Windows Authentication,I've tried both Server Authentication methods: Windows Authentication mode and SQL Server and Windows Authentication mode I can create the SQl Data Source fine, it points to my web.config file as:<connectionStrings><add name="TestConnectionString" connectionString="Data Source=BUSHKILL-PC\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True" providerName="System.Data.SqlClient" /></connectionStrings>I've tried adding this with no luck:<system.web><identity impersonate="true" /></system.web>I've also tried changing to "Integrated Security=False" with no luck.I've looked at many forums and tried many different things with no luck, I'm guessing that it's a certain combination that I just haven't hit on correctly, can anyone help please?Thanks, Joe. |
|
jbushkill
Starting Member
7 Posts |
Posted - 2009-09-28 : 16:09:09
|
I resolved the issue when I followed the instructions of this blog:http://devilswork.wordpress.com/2009/01/28/login-failed-for-user-networkservice/ |
|
|
|
|
|