Error after entering license key

We just purchased licenses for ANTS Profiler and after I entered the license key, the website I want to profile throws an exception when run by ANTS. The website runs fine otherwise. I am fairly sure I entered the key correctly.

Here is the exception:
Could not load type <unknown> from assembly MERC.AircatWeb, Version=1.0.2043.15093, Culture=neutral, PublicKeyToken=null because the format is invalid. 
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: Could not load type <unknown> from assembly MERC.AircatWeb, Version=1.0.2043.15093, Culture=neutral, PublicKeyToken=null because the format is invalid.

Source Error: 


Line 30:         private static bool __initialized = false;
Line 31:         
Line 32:         public Global_asax() {
Line 33:             if ((ASP.Global_asax.__initialized == false)) {
Line 34:                 ASP.Global_asax.__initialized = true;
 

Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\hb_to107_heathcliff_dev\473390ab\768ecbe6\o6a7e3bn.0.cs    Line: 32 

Stack Trace: 


[TypeLoadException: Could not load type <unknown> from assembly MERC.AircatWeb, Version=1.0.2043.15093, Culture=neutral, PublicKeyToken=null because the format is invalid.]
   MERC.AircatWeb.Global..ctor() +0
   ASP.Global_asax..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\hb_to107_heathcliff_dev\473390ab\768ecbe6\o6a7e3bn.0.cs:32

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +75
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +659
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +207
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +29
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +42
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type) +32
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance() +147
   System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext context) +30
   System.Web.HttpApplicationFactory.Init(HttpContext context) +224
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +155
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +298

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    I'm sure that this has nothing to do with the activation as teh stack trace indicates an error in your website. I noticed that the application exception mentions that it is running from the folder 'Temporary ASP .NET files'. Perhaps the account that is configured to run ASP .NET does not have read or the necessary write access to this folder?

    I think the best course of action anyway would be to rebuild the .NET web application in Visual Studio as a debug build so you have a debug dll and a pdb file in the correct location rather than letting ASP .NET dynamically compile the assembly into the temporary ASP .NET Files folder.

    Do you think that will help?
  • Brian, I do not know why the site is running from Temporary ASP.NET files. The solution is built in VS2003 with debugging on. The /bin folder contains both .dll and .pdb files. The site will run through VS Debugger, or by just accessing the URL after compiling. It just won't run through ANTS at this point. Nothing about the solution has changed since I entered the license key for ANTS. That could just be a coincidence, not a correlation, and I am aware of that.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    I could be wrong about the temporary ASPNET files folder, but I still think it could be a user rights issue. Is this aplication running on IIS 6 on Windows 2003? It could be down to a discrepancy between the user in the machine.config (yes, ANTS Profiler looks there and tries to run the web application as that account) and the user that is configured in the Application Pool.
  • I checked permissions - ASPNET user has full control of Temporary ASP.NET Files directory. The website is running on IIS 5.1 on Win XP Pro. machine.config is set to use ASPNET user.

    Anyway, I never made any changes to security settings and it is working now all of a sudden. Who knows what it was??
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    My theory is that some setting may have forced it to compile dynamically rahter than using the already-built assembly. Maybe the debug setting in the web.config or something.
This discussion has been closed.