Could not load file or assembly


I'm running Profiler on Windows XP with Visual Studio 2008 Pro. When I try to profile an ASP.NET 3.5 web app I get an error stating the following:

Could not load file or assembly 'AspDotNetStorefrontCore, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

In this case, AspDotNewStorefrontCore is a project within my solution that compiles into a single DLL in the web app. I've tried this in release and debug mode (verified that PDB files are present). If I run the web app without the profiler running it works fine. I've also tried this when running the app via IIS and the VS dev server - same result in both cases.

Any ideas?



  • Brian DonahueBrian Donahue Posts: 6,590 New member

    Sorry we have not seen this error before but I'm sure it's security (CASPOL) related. If you cannot disassemble and resign the assembly with a strong-name key, you may have to live with Performance Profiler's "sampling" mode, as it does not introduce the change in the running security environment.

    Sorry we can't be more helpful.
  • The odd thing is that the assembly in question is in the same solution. This solution has 5 or 6 projects in it and one is a web site. So, it seems odd that this needs to be signed when full source code is right there.

    Is that correct?
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    I do not understand this issue, so I can't comment on it any more. I'm referring it to the development team.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Maybe I spoke too soon. There is a hint on StackOverflow that this may be related to licensing of one of your third-party components and that the error may originate from LC.exe (licence compiler).

    Could be that the change in security (the website is now running as you on any OS other than XP) has made it impossible for the app to read some resource needed to licence the component.

    Is your user account an administrator and do you run Profiler As Adminstrator?

    It may be possible to get more information about the problem by attaching a debugger to the website. I can send instructions to your email account if you need them.
  • Brian,

    Thanks for the follow up on this!

    I've talked with the vendor of the shopping cart and they confirmed that there is one assembly that is referenced by the assembly in question that isn't signed. They said I can use a 3rd party signing tool to sign that directly and that may help.

    If you think that sounds reasonable I will try that. Regardless, could you please send me the debugger instructions just in case?

    Thanks again,
  • So, it doesn't seem as though I can sign the assembly I was talking about. Assembly Linker will only work if you have the source (or modules produced by CSC.exe) and I don't in this case.

    Is there any way to bypass the normal logic and allow the profiler to load an unsigned assembly?

    Also - can you please send the info re: attaching a debugger?

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Processes started by profiler can profile unsigned assemblies. This is a special case. I think it's caused by licensing. Does your vendor have anything to say in that department?

    It is possible to resign assemblies, you have to use a tool like ILDASM and dump the IL code, then use ILASM to link it back together and sign it.
Sign In or Register to comment.