Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 29th, 2010, 06:10 PM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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

Last edited by avidan; December 30th, 2010 at 04:15 AM..
Reply With Quote
  #2 (permalink)  
Old December 30th, 2010, 01:44 PM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
  #3 (permalink)  
Old December 31st, 2010, 05:47 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #4 (permalink)  
Old December 31st, 2010, 06:32 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #5 (permalink)  
Old December 31st, 2010, 07:50 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #6 (permalink)  
Old December 31st, 2010, 08:00 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #7 (permalink)  
Old January 1st, 2011, 12:03 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #8 (permalink)  
Old January 2nd, 2011, 03:18 AM
Authorized User
Points: 322, Level: 6
Points: 322, Level: 6 Points: 322, Level: 6 Points: 322, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 63
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #9 (permalink)  
Old January 2nd, 2011, 06:03 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Alex,

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

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
login failed for user Domain\User ID GailCG SQL Server 2005 0 June 29th, 2009 10:45 AM
Getting 'Login failed for user ' Squeakrz44 VB.NET 2002/2003 Basics 0 November 18th, 2006 06:09 PM
login failed for user domain\user babakwx SQL Server 2000 2 May 30th, 2006 12:28 PM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM



All times are GMT -4. The time now is 07:54 PM.


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