Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2006, 06:54 AM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kasmatt2000 Send a message via Yahoo to kasmatt2000
Default Wrox United Write Permisions

Hi all Im having problems writing data into or updating the wrox United database. I have tried the installation instructions on pages 664-667 of "Beginning ASP.NET 2.0" but i still get an error. I also have this issue with the ASPNET user database i cant even read it at all. Im running all the code examples in IIS v5.1 on XP Pro. Please help. Below is an example of the error i keep on getting.

Server Error in '/Chapter06' Application.
--------------------------------------------------------------------------------

Failed to update database "C:\INETPUB\WWWROOT\CHAPTER06\APP_DATA\WROXUNITED. 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\CHAPTER06\APP_DATA\WROXUNITED. 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\CHAPTER06\APP_DATA\WROXUNITED. MDF" because the database is read-only.]
System.Data.SqlClient.SqlConnection.OnError( SqlException exception, Boolean breakConnection) +857338
System.Data.SqlClient.SqlInternalConnection. OnError(SqlException exception, Boolean breakConnection) +734950
System.Data.SqlClient.TdsParser.ThrowExcepti onAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehav ior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlCommand.FinishExecu teReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
System.Data.SqlClient.SqlCommand.RunExecuteR eaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
System.Data.SqlClient.SqlCommand.RunExecuteR eader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExe cuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQ uery() +135
System.Web.UI.WebControls.SqlDataSourceView. ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +401
System.Web.UI.WebControls.SqlDataSourceView. ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +721
System.Web.UI.DataSourceView.Update(IDiction ary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +78
System.Web.UI.WebControls.DetailsView.Handle Update(String commandArg, Boolean causesValidation) +1152
System.Web.UI.WebControls.DetailsView.Handle Event(EventArgs e, Boolean causesValidation, String validationGroup) +461
System.Web.UI.WebControls.DetailsView.OnBubb leEvent(Object source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Objec t source, EventArgs args) +35
System.Web.UI.WebControls.DetailsViewRow.OnB ubbleEvent(Object source, EventArgs e) +109
System.Web.UI.Control.RaiseBubbleEvent(Objec t source, EventArgs args) +35
System.Web.UI.WebControls.LinkButton.OnComma nd(CommandEventArgs e) +115
System.Web.UI.WebControls.LinkButton.RaisePo stBackEvent(String eventArgument) +163
System.Web.UI.WebControls.LinkButton.System. Web.UI.IPostBackEventHandler.RaisePostBackEvent(St ring eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostB ackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameVa lueCollection postData) +174
System.Web.UI.Page.ProcessRequestMain(Boolea n includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
 
Old December 2nd, 2006, 01:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 105
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to DanM
Default

HI there,

I'm guessing you're working with the vb.net version of the book, but in this case, that shouldn't matter too much. If you can do the following, this should solve your problem.

1) Make sure App_Data directory or any contained files does not have file system attribute Read-only set. (I had some files marked as Read-only)
2) Give user ASPNET and NETWORK SERVICE Modify control over the App_Data directory. (I had to add both these)
3) Run IISRESET to restart IIS to refresh its permissions.

If not, write back and we'll see what else we can find.

Dan

Dan Maharry
Read the feed at http://feeds.feedburner.com/dansarchive





Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrox United issues shanebbb BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 December 2nd, 2008 10:44 AM
Wrox United not working chris31martin BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 July 16th, 2008 09:00 AM
Re: Wrox United Logo dotnet411 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 June 10th, 2006 09:46 AM
Cannot log in to Wrox United site Wullie BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 June 6th, 2006 01:51 PM
Wrox United chapter 4 diango BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 4 December 29th, 2005 12:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.