Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > .NET Framework 3.5
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old August 2nd, 2008, 12:26 PM
Imar's Avatar
Wrox Author
Points: 67,332, Level: 100
Points: 67,332, Level: 100 Points: 67,332, Level: 100 Points: 67,332, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,231
Thanks: 66
Thanked 1,418 Times in 1,398 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.
Reply With Quote
  #12 (permalink)  
Old August 2nd, 2008, 02:19 PM
Registered User
 
Join Date: Jul 2008
Location: , , .
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
Reply With Quote
  #13 (permalink)  
Old August 2nd, 2008, 02:26 PM
Imar's Avatar
Wrox Author
Points: 67,332, Level: 100
Points: 67,332, Level: 100 Points: 67,332, Level: 100 Points: 67,332, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,231
Thanks: 66
Thanked 1,418 Times in 1,398 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.
Reply With Quote
  #14 (permalink)  
Old August 3rd, 2008, 09:43 AM
Registered User
 
Join Date: Jul 2008
Location: , , .
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
Reply With Quote
  #15 (permalink)  
Old August 3rd, 2008, 09:47 AM
Imar's Avatar
Wrox Author
Points: 67,332, Level: 100
Points: 67,332, Level: 100 Points: 67,332, Level: 100 Points: 67,332, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,231
Thanks: 66
Thanked 1,418 Times in 1,398 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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Web Developer 2008 Express jjc9809 Visual Web Developer 2008 2 December 23rd, 2008 11:06 AM
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 12: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



All times are GMT -4. The time now is 12:03 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.