Problems using __code reference in healthMonitoring/eventMappings

G

Guest

Hi,

Has anyone experienced problems when deploying a web app via VS2005 with
regards health monitoring configuration settings in the web.config? I get a
"could not load file or assembly '__code' or one of its dependencies" error
messege on compilation/deployment.

Here's the config, from the web.config:

<healthMonitoring enabled="true">
<eventMapping>
<add name="Generic Error Handling" type="ErrorHandling, __code"/>
</eventMapping>
<rules>
<add name="Generic Error Handling" eventName="Generic Error Handling"
provider="EventLogProvider"/>
</rules>
</healthMonitoring>

ErrorHandling is a class held in the App_Code directory.

All works ok when I fire up the page with the 'View in browser' option, i.e
when the app fires up in the VS2005 built in virtual web server, but just
won't deploy to the real IIS6 web server, which is on the same local server.

Any help would be much appreciated

--
Regards,
Neil Billingham

P.S. I'm using Visual Studio 2005 Professional Edition (Version 8.0.50727.42
RTM.050727-4200)
 
B

Brock Allen

Yeah, there's some compilation dependency problem in ASP.NET. I've found
that if you comment out the <healthMoniroting> section, run a page, then
uncomment the section again it's all good. Like I said, something about the
app is getting loaded and something in the initialization reads that setting
and needs that class before the initialization has compiled App_Code. Your
best bet would be to not put your WebEvents in App_Code :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top