Note that there are some explanatory texts on larger screens.

plurals
  1. POError Cannot open database
    text
    copied!<p>I use asp.net 4 and c#. I'm testing a website on my local computer.</p> <p>Her my connection string:</p> <pre><code>&lt;connectionStrings&gt; &lt;add name="CmsConnectionString" connectionString="Data Source=.; Initial Catalog=CmsSiteNameExtension; Integrated Security=SSPI"/&gt; &lt;add name="CmsConnectionStringEntityDataModel" connectionString="Metadata=res://*/; provider=System.Data.SqlClient;provider connection string=&amp;quot;&amp;#xA; Data Source=.;Initial Catalog=CmsSiteNameExtension;Integrated Security=True;MultipleActiveResultSets=True&amp;quot;" providerName="System.Data.EntityClient"/&gt; &lt;/connectionStrings&gt; </code></pre> <p>I receive this error when try to run locally my web app.</p> <pre><code>Cannot open database "CmsSiteNameExtension" requested by the login. The login failed. Login failed for user 'WIN-S6G3M6TMQLT\XXX' </code></pre> <p>Any idea what is wrong and how to solve it?</p> <p>STACK:</p> <pre><code> [SqlException (0x80131904): Cannot open database "CmsSiteNameExtension" requested by the login. The login failed. Login failed for user 'WIN-S6G3M6TMQLT\XXX'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009598 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +183 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126 System.Data.SqlClient.SqlConnection.Open() +125 System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure) +52 [EntityException: The underlying provider failed on Open.] System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure) +161 System.Data.EntityClient.EntityConnection.Open() +98 System.Data.Objects.ObjectContext.EnsureConnection() +81 System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +46 System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator() +44 System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +184 System.Data.Objects.ELinq.ObjectQueryProvider.&lt;GetElementFunction&gt;b__2(IEnumerable`1 sequence) +41 System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +59 System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +150 System.Linq.Queryable.SingleOrDefault(IQueryable`1 source, Expression`1 predicate) +300 WebProject.Web.Cms.FrontEndCms.CommonUIComponents.HtmlHeadMain.IncludeHtmlCodeHeader() in C:\Users\xxx\Desktop\SVN-Working-ORIGINAL\WebProject\Src\WebProject.Web\Cms\FrontEndCms\Components\Generals\HtmlHeadMain.ascx.cs:28 WebProject.Web.Cms.FrontEndCms.CommonUIComponents.HtmlHeadMain.Page_Load(Object sender, EventArgs e) in C:\Users\xxx\Desktop\SVN-Working-ORIGINAL\WebProject\Src\WebProject.Web\Cms\FrontEndCms\Components\Generals\HtmlHeadMain.ascx.cs:19 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload