Re: Using Widows Authentication and accesssing SQL with SQL Authentication
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Sat, 4 Mar 2006 09:38:10 -0800
See my blog post on connecting. I expect that SQL Server is not setup for
SQL Server authentication.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Valar" <vmanickamus@xxxxxxxxx> wrote in message
news:1141433865.402206.290660@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
I am working on an application with .NET 2005 and SQL server 2000.
I am using windows authentication for my web application authentication
and trying to connect to the SQL server with SQL authentication
credentials.
My web.config reads as follows:
web application Authentication:
<authentication mode="Windows" />
<authorization>
<allow users="*" />
<!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
<identity impersonate="true" />
SQL Authentication:
<connectionStrings>
<add name="DevDBConnection"
connectionString="Server=MyServer;database=MyDB;uid=MyUser;pwd=MyPwd;"
providerName="System.Data.SqlClient" />
</connectionStrings>
MY IIS directory security is set to "Integrated Windows
authentication". I am validating the user againt the Active Directory
for authentication and reading the user details and groups which works
fine.
But trying to open a connection object fails. I am getting a
"{"Cannot open database requested in login 'MyDB'. Login
fails.\r\nLogin failed for user 'MyUser'."}"
I have tried searching for a solution to my best, but could not solve
this problem.
I hope some one might have come accross the same problem ahd looking
forward for your help.
Thanks,
Valar
.
- References:
- Prev by Date: Re: Have you stopped using ADO?
- Next by Date: Re: Have you stopped using ADO?
- Previous by thread: Re: Using Widows Authentication and accesssing SQL with SQL Authentication
- Next by thread: Re: Using Widows Authentication and accesssing SQL with SQL Authentication
- Index(es):
Relevant Pages
|