Re: Using Widows Authentication and accesssing SQL with SQL Authentication



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



.



Relevant Pages

  • Re: Windows Authentication in asp.net 2005 to SQL Server?
    ... If the domains do not trust each other, Windows authentication is not going ... Basic authentication sometimes makes the need for Kerberos delegation go ... generic account to do the backend data stuff on our SQL Server. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Connecting to MS SQL Express from other PC
    ... "Mixed mode" authentication enables SQL Server authentication AND SSPI (Windows domain) authentication. ... I also have a long whitepaper on connecting on my blog. ...
    (microsoft.public.sqlserver.connect)
  • Re: I dont want to re-invent the Login/Login Wheel - Help with utilities
    ... Yes, if you use .NET1.1, there isn't built-in login control, and more importanltly there isn't ready-to-use membership component to use. ... the membership provider uses SQL Server or SQL Server Express. ... We feel that having the capability to force password change would be a better benefit in securing our application and data access. ... Both Windows authentication and authorization wolud be be fine if we wanted the world to have access to our application data, but not very intuitive for maintaining integrity over our data. ...
    (microsoft.public.vstudio.general)
  • RE: IIS (ASP) -> SQLServer Authentication Issue
    ... I understand that you'd like to use IIS Intergration authentication in the ... and ASP "impersonates" authencitaed users to access SQL Server on ... only kerberos authentication allows double-hops from clients ...
    (microsoft.public.sqlserver.security)
  • Re: SBS Premium Edition .. what way is SQL licenced
    ... Another thing to note in using your SQL Server as a backend database is the ... concept of Forms-based authentication and Integrated Windows authentication. ... thereby requiring individual CALs to access SQL Server. ... Chad A. Gross - SBS MVP ...
    (microsoft.public.windows.server.sbs)