Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Can Someone Decipher this Stack Trace Message

Posted on 2008-10-24
4
415 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 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