p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 (http://p2p.wrox.com/forumdisplay.php?f=252)
-   -   WebShop : I cannot make remote connection (http://p2p.wrox.com/showthread.php?t=56356)

JoinTTT April 6th, 2007 07:28 PM

WebShop : I cannot make remote connection
 
Hi

I run the all code for Chapter 5. Very good this book.

I made change in web config for connecting db remotely. I comment the original line. and I added new line with same add name.

<connectionStrings>

    <add name="WebShop" connectionString="Data Source=(local)\SQLExpress;Initial Catalog=WebShop;User ID=sa;Password=xxxx" providerName="System.Data.SqlClient"/>
  </connectionStrings>


But When I try to run webshop, I got this error ("Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.")

Why do I this error?





Imar April 7th, 2007 03:21 AM

Hi there,

Where does the SA user name and password come from? What makes you think this all of a sudden works? That is, the fact you're using these details must mean you configure an account like that somewhere?

You may want to take a look here for more details about connecting to SQL Server: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

I think the most likeliest thing to do is change "(local)\SQLExpress" to the name of your remote SQL Server.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.

JoinTTT April 7th, 2007 03:49 PM

Thank you very much, Imar.

I figured my issue out with your help.

I will continue to read your book.

Best Wishes!


Imar April 7th, 2007 04:13 PM

Great, glad it's working.

For the benefit of the archive of this forum, would you mind sharing how you solved it?

Have fun with the book.

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.

JoinTTT April 7th, 2007 04:30 PM

I am sorry about it.

Very stupid mistake I made.

From Sql Server Management Studio Express, I get in server properties --> Security Tab.
And I am very surprised to see that Server Authentication is Windows Only. So I choose Sql Server and Windows Authentication Mode.


Then it fix.
and your article in your site get 5 score :)


Imar April 7th, 2007 04:33 PM

Right, I see.

Although that works, you may still want to switch back to Windows / Integrated Security, as it's more secure than SQL authentication (because you don't have to store and pass around the passwords for the user account).

Anyway, glad the article helped.

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.


All times are GMT -4. The time now is 11:21 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.