Solved

Can Someone Decipher this Stack Trace Message

Posted on 2008-10-24
4
411 Views
Last Modified: 2013-11-07
I have the ASP.NET Portal VBVS Starter Kit Running on a Web server connected to a SQL 2000 remote DB.  I have staged a new SQL 2005 server and have ran the scripts to create the DB and restored the data from the SQL 2000 server.  I changed the web.config file to point to the new SQL 2005 server and below is what I get.  I have changed the password to the default, however still won't go.  Any thoughts...


Cannot open database "Portal" requested by the login. The login failed. Login failed for user 'PortalUser'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Portal" requested by the login. The login failed. Login failed for user 'PortalUser'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[SqlException: Cannot open database "Portal" requested by the login. The login failed.
Login failed for user 'PortalUser'.]
   System.Data.SqlClient.ConnectionPool.CreateConnection() +402
   System.Data.SqlClient.ConnectionPool.UserCreateRequest() +151
   System.Data.SqlClient.SqlConnection.Open() +384
   ASPNET.StarterKit.Portal.LinkDB.GetLinks(Int32 moduleId)
   ASPNET.StarterKit.Portal.QuickLinks.Page_Load(Object sender, EventArgs e)
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Control.LoadRecursive() +98
   System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +464
   System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
   System.Data.SqlClient.SqlConnection.Open() +384
   ASPNET.StarterKit.Portal.LinkDB.GetLinks(Int32 moduleId)
   ASPNET.StarterKit.Portal.QuickLinks.Page_Load(Object sender, EventArgs e)
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Control.LoadRecursive() +98
   System.Web.UI.Page.ProcessRequestMain() +750

 
0
Comment
Question by:jimmyjamrmh
  • 2
4 Comments
 
LVL 37

Expert Comment

by:samtran0331
ID: 22799771
There really isn't anything to decipher that is necessary beyond:
[SqlException: Cannot open database "Portal" requested by the login. The login failed.
Login failed for user 'PortalUser'.]


>> I changed the web.config file to point to the new SQL 2005 server and below is what I get.
Is there a user in the SQL2005 users named "PortalUser"? (which I assume is what is in your web.config connectionstring?)
0
 
LVL 1

Accepted Solution

by:
jimmyjamrmh earned 0 total points
ID: 22799842
I was able to fix.  I found that a previous PortalUser had attached to the DB, thus not letting the new PortalUser append to the Portal DB.  I deleted both and reran the script, tweaked the permissions and it worked.  Weird!
0
 
LVL 37

Expert Comment

by:samtran0331
ID: 22800074
That was actually going to be my next suggestion...wanted to get the basics of making sure the username/password in Sql server and web.config were correct first...

the reason is that the logins are maintained for every database in the master database on the server and it also includes a SID (security identifier)...so when you move db's from server to server the data in the master database doesn't match up the SID even though the username might be the same because the SID is created for the sql server....dropping the user and re-adding it creates a new SID to match..
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now