p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 4 General Discussion (http://p2p.wrox.com/forumdisplay.php?f=561)
-   -   Login failed for user 'SECSQL20\Guest'. (http://p2p.wrox.com/showthread.php?t=82075)

avidan December 29th, 2010 06:10 PM

Login failed for user 'SECSQL20\Guest'.
 
Hello
I'm quite frustrated. I deployed the website I built and updated the connection string. Now I'm getting the following error:
Login failed for user 'XXXXX\Guest'.
This is my connection string
<add name="ConnectionString" connectionString="Data Source=SERVER; Initial Catalog=abeol; User ID=USERNAME; Password=PASSWORD" providerName="System.Data.SqlClient" />

Any idea?
Thanks

avidan December 30th, 2010 01:44 PM

Problem solved
 
The problem is solved (after a sleepless night...) The problem was with the connection string. I did it accordingly to Imar's book, but my hosting company liked it differently. But the site is up and running.

Imar December 31st, 2010 05:47 AM

Hi there,

The error message sugests you were using Integrated Security. Did your host require you to use SQL Security instead? Both are explained in detail in Chapter 19 and Appendix B of the book. Or did your host require you to use something else instead? If so, can you elaborate a little?

Cheers,

Imar

avidan December 31st, 2010 06:32 AM

Connection String
 
Dear Imar
It took some time until I understood the difference between Windows and SQL authorization. But my main problem was getting an error message about an invalid key element: "id". It took me a sleepless night to understand, that in the connection string for the entity, the keyword for the user is "User" and not "User ID" as described in your book. After I resolved all these problems (like adding "Integrated security=false"), the site was running.
But I have on this occasion another question: Do I have to change the "ApplicationServices" connection string name to "LocalSQLServer"? I just added the "LocalSQLServer" connection string as described in your book.
Thanks
Alex

Imar December 31st, 2010 07:50 AM

Quote:

It took me a sleepless night to understand, that in the connection string for the entity, the keyword for the user is "User" and not "User ID" as described in your book.
Can you show the complete connection string (without personal data)? User Id has always worked for me. For more examples using User Id, take a look here: http://www.connectionstrings.com/sql-server-2005

Quote:

Do I have to change the "ApplicationServices" connection string name to "LocalSQLServer"? I just added the "LocalSQLServer" connection string as described in your book.
It depends on what you want. If you want to minimize the number of (identical) connection strings, you could create a single one (PlanetWrox, or ApplicatiionServices or LocalSqlServer or whatever) and use that everywhere in the application.

Cheers,

Imar

avidan December 31st, 2010 08:00 AM

Connection String
 
Here they are.

<add name="ConnectionString" connectionString="Data Source=SERVER; Initial Catalog=DATABASE; Integrated Security=false; User ID=USERNAME; Password=PASSWORD" providerName="System.Data.SqlClient" />

<add name="avidanEntities" connectionString="metadata=res://*/app_code.avidan.csdl|res://*/app_code.avidan.ssdl|res://*/app_code.avidan.msl;provider=System.Data.SqlClient ;provider connection string=&quot;Data Source=SERVER; Initial Catalog=DATABASE;Integrated Security=false;User=USERNAME;Password=PASSWORD;Mul tipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

Alex

Imar January 1st, 2011 12:03 PM

Looks fine to me. Odd that it doesn't work with User ID; that works fine for me...

Cheers,

Imar

avidan January 2nd, 2011 03:18 AM

asp.net web site administration tool
 
Another question: How can I access the asp.net web site administration tool on my remote site? How can I manage roles directly and add/delete users there?
Thanks
Alex

Imar January 2nd, 2011 06:03 AM

Hi Alex,

Can you please start a new thread for a new topic? Makes things easier for everyone.

Cheers,

Imar


All times are GMT -4. The time now is 05:12 PM.

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