Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can Someone Decipher this Stack Trace Message

Posted on 2008-10-24
4
Medium Priority
?
420 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
[X]
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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

660 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