 |
| .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
|
|
|
|

August 2nd, 2008, 12:26 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

August 2nd, 2008, 02:19 PM
|
|
Registered User
|
|
Join Date: Jul 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

August 2nd, 2008, 02:26 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

August 3rd, 2008, 09:43 AM
|
|
Registered User
|
|
Join Date: Jul 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
 |