Ask a Question related to ASP.NET Security, Design and Development.
-
Jim Ross [MVP] #1
Problem with Exception Mgt. App Block on W2k Server
I'm about at wit's end getting the exception block to operate at all
on our Win 2000 server. All is well on my local workstation, but the
block will not register correctly to operate on the server. Here is
what we have done:
* Xcopied the dll's into our app's bin directory on the server.
* Ran the install util with a bat file located in the bin directory.
the BAT file contains:
===========================
REM *** Batch File to register the ExceptionManagement appblock dll to
allow
REM *** writing to the event log
c:\winnt\microsoft.net\framework\v1.1.4322\install util.exe
microsoft.applicationblocks.exceptionmanagement.dl l
REM Register complete.
pause
=================================
the BAT file returns comforting sounding words, and the actual install
log that gets created also looks "comforting":
==========================================
Installing assembly
'd:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll'.
Affected parameters are:
assemblypath =
d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll
logfile =
d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.InstallLog
Creating EventLog source ExceptionManagerInternalException in log
Application...
Creating EventLog source ExceptionManagerPublishedException in log
Application...
Committing assembly
'd:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll'.
Affected parameters are:
assemblypath =
d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.dll
logfile =
d:\sites\problem-management\wwwroot\cca\bin\microsoft.applicationbl ocks.exceptionmanagement.InstallLog
==============================
BUT, when anything tries to throw an exception, we get the "dreaded":
=======================
"The event source ExceptionManagerInternalException does not exist and
cannot be created with the current permissions
======================
WHAT is going on here? I have seen this error reported frequently, but
in most cases running the installutil seems to clear it up. Here, we
ran installutil, with apparent success to judge from the log, but we
still can't log an exception. I'm sure it is a permissions thing
somewhere, but where? As noted, this is a Win2000 sp3.
Jim Ross
MS MVP [ASP.NET][VC/MFC emeritus]
To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail
Jim Ross [MVP] Guest
-
The server threw an exception. (Exception
I am getting The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) When i try to open any file using Adobe ... -
I've a problem..0x80010105 the server has threw an exception...
Hi! Have you found the solution of the problem? I've got the same thing, when I am trying to get a string from an MFC object I've created. ... -
Exception manegement application block can't write to Windows server 2003
Hi, I have posted a similar question to ASP.Net newsgroup but I found the "EMAB, Impersonation and Event log" question here and decided to ask my... -
Advice on implementing Exception Management Block
Hi There I am busy evaluating using the Exception Management Block in my web app. I have divided my solution into 3 projects. 1) WebApp 2)... -
weird stack trace message from exception thrown in catch block
If I modify my code a bit to set a variable if an exception is caught, then throw the new exception outside of the try/catch block, it seems to... -
MSFT #2
RE: Problem with Exception Mgt. App Block on W2k Server
Hi Jim,
If you use a more powerful account, for example, the System account, will
the error still occur?
Luke
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
MSFT Guest
-
Jim Ross [MVP] #3
Re: Problem with Exception Mgt. App Block on W2k Server
I don't know. Could you tell me how I might try that? I'm afraid that
is an area of .NET that is foreign territory to me.
Note that the block _appears_ to be correctly registered. Even the
correct Registry entries exist.
[email]lukezhan@online.microsoft.com[/email] (MSFT) wrote:
Jim Ross>If you use a more powerful account, for example, the System account, will
>the error still occur?
MS MVP [ASP.NET][VC/MFC emeritus]
To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail
Jim Ross [MVP] Guest
-
MSFT #4
Re: Problem with Exception Mgt. App Block on W2k Server
Hi Jim,
You can configure the process identity in the <processModel> section of the
Machine.config file in the Config subdirectory of the installation root
directory. The userName and the password attributes control the identity of
the process. The default values for these attributes are as follows:
<processModel userName="machine" password="AutoGenerate" />
The machine and the AutoGenerate values instruct ASP.NET to use the
built-in ASPNET account and to use a cryptographically strong, random
password that is stored in the Local Security Authority (LSA) for that
account.
If you want to use a process that has more access rights, you can set the
userName attribute to System, which causes the ASP.NET worker process to
run with the same identity as the Inetinfo.exe process. The Inetinfo.exe
process runs by default as the System identity. When you configure the
ASP.NET worker process to use the System identity, the ASP.NET worker
process can access almost all of the resources on the local computer. On
computers that are running Windows 2000 or Windows XP, the System account
also has network credentials and can access network resources as the
machine account.
For more information about <processModel> Element:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht[/url]
ml/gngrfprocessmodelsection.asp
Luke
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
MSFT Guest
-
Jim Ross [MVP] #5
Re: Problem with Exception Mgt. App Block on W2k Server
Yes, I _could_ take that approach, but since my original post I'be
been reading up on these issues, and according to an MS Press book on
building secure ASP.NET apps, the preferred approach for this specific
sort of issue is to grant the ASPNET account the needed access. The
idea being--just as much access as is needed and not a bit more.
Sounds reasonable.
What is so maddening is that I HAVE granted it Registry access to the
needed keys. I can look at it in RegEdt32, and there it is, ASPNET has
the exact access the books says it needs, but as soon as I try to log
an exception, it gets "Registry access denied". It seems reasonable to
assume, at this point, that the domain security policies are somehow
overriding what I'm trying to do.
[email]lukezhan@online.microsoft.com[/email] (MSFT) wrote:Jim Ross>You can configure the process identity in the <processModel> section of the
>Machine.config file in the Config subdirectory of the installation root
>directory. The userName and the password attributes control the identity of
>the process. The default values for these attributes are as follows:
>
MS MVP [ASP.NET][VC/MFC emeritus]
To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail
Jim Ross [MVP] Guest
-
Joe Audette #6
Problem with Exception Mgt. App Block on W2k Server
I think the reason your batch file doesn't work is
because you have to use the VS.NET command prompt to run
the installutil not just a regular command prompt. The
VS.NET command line set up environment variables that are
needed. I know there is a way to do it with a regular
command prompt but you have to setup the environment
variables that the VS.NET command prompt would do for you.
Best Regards,
Joe Audette
operate at all>-----Original Message-----
>I'm about at wit's end getting the exception block toworkstation, but the>on our Win 2000 server. All is well on my localserver. Here is>block will not register correctly to operate on theserver.>what we have done:
>
>* Xcopied the dll's into our app's bin directory on thebin directory.>* Ran the install util with a bat file located in theappblock dll to>the BAT file contains:
>===========================
>REM *** Batch File to register the ExceptionManagement\installutil.exe>allow
>REM *** writing to the event log
>c:\winnt\microsoft.net\framework\v1.1.4322actual install>microsoft.applicationblocks.exceptionmanagement.d ll
>REM Register complete.
>pause
>=================================
>
>the BAT file returns comforting sounding words, and themanagement\wwwroot\cca\bin\microsoft.applicationbl ocks.exc>log that gets created also looks "comforting":
>
>==========================================
>Installing assembly
>'d:\sites\problem-
eptionmanagement.dll'.management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc>Affected parameters are:
> assemblypath =
>d:\sites\problem-
eptionmanagement.dllmanagement\wwwroot\cca\bin\microsoft.applicationbl ocks.exc> logfile =
>d:\sites\problem-
eptionmanagement.InstallLogExceptionManagerInternalException in log>Creating EventLog sourceExceptionManagerPublishedException in log>Application...
>Creating EventLog sourcemanagement\wwwroot\cca\bin\microsoft.applicationbl ocks.exc>Application...
>Committing assembly
>'d:\sites\problem-
eptionmanagement.dll'.management\wwwroot\cca\bin\microsoft.applicationbl ocks.exc>Affected parameters are:
> assemblypath =
>d:\sites\problem-
eptionmanagement.dllmanagement\wwwroot\cca\bin\microsoft.applicationbl ocks.exc> logfile =
>d:\sites\problem-
eptionmanagement.InstallLogthe "dreaded":>==============================
>
>BUT, when anything tries to throw an exception, we getnot exist and>=======================
>"The event source ExceptionManagerInternalException doesfrequently, but>cannot be created with the current permissions
>======================
>
>WHAT is going on here? I have seen this error reportedup. Here, we>in most cases running the installutil seems to clear itlog, but we>ran installutil, with apparent success to judge from thepermissions thing>still can't log an exception. I'm sure it is abut please ask all questions in the newsgroups, not via>somewhere, but where? As noted, this is a Win2000 sp3.
>
>Jim Ross
>MS MVP [ASP.NET][VC/MFC emeritus]
>
>To send email, change 'lotsofspamthroughhere' to 'msn'
private mail>.
>Joe Audette Guest
-
MSFT #7
Re: Problem with Exception Mgt. App Block on W2k Server
Hi Jim,
There may be some other registry entries on which we need permission. To
make sure this, you may use a tool "regmon" to trace the access to
registry. It will log all access to registry. When the error occur, you can
check its log to see if there is any permission denied error on the
registry. For more information on this tool, you can browse to:
[url]www.systeminternals.com[/url]
Luke
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
MSFT Guest



Reply With Quote

