Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > newbie question (Failed to update database)

Reply
Thread Tools

newbie question (Failed to update database)

 
 
=?Utf-8?B?bWF1cmljaW9hZ2xy?=
Guest
Posts: n/a
 
      05-04-2005
Please Help,

I am using Visual Web Developer 2005 Express and downloaded the personal
website template. I published it and get the following error:

Failed to update database "..\ASPNETDB.MDF" because the database is read-only.

[SqlException (0x80131904): Failed to update database
"C:\INETPUB\WEBS\PERSONAL\APP_DATA\ASPNETDB.MD F" because the database is
read-only.]
System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
Boolean breakConnection) +786274
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +684886

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj) +207
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1751
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString) +107
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
+570
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
DbAsyncResult result) +134
System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
System.Web.Security.SqlMembershipProvider.CheckPas sword(String username,
String password, Boolean updateLastLoginActivityDate, Boolean
failIfNotApproved, String& salt, Int32& passwordFormat) +1861
System.Web.Security.SqlMembershipProvider.CheckPas sword(String username,
String password, Boolean updateLastLoginActivityDate, Boolean
failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.Validate User(String username,
String password) +78
System.Web.UI.WebControls.Login.OnAuthenticate(Aut henticateEventArgs e)
+161
System.Web.UI.WebControls.Login.AttemptLogin() +94
System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs e)
+101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.ImageButton.OnCommand(Co mmandEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBac kEvent(String
eventArgument) +146

System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5670

--
Mauricio
 
Reply With Quote
 
 
 
 
=?Utf-8?B?bGF0aGEgdmFsbGluYXlhZ2Ft?=
Guest
Posts: n/a
 
      05-05-2005
ok for the access database. when you are doing an update or any querying the
database using asp.net, the microsoft access database should not be opened in
a seperate window. then check if its really read only. and then add the
aspnet, iis_*** users and give read, write and read and execute access. hope
this helps
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Um9jayBSLg==?=
Guest
Posts: n/a
 
      05-24-2005
After creating a new personal website using visual web developer 2005 beta 2,
I get the same exact error.

You are able to get to the login screen and enter a user name and password.
After hitting the login button, you get that error.

I have tried permissions in IIS and at the file system level (NTFS), but to
no avail.

IUnfortunately, Latha V.'s post was too vague for me to be useful. I have
no access db window open, its using SQL express.

Any help would be appreciated.



 
Reply With Quote
 
Riki
Guest
Posts: n/a
 
      05-27-2005
"Rock R." <Rock (E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> After creating a new personal website using visual web developer 2005 beta
> 2,
> I get the same exact error.
>
> You are able to get to the login screen and enter a user name and
> password.
> After hitting the login button, you get that error.
>
> I have tried permissions in IIS and at the file system level (NTFS), but
> to
> no avail.
>
> IUnfortunately, Latha V.'s post was too vague for me to be useful. I have
> no access db window open, its using SQL express.



The workaround that solved it for me was the following:
- create a new website
- set the ACL permissions on the App_Data folder BEFORE creating
the membership provider
- create the membership provider (in VWD with Website/ASP.NET Configuration)
- copy over all the files from the existing website

Riki


 
Reply With Quote
 
=?Utf-8?B?Um9jayBSLg==?=
Guest
Posts: n/a
 
      05-27-2005
Thanks Riki, but I am still getting that error. Here's what I do:

OS= Windows XP Pro 5.1 SP2
DB=SQL Server 2005 (express)
Visual web developer 2005 express
Webserver=IIS v5.1
Framework=.Net Framework 2.0

1) Set ACL on C:\Inetpub\wwwroot to give ASPNET full permission
2) Start VWD and create a new personal website
3) Set the ACL on c:\documents and settings\user\my documents\visual
studio\websites\website1 to give ASPNET full permission
4) Open VWD and run website->asp.net config
5) Problem 1: there are no roles defined as the documentation describes. So
I create a role for Administrators and a role for Friends
6) I then add a user and select it both roles defined above.
7) I verify permissions on my documents\visual
studio\websites\website1\App_data and all files contained under it that
ASPNET group has full permissions.
I publish the website in VWD to c:\inetpub\wwwroot
9) I verify that c:\inetpub\wwwroot\app_data gives ASPNET full control
10) I bring up IE and connect to localhost......long pause before first web
page of the personal site come up. I login using my admin account I created
and I get:
Failed to update database "C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF" because
the database is read-only.
11) I try to delelete the file C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF but
it is use by another process
12) I bring up a task list and notice that there are several SQLSERVR.EXE
running, but only one running as ASPNET. So, I end that process.
13) I then delete the aspnetdb.mdf file with no hitches, so I know it is
connecting to the database as ASPNET, but I can't get it to connect
read-write.

Anyone have any thoughts?
 
Reply With Quote
 
Arian T. Kulp
Guest
Posts: n/a
 
      06-02-2005
I also had this problem. In my case it isn't the MDF created by the
membership provider though. It's a custom MDF that I dragged in there. I
have decided to just give up and attach it to the default SQL Server
instance on the server and attach to it as a shared database. It's ok since
it's my own server, but definitely not my preference.

-Arian

"mauricioaglr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Please Help,
>
> I am using Visual Web Developer 2005 Express and downloaded the personal
> website template. I published it and get the following error:
>
> Failed to update database "..\ASPNETDB.MDF" because the database is
> read-only.
>
> [SqlException (0x80131904): Failed to update database
> "C:\INETPUB\WEBS\PERSONAL\APP_DATA\ASPNETDB.MD F" because the database is
> read-only.]
> System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
> Boolean breakConnection) +786274
> System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
> exception, Boolean breakConnection) +684886
>
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj) +207
> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
> cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj) +1751
> System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds,
> RunBehavior runBehavior, String resetOptionsString) +107
> System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
> +570
> System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
> DbAsyncResult result) +134
> System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult
> result, String methodName, Boolean sendToPipe) +415
> System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
> System.Web.Security.SqlMembershipProvider.CheckPas sword(String username,
> String password, Boolean updateLastLoginActivityDate, Boolean
> failIfNotApproved, String& salt, Int32& passwordFormat) +1861
> System.Web.Security.SqlMembershipProvider.CheckPas sword(String username,
> String password, Boolean updateLastLoginActivityDate, Boolean
> failIfNotApproved) +42
> System.Web.Security.SqlMembershipProvider.Validate User(String username,
> String password) +78
> System.Web.UI.WebControls.Login.OnAuthenticate(Aut henticateEventArgs e)
> +161
> System.Web.UI.WebControls.Login.AttemptLogin() +94
> System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs
> e)
> +101
> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
> +35
> System.Web.UI.WebControls.ImageButton.OnCommand(Co mmandEventArgs e) +115
> System.Web.UI.WebControls.ImageButton.RaisePostBac kEvent(String
> eventArgument) +146
>
> System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) +7
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument) +11
> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5670
>
> --
> Mauricio



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update On The Windows Phone 7 Update Update Lawrence D'Oliveiro NZ Computing 2 02-25-2011 08:03 AM
installation update newbie question marcoa Ruby 1 05-06-2008 12:14 PM
newbie question: gridview, how to automatically update all fields Mark ASP .Net 1 01-24-2008 04:00 PM
[Vb.net question] how to apply online update function into program (the effect just like Norton system work live update) chan ASP .Net 1 03-04-2004 02:58 PM
dumb newbie question (or newbie dumb question) Jerry C. Perl Misc 8 11-23-2003 04:11 AM



Advertisments