Thanks to your article, I got it working in both Visual Studio and with a browser. :D
Here's post mortem, which I hope will help other people:
quote:Be sure to check out the section titled "Other Issues" near the end of the article, as it explains how to fix the "remote connections" issue.
This error message turned out to be a red herring; I had run into this problem before, and I had already used the SQL Server Configuration Manger to enable "Named Pipes" and TCP/IP.
The key to solving this problem was outlined in the part of your article, "Scenario 2 - Using Windows Authentication with IIS and the Database on the same Machine". I wasn't familiar with Microsoft SQL Server Management Studio, and AFAIK
this app is not included with VS 2005. However, a quick Google search turned up a free beta version. As I write this in June of 2006, the app can be downloaded here:
Unfortunately, after following the steps in scenario 2 of your article things still weren't working, but it was easy enough to figure out the missing steps. In step 2, you specify the login name as <MachineName>\ASPNET and in step 3, you specify the "User name" as ASPNET and "Login name" as <MachineName>\ASPNET.
On my machine -- which is using a Windows login with no password (I'm the only one using it) -- I had to add my IUSR account to the SQL Server Manager. My computer is named P4, so for step 2 I specified the "Login name" as P4\IUSR_P4. And for step 3 the "User name" was IUSR_P4 and the "Login name" was P4\IUSR_P4.
Here's the connection string I'm using:
"Data Source=.\\SQLEXPRESS;Initial Catalog=DateTracker;Integrated Security=SSPI";
During the course of trying to figure this out, I came across some suggestions on various web sites to modify the Web.Config file with this line:
This didn't work, and it doesn't seem to matter either way; if I comment this line out, everything still works.
Another suggestion was to add an <authorization><allow users> tag to Web.Config, like this (I think):
<allow users="P4\IUSR_P4" />
Again, this didn't help, and removing it didn't hurt anything.
Whew! I never would have figured this out on my own. Thanks again, Imar.