Hi,
I have an asp.net2.0 app with sql server express on another machine, I can
browse the pages in VS2005 Environment. When I created a virtual directory in
IIS, and browse the pages, I got the following errors:
----------------
Exception Details: System.Data.SqlClient.SqlException: Login failed for user
''. The user is not associated with a trusted SQL Server connection.
----------------
Web.config:
<connectionStrings>
<add name="Sol" connectionString="Data Source=HPS2589\SQLEXPRESS;Initial
Catalog=Sol;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
</connectionStrings>
Please tell me what 's the problem, and how to fix it
Thank you!
Alex Meleta - 30 Aug 2007 21:03 GMT
Hi Frank,
IIS user has no rights by default to access DB environment (Integrated Security
means get access from current user, and ISS has his own one).
It's better to provide certain user in connection string, e.g. ... "UID=user_for_db;PWD=password"
Regards, Alex
[TechBlog] http://devkids.blogspot.com
> The user is not associated with a trusted SQL Server connection
William Vaughn - 30 Aug 2007 23:17 GMT
Of course, this assumes that SQL Server has mixed-mode security
enabled--which it does not by default.

Signature
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
> Hi Frank,
>
[quoted text clipped - 8 lines]
>
>> The user is not associated with a trusted SQL Server connection