Friday, February 10, 2012

cannot find the database file specified in the connection string

can anyone help me with this error message

Server Error in '/' Application.

The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.

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.Configuration.Provider.ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.

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:

[ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.] System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) +2546149 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +87 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Version Information: Microsoft .NET Framework Version:2.0.50727.112; ASP.NET Version:2.0.50727.112

Dear,

can u post your code which you are using as a connection string? it seems that the string in Initial Catalog doesnt match any database name.

Happy Coding

|||

im fairly new to asp.net and have nevver use sql before now but i asume you mean this

<

connectionStrings>

<

addname="jamesmasonConnectionString"connectionString="Data Source=iis7sql.maximumaspbeta.com;Initial Catalog=jamesmason;Persist Security Info=True;User ID=jamesmason;Password=Rg2$&6Ne5"providerName="System.Data.SqlClient" />

</

connectionStrings>

|||Are you sure the exception came out from this connection string? No database file is specified in this connection string.?The?call?stack?shows?something?related?to?membership?provider,?so?can?you?post?membership?section?in?the?web.config??If?you?haven't?customized?membership?provider,?by?default?it?will?use?a?connectionstring?named?LocalSqlServer.?You?can?check?LocalSqlServer?connection?string to see whether any database file is specified:

Response.Write(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString());

For more information about LocalSqlServer, you can take a look at this article:
http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

No comments:

Post a Comment