Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cant connect to SQL server

Status
Not open for further replies.

logi2000

Programmer
Jun 17, 2003
221
CR
i am getting this error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

- my asp.net application is running on win 2000 professional
- my SQL server 2000 is running on windows 2003
- the usr i use to login into the web server, has rights to the database

- my web config file has
<authentication mode="Windows"/>
<identity impersonate="true"/>

- the iis is configured to use windows authentication

- the connection string is in the web.config file like this:

<add key="telem" value="data source = 192.168.240.100; initial catalog = telem; Integrated Security=SSPI; Connect Timeout = 90 " />


- if i run the web application from .net it works fine, after that i run the application directly from a web browser, and works. if i wait a period of 10 minutes aproximately, and try to acces the application, i get the cant connect error.


what can the problem be ?
 
Our application is on our intranet. I'll assume that this is the case for you as well. Because it's on the intranet, I know that all the users are using a late version of IE.

In IE, tools->Internet Options
Click Security Tab
Click Local Intranet
Click sites
click advanced
Add in your web address (Click Ok enough to get back to Security tab

Click Advanced Tab
Scroll down to Security (near very bottom)
Make sure Enable Integrated Windows Authentication is checked.
Click ok to get out of that and restart IE.

In Active Directory Users and Computers, in User Profile on Account tab, make sure 'Account is trusted for delegation' is checked.

If this doesn't work, let me know.

Thanks!
Kimberly
 
it works. checking Enable Integrated Windows Authentication solve the problem.

now the problem i have, is that when a user is trying to acces the login page of my web application, a security pop up windows appears, and ask the user for a userid, password, and domain.

how can i avoid that window to pop up when a user is trying to acces my web application ?
 
I knew I missed something.

Under IE - Tools -> Internet options
security tab
local intranet
Click Custom Level and scroll to the bottom of that.

Under User authentication and logon, click Automatically Logon with current username and password.

Hope this works! :)
Kimberly
 
did that, but i stills ask for the userid, password and domain
 
When we set up a new user, it does this still if we've forgotten to add in the site under local intranet. If you've added in instead of I think it does this as well. We typically just add in the and leave off the https part, but you could play around with that.

So far, that's everything I can think of.

Kimberly
 
Logi2000,
what Kimberly is telling is correct, the only reason you still have the windows prompt for a user name and password is your database server is different from the IIS server you are authenticating the users with.
take a look here

thats said theres a hack you can try


Good luck


The solution is simple, the problem is complex.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top