Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 July 5th, 2003, 11:50 AM
Authorized User
 
Join Date: Jul 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default EntryToLog.aspx -- security error

I tried to run this example (EntryToLog.aspx, chapter 17) in the book "Beginning ASP.NET 1.0 w/VB.Net" and I rec'd an error message saying I need to "change the application's trust level in the configuration file"; and under exception details it says "requested registry access is not allowed".

Can anyone advise me how to enable this so I can run the example ?

Thx much....

R Corcoran, Jr.
__________________
Reid C.
 
Old July 23rd, 2003, 11:14 PM
Authorized User
 
Join Date: Jul 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try changing the "userName" in the <processModel> node in your machine.config file(not web.config) to userName="SYSTEM", instead of userName="machine". This worked for me. If your using .net 1.1 the <processModel> node should be on line 354. There was a note that is directly above line 354, in case your running IIS 6. that reads:
"When ASP.NET is running under IIS 6 in native mode, the IIS 6 process model is used and settings in this section are ignored. Please use the IIS administrative UI to configure things like process identity and cycling for the IIS worker process for the desired application"

Make sure you reboot your computer, for the change to take effect.

Good Luck,
D.
 
Old July 24th, 2003, 01:04 AM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default

Hi,

Take note, however, that changing the <processModel> userName in machine.config to SYSTEM poses a security risk. You may also want to put the following into your application's web.config file:

    <identity impersonate="true" />


Cheers!
Marlon
 
Old July 24th, 2003, 05:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

Corcoran,
Marlon has a right, it is recommended to use impersonation. In that way you force aspnet process to run under Windows logon account. So, you can then assign requested permissions to this account.
Unfortunately, I have not this book, but I suppose that your app try to write something in Application log. That suppose that your app account has write permission on
Code:
C:\WINNT\system32\config\AppEvent.Evt
file. So, you have to add write permission to the account u use for aspnet process execution on this file. Be ensure that your IIS disallow an anonymous access.
Regards,
NNJ

...but the Soon is eclipsed by the Moon





Similar Threads
Thread Thread Starter Forum Replies Last Post
Security Exception Error nici ASP.NET 2.0 Basics 0 May 23rd, 2007 12:03 PM
Security error reggie213 ASP.NET 1.0 and 1.1 Basics 0 April 6th, 2006 07:56 AM
System.Security.SecurityException: Security error coolcatjk Pro VB.NET 2002/2003 4 March 2nd, 2006 06:00 PM
Ch17-entrytolog security problem gcook BOOK: Beginning ASP.NET 1.0 4 August 2nd, 2003 09:42 PM





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