Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: ASP.NET Website Programming Problem-Design-Solution
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 24th, 2003, 02:33 AM
Registered User
 
Join Date: Jul 2003
Location: shenzhen, guangdong, China.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to crystallac
Default The Security problem in running ThePhile web APP

hi, the error:
¡°/ThePhile¡±Ó¦ÓóÌÐòÖеķþÎñÆ÷´ íÎó¡£
--------------------------------------------------------------------------------

°²È«ÐÔÒì³£
˵Ã÷: Ó¦ÓóÌÐòÊÔͼִÐа²È«²ßÂÔ² »ÔÊÐíµÄ²Ù×÷¡£ÒªÊÚÓè´ËÓ¦Óà ³ÌÐòËùÐèµÄȨÏÞ£¬ÇëÓëϵͳ¹ ÜÀíÔ±ÁªÏµ£¬»òÔÚÅäÖÃÎļþÖÐ ¸ü¸Ä¸ÃÓ¦ÓóÌÐòµÄÐÅÈμ¶±ð¡ £

Òì³£ÏêϸÐÅÏ¢: System.Security.SecurityException: ²»ÔÊÐíËùÇëÇóµÄ×¢²á±í·ÃÎÊÈ ¨¡£

Ô´´íÎó:


ÐÐ 29£º if (!EventLog.SourceExists("ThePhile.COM"))
ÐÐ 30£º {
ÐÐ 31£º EventLog.CreateEventSource("ThePhile.COM", "Application");
ÐÐ 32£º }
ÐÐ 33£º EventLog.WriteEntry("ThePhile.COM", message, entryType);


Ô´Îļþ: E:\wrox\ThePhile\PhilePage.cs ÐÐ: 31

¶ÑÕ»¸ú×Ù:


[SecurityException: ²»ÔÊÐíËùÇëÇóµÄ×¢²á±í·ÃÎÊÈ ¨¡£]
   Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
   System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName, String machineName, Boolean useMutex) +445
   System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName, String machineName) +11
   System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName) +11
   Wrox.ThePhile.Web.PhilePage.LogEvent(String message, EventLogEntryType entryType) in E:\wrox\ThePhile\PhilePage.cs:31
   Wrox.ThePhile.Web.PhilePage.PhilePage_Error(Object sender, EventArgs e) in E:\wrox\ThePhile\PhilePage.cs:54
   System.Web.UI.TemplateControl.OnError(EventArgs e) +109
   System.Web.UI.Page.HandleError(Exception e) +68
   System.Web.UI.Page.ProcessRequestMain() +2065
   System.Web.UI.Page.ProcessRequest() +117
   System.Web.UI.Page.ProcessRequest(HttpContext context) +18
   System.Web.CallHandlerExecutionStep.Execute() +179
   System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +87




--------------------------------------------------------------------------------
°æ±¾ÐÅÏ¢: Microsoft .NET ¿ò¼Ü°æ±¾:1.0.3705.0; ASP.NET °æ±¾:1.0.3705.0
  #2 (permalink)  
Old July 24th, 2003, 04:07 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Your post looks quite messy, so I couldn't read it. However, the code looks OK and it makes me suspect that the error message you get get is about security issues for the ASPNET account. It probably can't create the Event Log "ThePhile.COM", right?

Take a look here. At the end of that post, I recommend to create the Event Log at design time and just use it at Run time.

HtH

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #3 (permalink)  
Old July 25th, 2003, 05:48 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Note: if you have created a new website and want to use thephile log in.
You may want to make sure that your websites Directory Security settings in IIS have anonymous access unchecked. Compare your site by looking at the thephile IIS settings, by bringing up Properties when your in Internet Information Services, goto Directory Security, click Edit under Annonymous access and authentication control, then check to see if the Annonymous access check box is checked or not. For your site to work properly you may need to have the check box unchecked.

I was having all sorts of problems with the eventlog when building the site from scratch, and keeping a database connection, when running the site(with the eventlog stuff commented out). Once I unchecked Annonymous access in IIS, the problems went away.(for now anyway!)
  #4 (permalink)  
Old July 28th, 2003, 01:22 AM
Registered User
 
Join Date: Jul 2003
Location: shenzhen, guangdong, China.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to crystallac
Default

Hi,Imar and developerz:
       Thank you very much!
       The way of Imar is effective for this problem.
       now thePhile is running right! Thanks!
       I'm sorry for my poor english.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem running app with ASP.NET akhilvira ASP.NET 1.0 and 1.1 Basics 1 January 14th, 2005 09:53 AM
How to see if an app is running from a web page darkhalf Javascript 9 October 21st, 2004 11:30 AM
Help - Getting my .ASP web app running on Unix ocarroll Classic ASP Databases 7 July 23rd, 2004 07:25 AM
Problem running web App rwalker ASP.NET 1.0 and 1.1 Basics 1 February 27th, 2004 01:29 PM
Problems running ThePhile web app kiekar BOOK: ASP.NET Website Programming Problem-Design-Solution 5 July 24th, 2003 07:39 PM



All times are GMT -4. The time now is 12:12 AM.


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