Database file and folder are not read only but error message says it is read only??

Discussion in 'ASP .Net' started by keithb, Jun 7, 2006.

  1. keithb

    keithb Guest

    This is on a remote server. Everything works in the development
    envirmonment. Any ideas?

    Thanks,

    Keith

    Failed to update database "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the
    database is read-only.
    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: Failed to update
    database "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the database is
    read-only.

    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 (0x80131904): Failed to update database
    "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    Boolean breakConnection) +857242
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    exception, Boolean breakConnection) +734854
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj) +188
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
    cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
    bulkCopyHandler, TdsParserStateObject stateObj) +1838
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    RunBehavior runBehavior, String resetOptionsString) +149
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    +886
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
    DbAsyncResult result) +132
    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult
    result, String methodName, Boolean sendToPipe) +415
    System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
    System.Web.Security.SqlMembershipProvider.ResetPassword(String username,
    String passwordAnswer) +2226
    System.Web.Security.MembershipUser.ResetPassword(String passwordAnswer)
    +83
    System.Web.Security.MembershipUser.ResetPassword(String passwordAnswer,
    Boolean useAnswer, Boolean throwOnError) +34
    System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordQuestionView()
    +352
    System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword() +66
    System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source,
    EventArgs e) +101
    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
     
    keithb, Jun 7, 2006
    #1
    1. Advertising

  2. Hi Keith,

    Did you check that the ASPNET account (or whatever ASP.NET is running as)
    has sufficient permissions in the folder to create the .ldf file.

    Trying giving the account Full Control over the App_Data folder and then
    restart IIS.

    Let us know?

    Ken
    Microsoft MVP [ASP.NET]



    "keithb" <> wrote in message
    news:...
    > This is on a remote server. Everything works in the development
    > envirmonment. Any ideas?
    >
    > Thanks,
    >
    > Keith
    >
    > Failed to update database "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the
    > database is read-only.
    > 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: Failed to update
    > database "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the database is
    > read-only.
    >
    > 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 (0x80131904): Failed to update database
    > "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only.]
    > System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    > Boolean breakConnection) +857242
    > System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    > exception, Boolean breakConnection) +734854
    >
    > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    > stateObj) +188
    > System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
    > cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
    > bulkCopyHandler, TdsParserStateObject stateObj) +1838
    > System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    > RunBehavior runBehavior, String resetOptionsString) +149
    > System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
    > cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    > +886
    > System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    > cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
    > DbAsyncResult result) +132
    > System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult
    > result, String methodName, Boolean sendToPipe) +415
    > System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
    > System.Web.Security.SqlMembershipProvider.ResetPassword(String username,
    > String passwordAnswer) +2226
    > System.Web.Security.MembershipUser.ResetPassword(String passwordAnswer)
    > +83
    > System.Web.Security.MembershipUser.ResetPassword(String passwordAnswer,
    > Boolean useAnswer, Boolean throwOnError) +34
    >
    > System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordQuestionView()
    > +352
    > System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword() +66
    > System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source,
    > EventArgs e) +101
    > 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
    >
    >
    >
    >
     
    Ken Cox [Microsoft MVP], Jun 7, 2006
    #2
    1. Advertising

  3. keithb

    keithb Guest

    That was it.

    Many thanks

    Keith

    "Ken Cox [Microsoft MVP]" <> wrote in message
    news:...
    > Hi Keith,
    >
    > Did you check that the ASPNET account (or whatever ASP.NET is running as)
    > has sufficient permissions in the folder to create the .ldf file.
    >
    > Trying giving the account Full Control over the App_Data folder and then
    > restart IIS.
    >
    > Let us know?
    >
    > Ken
    > Microsoft MVP [ASP.NET]
    >
    >
    >
    > "keithb" <> wrote in message
    > news:...
    >> This is on a remote server. Everything works in the development
    >> envirmonment. Any ideas?
    >>
    >> Thanks,
    >>
    >> Keith
    >>
    >> Failed to update database "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the
    >> database is read-only.
    >> 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: Failed to update
    >> database "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the database is
    >> read-only.
    >>
    >> 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 (0x80131904): Failed to update database
    >> "C:\BTM_ROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only.]
    >> System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    >> Boolean breakConnection) +857242
    >> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    >> exception, Boolean breakConnection) +734854
    >>
    >> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    >> stateObj) +188
    >> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
    >> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
    >> bulkCopyHandler, TdsParserStateObject stateObj) +1838
    >> System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    >> RunBehavior runBehavior, String resetOptionsString) +149
    >> System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
    >> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
    >> async) +886
    >> System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    >> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
    >> method, DbAsyncResult result) +132
    >> System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult
    >> result, String methodName, Boolean sendToPipe) +415
    >> System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
    >> System.Web.Security.SqlMembershipProvider.ResetPassword(String
    >> username, String passwordAnswer) +2226
    >> System.Web.Security.MembershipUser.ResetPassword(String passwordAnswer)
    >> +83
    >> System.Web.Security.MembershipUser.ResetPassword(String passwordAnswer,
    >> Boolean useAnswer, Boolean throwOnError) +34
    >>
    >> System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordQuestionView()
    >> +352
    >> System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword() +66
    >> System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source,
    >> EventArgs e) +101
    >> 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
    >>
    >>
    >>
    >>

    >
    >
     
    keithb, Jun 7, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    701
  2. Big Bill

    Error message says page

    Big Bill, Jul 14, 2003, in forum: HTML
    Replies:
    1
    Views:
    604
    Hywel Jenkins
    Jul 14, 2003
  3. Divya
    Replies:
    2
    Views:
    216
    Bullschmidt
    May 11, 2004
  4. Replies:
    4
    Views:
    3,074
    A. Sinan Unur
    Dec 8, 2005
  5. Replies:
    8
    Views:
    172
Loading...

Share This Page