Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > .NET Framework 3.5
|
.NET Framework 3.5 For discussion of the Microsoft .NET Framework 3.5.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 3.5 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 August 2nd, 2008, 12:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What type of SQL Server are you using? (e.g. 2000, 2005(full/express) etc? And how does your connection string look like? Do you have your database in App_Data?

I start to sound like a broken record, but please provide this kind of information with your post. IIS5 helps, but as you can see from the error message, a lot of other stuff is relevant as well...

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old August 2nd, 2008, 02:19 PM
Registered User
 
Join Date: Jul 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm using SQL Server 2005 Express edition. The database is inside the App_data folder. Everything works great under the Visual web developer.

I figured that the sql server state was stopped now so, i started it and now I have this error:
Server Error in '/FrameworksDB_Updatable' Application.
--------------------------------------------------------------------------------

Failed to update database "C:\FRAMEWORKSDB_UPDATABLE\APP_DATA\FRAMEWORK_DB.M DF" 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:\FRAMEWORKSDB_UPDATABLE\APP_DATA\FRAMEWORK_DB.M DF" because the database is read-only.

The connection string is:

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Framework_DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"

So what's happening now is that the default page opens and then when i try to use one of the functionalities in my menu that works with the database, it gives the above error.

I'm sorry that I don't provide everything you need but really i don't know a lot here so I'm trying to respond to your questions as much as I can.






Nobody is Perfect.. still a lot to know.. Neamat
 
Old August 2nd, 2008, 02:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

No problem. There's a lot of stuff you need to know and make this work. So I can imagine it's difficult to list everything that's relevant.

Anyway, take a look at this: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=263

You need to grant permissions for the ASP.NET account to the App_Data folder. This way, that account can access the MDF database and write to it. The account you need to configure is probably called Network Service or ASPNET, depending on your version of Windows.

Hope this helps,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old August 3rd, 2008, 09:43 AM
Registered User
 
Join Date: Jul 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar.. at last it's working, it seems that it was only the permissions of the ASPNet user that needed to be changed.. Thank you so much.. I'm ready now to upload it to the production server hoping that nothing will go wrong.

Thank you again so much

Nobody is Perfect.. still a lot to know.. Neamat
 
Old August 3rd, 2008, 09:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome.

Have fun!

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Web Developer 2008 Express jjc9809 Visual Web Developer 2008 2 December 23rd, 2008 12:06 PM
Classic ASP in Visual Developer Express 2008 esstepansky Classic ASP Basics 2 August 25th, 2008 03:17 PM
Visual Web Developer 2005 Express Edition - Limits snew BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 7 November 15th, 2007 01:00 PM
Web Matrix vs. Visual Web Developer Express kwilliams ASP.NET 2.0 Basics 8 July 17th, 2007 01:41 PM
Microsoft Visual Web Developer 2005 Express Editio FT BOOK: ASP.NET Website Programming Problem-Design-Solution 10 April 24th, 2006 12:25 AM





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