Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 June 8th, 2006, 07:49 AM
Authorized User
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now I'm getting a Read-Only Error. Again, I'm running IIS on my XP laptop. Any idea about this error. By the way, I have been reading the book. My expectation was that I would be able to get the samples running straight away. I'm not thick, I'm an MCSD!

Anyway, I appreciate your help. I'm just getting a bit frustrated. I've read pages 162-163.

latest error, after allowing anonymous in admin web.config.

Server Error in '/PhotoGallery' Application.
Failed to update database "C:\INETPUB\WWWROOT\PHOTOGALLERY\APP_DATA\PHOTODB. MDF" because the database is read-only.


 
Old June 8th, 2006, 08:54 AM
Authorized User
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Imar,

Just an aside. I created the Personal Starter Kit Website in VS 2005. This worked perfectly. All in less than 5 minutes. IIS and the database files are working fine.

So I assume my IIS/Sql components, along with XP are configured correctly. I would like to run through some of your book's samples but it's hard to justify spending more time trying to get the samples to run correctly.

 
Old June 8th, 2006, 12:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Just kidding about reading; didn't want to offend you, nor say you're thick....

Anyway, to what accounts did you grant permissions on the App_Data folder?

Another thing you can try is to open the application directly from within Visual Web Developer. That is, choose File | Open website, then browse to the location where you installed the site (most like: c:\inetpub\wwwroot\PhotoAlbum) and then run it by hitting Ctrl+F5. Does that work?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old June 8th, 2006, 12:40 PM
Authorized User
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tried running it in Visual Studio ctrl+f5, same thing.

the App_Data folder

Internet Guest Accout (IUSR_THINKPADT43) has R,W
Everyone - R
Administrators - Full Control

Weird, everytime I try to clear the R/Only flag on the folder, it's back. But all the database files are flagged R/W.
----------------------
 Failed to update database "C:\INETPUB\WWWROOT\PHOTOGALLERY\APP_DATA\PHOTODB. MDF" because the database is read-only.


 
Old June 8th, 2006, 01:20 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

For ASP.NET, the IUSR account is not used; at least not by default.

Instead of the IUSR account, you need to grant permissions to either the ASPNET or Network Service account. Refer to page 163 for more details.

I think the read-only flag is a problem / bug in Windows. It's not really read-only, but somehow you get the intermediate state check box every time you open the Properties dialog.

But, adding the right account instead of IUSR should fix these problems...

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old June 8th, 2006, 01:40 PM
Authorized User
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. In IIS 5.1 under XP. Is this correct.
----------------------------------------
In IIS, Directory Security Tab...the Authentication Methods Dialog:

Anonymous access: Checked
Accout used for anonymous access:
ASPNET

Allow IIS to control password.
-------------------------------------
Virtual Directory - Only Read Access

--------------------------
In Windows Explorer - App_Data Directory - Under Security

Add ASPNET account with R/W access only
What should the Everyone account have?? Just Read?
---------------------------------------
Thanks for your time on this.

 
Old June 8th, 2006, 01:48 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You don't have to change the anonymous account from IUSR to ASPNET in IIS; ASPNET will be used anyway, regardless of this setting (unless you use impersonation which is not the case with the applications from the book).

Besides Read access in IIS<, also make sure that Execute Permissions is set to at least Scripts Only.

For the App_Data folder: only the ASPNET account needs read and write permissions (it also needs read permissions on the root folder for the site). You can safely remove the Everyone account...

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old June 8th, 2006, 01:59 PM
Authorized User
 
Join Date: Jun 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That did it. Thanks for your patience on this.

Cheers.

 
Old June 8th, 2006, 02:02 PM
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.... How's that for Instant Results, he?? ;)

Fortunately, none of this had to do with the code in the book, but mainly with configuring the system. We tried to address these issues in the book, but apparently, things are not clear enough for everyone....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Blood by Editors (Track 3 from the album: The Back Room) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
how cache works Maxxim BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 October 30th, 2007 01:09 PM
Works in IE but not in FF sofiacole Pro JSP 1 September 12th, 2007 11:20 PM
Error but it works Mitch PHP Databases 2 June 4th, 2006 09:25 AM
works bryan.lugo Excel VBA 0 April 19th, 2006 02:47 PM





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