Posted by Mad Scientist Jr on 11/15/06 00:33
I am getting the following error when trying to access a database with
a trusted connection:
"Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection."
My connection string is:
"Server=MyServer; Database=MyCatalog; Trusted_Connection=True;"
Note that Anonymous Access is off in IIS, and I am able to read my
Windows login with:
Textbox1.text =
System.Web.HttpContext.Current.User.Identity.Name.Substring(System.Web.HttpContext.Current.User.Identity.Name.IndexOf("\")
+ 1).ToLower()
Can anyone explain how to query the db using a trusted connection?
PS Is there a way to dynamically retrieve a list of databases the
current user has SQL rights on, by specifying only the server, again
using trusted connection?
Thanks...
Navigation:
[Reply to this message]
|