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 October 4th, 2004, 04:47 PM
Authorized User
 
Join Date: Oct 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Installation trouble

I am having trouble installing the Phile application. did every step but no luck. If anyone can help, would be much much appreciated.

================================================== ==============

Server Error in '/thephile' Application.
--------------------------------------------------------------------------------

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Requested registry access is not allowed.

Source Error:


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


Source File: C:\wrox\thephile\PhilePage.cs Line: 31


 
Old October 4th, 2004, 09:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This has been discussed here many times. The ASPNET userid doesn't have permission to create an event source in ASP.NET v1.1 (the book was written for 1.0).

The readme.htm file in the code download tells you to change machine.config to cause ASP.NET to run with the system account.

I prefer to tell people to create the event source themselves outside of a web application, but keep using the ASPNET user account for the application. This is a more secure solution.

The ideal solution for many of us is to change it to log errors to a file, since we can't use the EventLog on a hosted website. The VB.NET code download explains this change.

Eric
 
Old October 5th, 2004, 08:33 AM
Authorized User
 
Join Date: Oct 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your reply. But I am using asp.net 1.0. did change the machine.config file user name to system. this is my own machine so i have all the permissions i need. not sure what I am doing wrong.

is there more documentation available anywhere else..cause the ones around i looked didn't solve the the issue.

any thoughts would be much much appreciated.





 
Old October 5th, 2004, 02:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmmm...are you using WinXP SP2?

Eric
 
Old October 6th, 2004, 09:09 AM
Authorized User
 
Join Date: Oct 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using windows 2000 advanced server, SQL 2000.



 
Old October 6th, 2004, 04:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make yourself a C# console application like this and run it. Tell me if you get any errors. If you don't get any errors, then check your Windows event log to see if it has the event we're writing. If it does have the event, then run your web app again and see if it works.

using System;
using System.Diagnostics;
using System.Threading;

class MySample
{

    public static void Main()
    {

        // Create the source, if it does not already exist.
        if (EventLog.SourceExists("ThePhile.COM"))
        {
            Console.WriteLine("Source already exists");
        }
        else
        {
            EventLog.CreateEventSource("ThePhile.COM", "Application");
            Console.WriteLine("CreatingEventSource");
        }

        // Create an EventLog instance and assign its source.
        EventLog myLog = new EventLog();
        myLog.Source = "ThePhile.COM";

        // Write an informational entry to the event log.
        myLog.WriteEntry("ThePhile test message");

        Console.Write("Message written to eventlog. Press Enter...");
        Console.ReadLine();
    }
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Directory tna55 ASP.NET 2.0 Basics 2 March 20th, 2007 07:10 AM
Multiserver installation armandocs BOOK: Professional Team Foundation Server ISBN: 0-471-91930-6 2 February 14th, 2007 11:03 AM
How to know/identify that installation is done shiby_chacko1@rediffmail. C# 1 March 30th, 2005 03:21 AM
Installation Problems Brian.Boyle Linux 1 November 7th, 2003 05:22 PM





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