Quantcast
Channel: Getting started with SQL Server forum
Viewing all articles
Browse latest Browse all 9243

Cannot connect via c# but can via server management studio

$
0
0
When I try to connect to my sql server 2005, from a asp.net web application (asp.net development server) using...

Database=Prism_Project_db; Server=(local); Integrated Security=SSPI; MultipleActiveResultSets=True

... as the connection string, i get:

Cannot open database "Prism_Project_db" requested by the login. The login failed.
Login failed for user 'R-LAPTOP\Ryan Holdren'.

Yet I can connect using sql server management studio, no problem:

Server Type: Database Engine
Server: R-Laptop
Authentication: Windows Authentication

which connects as "R-LAPTOP\Ryan Holdren".

I do not understand how the login could work for one application and not for another. Can anyone help me get this working?

Ryan

Viewing all articles
Browse latest Browse all 9243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>