Could not load file or assembly

Code profiling for .NET Developers

Moderators: Luke Jefferson, StephenC, Alex.Davies, AndrewH, melvyn.harbour, Laura Morley

Could not load file or assembly

Postby sequencing » Sun Apr 10, 2011 3:50 pm

Hello,

I'm running Profiler 6.2.0.13 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=9.0.1.1, 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?

Thanks,
Ryan
sequencing
 
Posts: 4
Joined: Sun Apr 10, 2011 3:43 pm

Postby Brian Donahue » Thu Apr 14, 2011 10:36 am

Hi,

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby sequencing » Thu Apr 14, 2011 12:16 pm

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?
sequencing
 
Posts: 4
Joined: Sun Apr 10, 2011 3:43 pm

Postby Brian Donahue » Thu Apr 14, 2011 4:46 pm

I do not understand this issue, so I can't comment on it any more. I'm referring it to the development team.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Thu Apr 14, 2011 8:35 pm

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 Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby sequencing » Thu Apr 14, 2011 8:49 pm

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,
Ryan
sequencing
 
Posts: 4
Joined: Sun Apr 10, 2011 3:43 pm

Postby sequencing » Sat Apr 16, 2011 3:49 pm

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?

Thanks,
Ryan
sequencing
 
Posts: 4
Joined: Sun Apr 10, 2011 3:43 pm

Postby Brian Donahue » Mon Apr 18, 2011 9:11 am

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to ANTS Performance Profiler 6

Who is online

Users browsing this forum: No registered users and 0 guests