SQL Server 2005 Pitfalls
Okay, this one is a tiny pitfall, but it really drove me mad. I was developing a web service that needed to talk to a database. But nothing that I could do would make it do it. It kept giving me this error:
I wasn't connecting remotely, both the web service and the server were on the same machine, and I could access it via Management Studio. I then though about permissions, even though the error message wasn't the right one for that, so I granted the ASPNet account so much permissions that it cried foul. No go with that. I realized that I was using the ASP.Net Development Server, so it was running under my account all along, so it couldn't be this.
In the end, the devil was in the details, I was using this connection string:
To make it work, I need to change it to:
Apparently the two are not equivalent, the first uses TCP/IP (which was disabled), the second uses Named Pipes (which worked).
Comments
Comment preview