MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 21st, 2004, 07:59 AM
syturvy syturvy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 17 syturvy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 29 sec
Reputation Power: 0
Question can't connect from web application

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"
(I program in C# and connect with ADO.NET)

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

Reply With Quote
  #2  
Old December 10th, 2004, 06:57 AM
drbhoneydew drbhoneydew is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Harrogate, UK
Posts: 15 drbhoneydew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > can't connect from web application


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT