|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
For my application, I need to consult a database located on a server on the local network. The application is located on my pc. I use the connection string Code:
"Integrated Security = SSPI;database=dbName;data source=serverName" When I compile my project as a windows application, this works fine. But when I compile as a web application in ASP.NET and try the same connection, it won't connect. How can this be solved? Thanks |
|
#2
|
|||
|
|||
|
It's probably a username issue. Integrated security uses whatever login the application is using. In the windows application, this will probably be whoever you are logged in as. In the case of ASP.NET or indeed any web application, depending on how you have the website permissions set up, this will probably be whatever login the anonymous user is set to spoof. You can either set the website up so that it uses authentication ie no anonymous browsing in the bits where you are connecting to the database; or create a dedicated SQL login for the application with appropriate permissions and use that in your connection string.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > can't connect from web application |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|