Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / August 2007

Tip: Looking for answers? Try searching our database.

The user is not associated with a trusted SQL Server connection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
frank - 30 Aug 2007 18:50 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.