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

February 4th, 2004, 12:34 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|

February 4th, 2004, 12:45 PM
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

February 4th, 2004, 12:46 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|

February 4th, 2004, 12:48 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|

February 4th, 2004, 01:09 PM
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

February 4th, 2004, 01:19 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|
 |