Red Gate forums :: View topic - Profile v5 has same issue as v4 with Unity
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 5
ANTS Performance Profiler 5 forum

Profile v5 has same issue as v4 with Unity

Search in ANTS Performance Profiler 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
slaneyrw



Joined: 08 Feb 2005
Posts: 28

PostPosted: Tue Jul 14, 2009 7:33 am    Post subject: Profile v5 has same issue as v4 with Unity Reply with quote

We use Unity to handle dependency injection within our web application. Here is the ASP.NET error page that is generated when profiled. The same application works without the profile running.

It is the same problem that v4 of the product had.

Cheers...

Robert



Server Error in '/' Application.
--------------------------------------------------------------------------------

Bad unmanaged code entry point.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Bad unmanaged code entry point.

Source Error:


Line 230: {
Line 231: ExeConfigurationFileMap map = new ExeConfigurationFileMap() { ExeConfigFilename = unityFilePath };
Line 232: section = ConfigurationManager.OpenMappedExeConfiguration( map, ConfigurationUserLevel.None ).GetSection( "unity" ) as UnityConfigurationSection;
Line 233:
Line 234: }


Source File: D:\Projects\VS2008\MVC\SEEK\Framework\Unity\Unity.cs Line: 232

Stack Trace:


[TypeLoadException: Bad unmanaged code entry point.]
Microsoft.Practices.Unity.Configuration.UnityConfigurationSection.get_Containers() in e:\Builds\Unity\UnityTemp\Compile\Unity\Src\Unity.Configuration\ConfigurationElements\UnityConfigurationSection.cs:33

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +277
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +519
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) +36
System.Configuration.ConfigurationElement.ApplyInstanceAttributes(Object instance) +332
System.Configuration.ConfigurationElement.get_Properties() +62
System.Configuration.ConfigurationElement.Reset(ConfigurationElement parentElement) +64
System.Configuration.MgmtConfigurationRecord.CreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader) +180
System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line) +129

[ConfigurationErrorsException: An error occurred creating the configuration section handler for unity: Exception has been thrown by the target of an invocation.]
System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line) +550
System.Configuration.BaseConfigurationRecord.CreateSectionDefault(String configKey, Boolean getRuntimeObject, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object& result, Object& resultRuntimeObject) +150
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1896
System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission) +57
System.Configuration.Configuration.GetSection(String sectionName) +16
SEEK.Unity.EnsureDefaults() in D:\Projects\VS2008\MVC\SEEK\Framework\Unity\Unity.cs:232
SEEK.Unity.set_RootPath(String value) in D:\Projects\VS2008\MVC\SEEK\Framework\Unity\Unity.cs:59
JobSeeker.Framework.UnityControllerFactory.Configure(String rootPath) in D:\Projects\VS2008\MVC\SEEK\JobSeeker\Framework\UnityControllerFactory.cs:37
JobSeeker.MvcApplication.Application_Start() in D:\Projects\VS2008\MVC\SEEK\JobSeeker\Global.asax.cs:55

[HttpException (0x80004005): An error occurred creating the configuration section handler for unity: Exception has been thrown by the target of an invocation.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +429
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +219
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +237
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +290
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +244

[HttpException (0x80004005): An error occurred creating the configuration section handler for unity: Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +468
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +687
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Tue Jul 21, 2009 9:40 am    Post subject: Reply with quote

Hi Robert,

It looks like you have got the symptoms of how ANTS can change the runtime security environment. If the web application can't read the configuration, then it's probably an XmlSerializer problem. When ASP .NET does this, it creates a temporary assembly in %systemroot%\system32\config\systemprofile\LocalSettings\Temp. Granting full access to everyone on this folder may get it working again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group