Re: Sql Server doesnot exist or access denied
- From: Sericinus hunter <serhunt@xxxxxxxxx>
- Date: Fri, 09 Dec 2005 14:46:52 GMT
On your web server try this:
WindowsIdentity wi = (WindowsIdentity)User.Identity; wi.Impersonate(); // ...do your database access here wi.Undo();
This assumes that you use Windows identity.
Gomathi wrote:
I am getting a 'SQL Server does not exist or access denied. ' error when trying to access a SQL Server Database from my local machine. I have the code on the web server and it is working fine.
My connection string is fine and I am able to log into SQL Server via Enterprise manager ok.
The code falls over at this line - cmd.Connection.Open()
I have just re-installed .net 1.1 and installed IIS on my local machine. Are there settings which I need to update possibly?
Thanks for your help.
Regards,
Gomathi
.
- References:
- Sql Server doesnot exist or access denied
- From: Gomathi
- Sql Server doesnot exist or access denied
- Prev by Date: Migration SQL2000 to SQL2005
- Next by Date: Re: Migration SQL2000 to SQL2005
- Previous by thread: Re: Sql Server doesnot exist or access denied
- Next by thread: RE: DbProviderFactories.GetFactory(row) exception
- Index(es):
Relevant Pages
|