We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles
getting the ASP.NET app. to write to the event log when accessing the web
site from a separate client computer.
Here's some details:
Server and client computers both in the same workgroup
Logged into server as local Administrator
Logged into client as a local user that is only in the Users group on the
client computer
The local user on the client is also defined as a local user on the server
with same name and password (and only in the Users group on the server too)
Server is Windows Server 2003 running IIS 6.0
Client is Windows XP Professional
ASP.NET 2.0 (C#) web site - intranet only, not a public Internet web site
Web.config snippet
<system.web>
<authenticati on mode="Windows"/>
<identity impersonate="tr ue"/>
</system.web>
..aspx code-behind code snippet
string exceptionInfo = "Testing WriteToEventLog ";
System.Diagnost ics.EventLog log = new System.Diagnost ics.EventLog();
log.Log = "Applicatio n";
log.Source = "Applicatio n";
try
{
// EXCEPTION happens here
log.WriteEntry( exceptionInfo,
System.Diagnost ics.EventLogEnt ryType.Error);
}
finally
{
log.Close();
log.Dispose();
}
The exception details are: System.Componen tModel.Win32Exc eption: Access is
denied (Cannot open log for source 'Application'. You may not have write
access.)
From the client computer, I can navigate to the site and do whatever without
any problems. But, when the site tries to write to the event log on the
server for the session started by the client in the scenario described
above, it fails.
Basically, this is supposed to be an exception notification thing.
What's wrong? Am I missing something? How can I make the above scenario
work?
Thanks. 2 1750
What account is your ASP.Net app running under? It is that account that
doesn't have permission.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"orp" <no****@company .com> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. .. We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles getting the ASP.NET app. to write to the event log when accessing the web site from a separate client computer.
Here's some details:
Server and client computers both in the same workgroup Logged into server as local Administrator Logged into client as a local user that is only in the Users group on the client computer The local user on the client is also defined as a local user on the server with same name and password (and only in the Users group on the server too) Server is Windows Server 2003 running IIS 6.0 Client is Windows XP Professional ASP.NET 2.0 (C#) web site - intranet only, not a public Internet web site
Web.config snippet <system.web> <authenticati on mode="Windows"/> <identity impersonate="tr ue"/> </system.web> .aspx code-behind code snippet string exceptionInfo = "Testing WriteToEventLog "; System.Diagnost ics.EventLog log = new System.Diagnost ics.EventLog(); log.Log = "Applicatio n"; log.Source = "Applicatio n";
try { // EXCEPTION happens here log.WriteEntry( exceptionInfo, System.Diagnost ics.EventLogEnt ryType.Error); } finally { log.Close(); log.Dispose(); }
The exception details are: System.Componen tModel.Win32Exc eption: Access is denied (Cannot open log for source 'Application'. You may not have write access.)
From the client computer, I can navigate to the site and do whatever without any problems. But, when the site tries to write to the event log on the server for the session started by the client in the scenario described above, it fails.
Basically, this is supposed to be an exception notification thing.
What's wrong? Am I missing something? How can I make the above scenario work?
Thanks.
Thanks. I'm not sure what account my ASP.NET app is running under. How can
I tell?
I can tell you this, however. It works fine if I log into the client as a
user in the client's local Administrators group (the user is also in the
Administrators group on the server).
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:uy******** ******@TK2MSFTN GP02.phx.gbl... What account is your ASP.Net app running under? It is that account that doesn't have permission.
-- HTH,
Kevin Spencer Microsoft MVP Professional Numbskull
Hard work is a medication for which there is no placebo.
"orp" <no****@company .com> wrote in message news:%2******** ********@TK2MSF TNGP04.phx.gbl. .. We are developing an ASP.NET 2.0 (C#) application, and I'm having
troubles getting the ASP.NET app. to write to the event log when accessing the
web site from a separate client computer.
Here's some details:
Server and client computers both in the same workgroup Logged into server as local Administrator Logged into client as a local user that is only in the Users group on
the client computer The local user on the client is also defined as a local user on the
server with same name and password (and only in the Users group on the server too) Server is Windows Server 2003 running IIS 6.0 Client is Windows XP Professional ASP.NET 2.0 (C#) web site - intranet only, not a public Internet web
site
Web.config snippet <system.web> <authenticati on mode="Windows"/> <identity impersonate="tr ue"/> </system.web> .aspx code-behind code snippet string exceptionInfo = "Testing WriteToEventLog "; System.Diagnost ics.EventLog log = new System.Diagnost ics.EventLog(); log.Log = "Applicatio n"; log.Source = "Applicatio n";
try { // EXCEPTION happens here log.WriteEntry( exceptionInfo, System.Diagnost ics.EventLogEnt ryType.Error); } finally { log.Close(); log.Dispose(); }
The exception details are: System.Componen tModel.Win32Exc eption: Access
is denied (Cannot open log for source 'Application'. You may not have
write access.)
From the client computer, I can navigate to the site and do whatever without any problems. But, when the site tries to write to the event log on the server for the session started by the client in the scenario described above, it fails.
Basically, this is supposed to be an exception notification thing.
What's wrong? Am I missing something? How can I make the above
scenario work?
Thanks.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ollie |
last post by:
okay sorry for cross posting but want to see if any one can explain the
solution to this problem for me:
I have a .Net ASP.Net app written in C# that use COM+ components to do some
business processing......
When I have the ASP.Net website and the COM+ components installed on the
same machine (i.e everything local) it all works fine, and it can write to
the event log....
|
by: MattC |
last post by:
I have some code that correctly writes to the eventlog on my local machine.
I have installed the application on the Live server and all is not well, no
event log entries.
My development box config is as follows:
Windows XP Pro running IIS 5.1
Web app using integrated auth using a local user account
Account has admin right over machine.
Entry has been placed in registry in
|
by: MattB |
last post by:
I'm writing some code to log errors in a web app (vb/asp.net). I found a
straightforward-looking example here:
http://www.c-sharpcorner.com/Code/2002/May/CustomErrorHandlingASPNEt.asp
But mine doesn't seem to be working.
If I step through the code I put in global.asax.vb it seems to get to
the line where it checks for the existence of the log and then returns
without writing anything to the event log. I don;t know why or how to...
|
by: Tom Wingert |
last post by:
Hi,
I am having a problem with getting My.Log.WriteException to write to the
Event Log in ASP.Net 2.0 with a web service.
When an error occurs, My.Log.WriteException doesn't log anything to the
Event Log. Played around with it and ended up adding the following listeners
to catch and write to the event log by adding the following code in the
web.config:
<system.diagnostics>
|
by: rekaeps |
last post by:
We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles
sending e-mail from the server when accessing the web site from a separate
client computer. Also, in the same scenario, I'm having trouble writing to
the server's event log.
Here's some details:
Server and workstation both in the same workgroup
Logged into server as local Administrator
Logged into workstation as a local user that is only in the Users group on
| |
by: JeffDotNet |
last post by:
Writing to a registered source in the Application event log
I have an asp.net framework 2.0 app that I created on a winxp machine and
now I am deploying it to IIS6 on a win server2003 machine. This application
has to write to the application event log.
After deployment of the application I have verified that my source
“MySource” exists in the Application event log. I then wrote some text to
the event source in a forms app and...
|
by: Peter Bradley |
last post by:
Hi,
I have a Web Service that has been running on a server for a couple of
years. I now have to redeploy it to another server. Everything is fine
except that the Web Service cannot write to its log on the new server.
As part of the redeployment, I created the event log on the server for
the Web service to write to, so I don't understand what the problem can
be. I also checked the permissions on the Web service and couldn't find...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |