Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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 February 4th, 2004, 12:34 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, the "except" part is a bit tricky here. ;)

The EventSource code simply won't run with a default setup. The ASPNET account and the IUSR_MachineName do not have sufficient permissions to the registry to create a new Event source. So, whatever you try, the code won't run. Since this code fires whenever another error occurred, it's likely this is a problem.

Either comment out the code as per my previous post, or grant access to the necessary registry keys for the IUSR account.

The same is true for the database. If your application is not allowed to access the database, the Web application won't run successfully.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old February 4th, 2004, 12:45 PM
Registered User
 
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have commented out the EventSource code, only in two locations I could find? Using a "Find in files" search through the entire project, subfolders included.

Thanks,
Mike
 
Old February 4th, 2004, 12:46 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

One more thing: Which accounts did you grant access to the WIndows temp folder? Since the site is using impersonation, it won't run under the default ASPNET account, but under IUSR_MachineName. This account needs access as well.

Take a look here: http://www.dotnet247.com/247referenc...31/157002.aspx

Is this the problem you're encountering?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old February 4th, 2004, 12: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

There are three of them. Search for SourceExists and you'll find:

- Global.asax.cs
- ThePhile\PhilePage.cs
- AppException.cs

Did you see the additional instructions by Ankur Verma in the readme in the code download?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old February 4th, 2004, 01:09 PM
Registered User
 
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

HURRAY! We've got it sorted.
I changed the impersonation value to "false" and it works!
Thank you so much for all your help it's very much appreciated.

Does the changing of impersonation have any security implications I should be made aware of?
Why was it set to "true"?

Many thanks,
Mike
 
Old February 4th, 2004, 01:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

To be honest, I don't know.
AFAIK, ASP.NET was designed to use the ASPNET account, a least privilege account. This means that by default, things should work and be safe out of the box.

You usually won't need to enable impersonation for a site that uses anonymous access. In that case, just the ASPNET account is used. If you want to use the original callers security context, you'll need to disable anonymous access and enable impersonation. That's one of the few (only??) reasons I would use impersonation, but maybe the original authors required the IUSR account somehow....

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ThePhile project installation eugz BOOK: ASP.NET Website Programming Problem-Design-Solution 14 November 14th, 2006 02:27 PM
Error restoring thePhile DB dinble BOOK: ASP.NET Website Programming Problem-Design-Solution 1 March 20th, 2006 07:58 AM
ThePhile - Access Error to XML file cewekoolz BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 16th, 2005 02:16 AM
Error while running/executing project thePhile seetha_l BOOK: ASP.NET Website Programming Problem-Design-Solution 0 June 11th, 2004 11:31 AM
ThePhile: Restoring Database mbschmitt BOOK: ASP.NET Website Programming Problem-Design-Solution 2 July 29th, 2003 07:58 AM





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