Cannot open database "dotnetnuke49" requested by the login. The login failed.<br>Login failed for user 'WTSWeb2'.

Server Error in '/' Application.

Cannot open database "dotnetnuke49" requested by the login. The login failed.
Login failed for user 'WTSWeb2'.

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 "dotnetnuke49" requested by the login. The login failed.
Login failed for user 'WTSWeb2'.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>


2) Add the following section to the configuration file of your application:

       <compilation debug="true"/>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[SqlException (0x80131904): Cannot open database "dotnetnuke49" requested by the login. The login failed.
Login failed for user 'WTSWeb2'.]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +428
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
   System.Data.SqlClient.SqlConnection.Open() +122
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +234
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +249
   DotNetNuke.Security.Membership.Data.SqlDataProvider.GetRolesByUser(Int32 UserId, Int32 PortalId) +115
   DotNetNuke.Security.Membership.DNNRoleProvider.GetRoleNames(Int32 portalId, Int32 userId) +73
   DotNetNuke.Entities.Users.UserInfo.get_Roles() +43
   DotNetNuke.Entities.Users.UserInfo.IsInRole(String role) +118
   DotNetNuke.Security.PortalSecurity.IsInRole(String role) +128
   DotNetNuke.Common.Globals.IsLayoutMode() +23
   DotNetNuke.UI.Skins.Skin.Page_Init(Object sender, EventArgs e) +74
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnInit(EventArgs e) +99
   System.Web.UI.UserControl.OnInit(EventArgs e) +77
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +198
   System.Web.UI.ControlCollection.Add(Control child) +80
   DotNetNuke.Framework.DefaultPage.Page_Init(Object sender, EventArgs e) +1798
   System.Web.UI.Control.OnInit(EventArgs e) +99
   System.Web.UI.Page.OnInit(EventArgs e) +12
   DotNetNuke.Framework.PageBase.OnInit(EventArgs e) +94
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

Version Information: Microsoft .NET Framework Version:2.0.50727.3662; ASP.NET Version:2.0.50727.3668