943,947 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 585
  • ASP.NET RSS
Oct 19th, 2009
0

Deployed application doesn't connect database

Expand Post »
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.
Similar Threads
Reputation Points: 7
Solved Threads: 1
Light Poster
Mongz is offline Offline
41 posts
since Apr 2009
Oct 19th, 2009
0
Re: Deployed application doesn't connect database
What error message do you receive.......?
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Oct 19th, 2009
0
Re: Deployed application doesn't connect database
Hello

Just check your web.config file for connection string or send us the error message to find exact problem.


Mark as solved if it helps you!!!
Last edited by reach_yousuf; Oct 19th, 2009 at 11:04 am.
Reputation Points: 12
Solved Threads: 38
Junior Poster
reach_yousuf is offline Offline
194 posts
since Sep 2007
Oct 20th, 2009
0
Re: Deployed application doesn't connect database
Here's the error i recieve
Quote ...
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
and my connection string looks like this
ASP.NET Syntax (Toggle Plain Text)
  1. <connectionStrings>
  2. <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"
  3. providerName="System.Data.SqlClient" />
  4. </connectionStrings>
Reputation Points: 7
Solved Threads: 1
Light Poster
Mongz is offline Offline
41 posts
since Apr 2009
Oct 20th, 2009
0
Re: Deployed application doesn't connect database
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.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: saving to database from gridview
Next Thread in ASP.NET Forum Timeline: Maximum memory allocated for a string ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC