Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting a 'Cannot generate SSPI context' error in my asp.net page. I am not sure where the problem lies.

In the page I hardcoded the connection string. I provided the server, UID and pwd in the connection string. I use the same server, UID, and pwd to access the database through MS SQL Management Studio.

I know the query works because I have been testing it in Management Studio. Here is the error I get. I am not sure if I should put the stack error in.

Line 87:         Dim CMD As New SqlDataAdapter(SQL, CONN)
Line 88:         Dim DS As New DataSet
Line 89:         CMD.Fill(DS)
Line 90:         MYMMSMASTER.DataSource = DS
Line 91:         MYMMSMASTER.DataBind()


What I read online that it might be a server side problem. If there is any possible client side problems, please tell me. Any opinion will be greatly appreciated
Posted

You may find it's because the instance isn't configured for remote procedure calls (RPC). This allows SSMS to connect but stops other code executing agains the SQL instance.

Take a look at this article:

http://bidn.com/blogs/BradSchacht/ssis/617/server-%E2%80%98servername%E2%80%99-is-not-configured-for-rpc[^]
 
Share this answer
 
I take it the SQL server is on a different server to your website? if this is the case and you are using active directory to authenticate your user token, you may need to enable server delegation.

Are there any linked servers involved? Is this where you webserver is remote and your sql server is remote?

http://support.microsoft.com/kb/811889[^]

Account delegation
http://technet.microsoft.com/en-us/library/cc739474(v=ws.10).aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900