| Author |
Message |
ChristianWeyer
Joined: 08 Oct 2009 Posts: 4
|
Posted: Thu Oct 08, 2009 12:08 pm Post subject: "Bad unmanaged code entry point" |
|
|
When I try to profile my WCF service host application (this one is a console app) I get this exception:
---
System.Configuration.ConfigurationErrorsException was unhandled
Message="An error occurred creating the configuration section handler for system.serviceModel/behaviors: Bad unmanaged code entry point. (C:\\TecTeacher\\bin\\MediaConsoleHost.exe.Config line 32)"
Source="System.Configuration"
BareMessage="An error occurred creating the configuration section handler for system.serviceModel/behaviors: Bad unmanaged code entry point."
Filename="C:\\TecTeacher\\bin\\MediaConsoleHost.exe.Config"
Line=32
---
Any idea?
And yes: it works when not profiling the app
Thanks,
-Christian |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Thu Oct 08, 2009 2:05 pm Post subject: |
|
|
Hi Christian,
I've seen this before and it looks like an XmlSerializer problem. The config files are deserialized by the .NET Framework, and to do this, it had to create a temporary assembly -- this is what fails sometimes.
Try granting full access to the system profile's temporary files folder and see if that helps:
C:\Windows\system32\config\systemprofile\LocalSettings\Temp _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
ChristianWeyer
Joined: 08 Oct 2009 Posts: 4
|
Posted: Thu Oct 08, 2009 2:18 pm Post subject: |
|
|
Do you happen to know where this folder is located for Windows 7 (x64)?
And what exactly should I grant to who?
Thanks! |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Thu Oct 08, 2009 3:24 pm Post subject: |
|
|
I haven't got a Win7 installation handy, but I'd imagine they still abstract the full path using environment variables, eg: %systemroot%\system32\config\systemprofile\localsettings\temp .
You can try granting "modify" access to SYSTEM (should already have that), your own desktop logon account, and if profiling a service, the service's startup account also. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
danielf
Joined: 04 May 2010 Posts: 2
|
Posted: Tue May 04, 2010 4:14 pm Post subject: similar issue |
|
|
Hi guys!
I have a similar problem: While profiling WPF application with "line level timing" precision (this is essential), I'm getting the same exception while creating certain controls defined in xaml i.e. Microsoft.Windows.Controls.Calendar. The inner exception says "Bad unmanaged code entry point: <Module>".
P.S. This only happens in case of "line level timing" precision.
P.S.S. I tried workaround described here, however (I"m running Vista), couldn't find %systemroot%\system32\config\systemprofile\localsettings\temp folder. I have C:\Windows\system32\config\systemprofile\AppData\Local, which grants full access to System account. |
|
| Back to top |
|
 |
slaphead99
Joined: 10 Mar 2010 Posts: 93
|
Posted: Wed May 05, 2010 2:46 pm Post subject: |
|
|
| In my experience, this almost always means there's a PDB file on the path that the profiler isn't happy with for various reasons (known to occur with Ajax and Unity framework pdb). So eliminate PDBs one by one until you find the culprit(s). |
|
| Back to top |
|
 |
danielf
Joined: 04 May 2010 Posts: 2
|
Posted: Wed May 05, 2010 6:00 pm Post subject: |
|
|
| Thanks for a swift reply. It indeed was a pdb of a third party library. |
|
| Back to top |
|
 |
slaneyrw
Joined: 08 Feb 2005 Posts: 28
|
Posted: Mon May 10, 2010 3:30 am Post subject: |
|
|
The problems isn't with the PDB, Unity emits dymanic IL which the profiler has problems with.
I have compiled the Unity application block from source code so the PDB is accurate and I still get problems.
Would be nice if Red Gate could finally fix their application... I reported this almost 18 months ago
http://www.red-gate.com/messageboard/viewtopic.php?t=8250&highlight= |
|
| Back to top |
|
 |
|