| | |
Deployed application doesn't connect database
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2009
Posts: 36
Reputation:
Solved Threads: 0
Hi guys, i've deployed asp application, now the problem im facing is it doesn't connect sql database. At first the database was attached with the application and it failled to connect the database, secondly i attached the database on SQL server and configured connection string still it doesnt connect. When ii was running the application before i deploy it, it was running perfectly. Please help me, i need to make it work ASAP.
•
•
Join Date: Apr 2009
Posts: 36
Reputation:
Solved Threads: 0
0
#4 Oct 20th, 2009
Here's the error i recieve
and my connection string looks like this
•
•
•
•
Server Error in '/trying' Application.
--------------------------------------------------------------------------------
Failed to update database "C:\INETPUB\WWWROOT\TRYING\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:\INETPUB\WWWROOT\TRYING\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:\INETPUB\WWWROOT\TRYING\APP_DATA\ASPNETDB.MDF" because the database is read-only.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
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) +1005
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) +149
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3558
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +306
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +107
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +452
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +114
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +165
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) +5594
ASP.NET Syntax (Toggle Plain Text)
<connectionStrings> <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> </connectionStrings>
0
#5 Oct 20th, 2009
It looks like your database is read only. Right click on the database file in Explorer and see if the "Read Only" checkbox is set for the file. If it is, then unselect it.
![]() |
Similar Threads
- Running a VB application with MS Access database (Visual Basic 4 / 5 / 6)
- connect vb application to mysql database (Visual Basic 4 / 5 / 6)
- how to connect to database (ASP.NET)
- Can't connect database or view PHP pages in Dreamweaver (PHP)
- Connecting password protected MS Access database from C# (C#)
- Sometimes an error come out "Could not connect to database".Why?? (Oracle)
- How to connect Database in C???? (C)
- If your Firebird application doesn't work... (Database Design)
Other Threads in the ASP.NET Forum
- Previous Thread: change the setup icon
- Next Thread: Maximum memory allocated for a string ?
| Thread Tools | Search this Thread |
.net 3.5 ajax alltypeofvideos appliances asp asp.net bc30451 beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions control countryselector dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iis javascript list listbox login microsoft mouse mssql nameisnotdeclared news novell numerical opera panelmasterpagebuttoncontrols problem radio redirect registration relationaldatabases reportemail save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos vista visualstudio vs2008 web webapplications webdevelopemnt webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers






