473,394 Members | 1,916 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,394 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 2233
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.