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

July 24th, 2003, 02:33 AM
|
|
Registered User
|
|
Join Date: Jul 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

July 24th, 2003, 04:07 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

July 25th, 2003, 05:48 AM
|
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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!)
|
|

July 28th, 2003, 01:22 AM
|
|
Registered User
|
|
Join Date: Jul 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|
 |