473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Error writing to the Applicaton Log on a Windows 2003 server

I am having a problem writing errors to the application log on a Windows 2003 server running IIS 6
The error message is "InvalidOperationException: Cannot open log for source {0}."

I have created a Key called "TEST" under the Application in the Registry based on the
microsoft article 329291 and using Solution 1 in that article

In the code I basically do the following

Dim MyLog as new EventLog(
MyLog.Source = "TEST

Then when an error occurs I do thi

MyLog.WriteEntry(MyLog.Source, "ErrorMessage", EventLogEntryType.Error

But I still get the error "InvalidOperationException: Cannot open log for source {0}.
Before I added the Key to the Registry I was getting Registry Access Denied error

Any suggestions????

Nov 22 '05 #1
2 2232
2003 is pretty much locked down by default. This is possibly being caused by
the security policy settings. Can you do the same thing on a W2K server?
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Paul P" <an*******@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
I am having a problem writing errors to the application log on a Windows 2003 server running IIS 6. The error message is "InvalidOperationException: Cannot open log for source {0}."
I have created a Key called "TEST" under the Application in the Registry based on the microsoft article 329291 and using Solution 1 in that article.

In the code I basically do the following:

Dim MyLog as new EventLog()
MyLog.Source = "TEST"

Then when an error occurs I do this

MyLog.WriteEntry(MyLog.Source, "ErrorMessage", EventLogEntryType.Error)

But I still get the error "InvalidOperationException: Cannot open log for source {0}." Before I added the Key to the Registry I was getting Registry Access Denied error.
Any suggestions?????

Nov 22 '05 #2
So it's probably security. You'll need to relax the server's policy to let
you do that.

You'll get a more specific response if you post to one of the Windows
security or admin groups.
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Paul P" <an*******@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com...
No on Win2K which is running IIS 5 it works just fine. No problems writing to the log.
----- Klaus H. Probst wrote: -----

2003 is pretty much locked down by default. This is possibly being caused by the security policy settings. Can you do the same thing on a W2K server?

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Paul P" <an*******@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
> I am having a problem writing errors to the application log on a Windows
2003 server running IIS 6.
> The error message is "InvalidOperationException: Cannot open log
for source {0}." >> I have created a Key called "TEST" under the Application in the Registry
based on the
> microsoft article 329291 and using Solution 1 in that article.
>> In the code I basically do the following:
>> Dim MyLog as new EventLog() > MyLog.Source = "TEST"
>> Then when an error occurs I do this
>> MyLog.WriteEntry(MyLog.Source, "ErrorMessage",
EventLogEntryType.Error) >> But I still get the error "InvalidOperationException: Cannot open

log for source {0}."
> Before I added the Key to the Registry I was getting Registry
Access Denied error. >> Any suggestions?????

>

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Brian Burgess | last post by:
Hi all, Anyone see anything wrong with the following: *************************************************************** <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit Dim nAcctNbr Dim...
3
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application...
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
2
by: Paul P | last post by:
I am having a problem writing errors to the application log on a Windows 2003 server running IIS 6 The error message is "InvalidOperationException: Cannot open log for source {0}." I have created...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
1
by: Keith | last post by:
All, I have been told this is an ASP.NET issue and not an IIS issue, so I am posting this here. I have a problem with ASP.NET returning an HTTP 500 error when trying to run ASPX pages on...
4
by: Matthew Louden | last post by:
My ASP.NET application runs ok locally, but after I upload all the files to IIS in Windows Server 2003 Standard Edition, and no longer works. This has the following error messages: Configuration...
3
by: lodatokab | last post by:
I'm have problem to run crystal report (VS 2005) on my computer with Windows 2000 Server. I run the solution in my dev envroiment (Windows XP) and no problems. When I try to run in on IIS 5.0 on...
1
by: SPJ | last post by:
Sorry, forgot to mention Subject in my earlier post, hence reposting. ------------ I am writing a script which need's to convert an excel file to csv (text) format. For that I am using the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.