Red Gate forums :: View topic - Could not load file or assembly
Return to www.red-gate.com RSS Feed Available

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

Could not load file or assembly

Search in ANTS Performance Profiler 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
sequencing



Joined: 10 Apr 2011
Posts: 4

PostPosted: Sun Apr 10, 2011 3:50 pm    Post subject: Could not load file or assembly Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Thu Apr 14, 2011 10:36 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
sequencing



Joined: 10 Apr 2011
Posts: 4

PostPosted: Thu Apr 14, 2011 12:16 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Thu Apr 14, 2011 4:46 pm    Post subject: Reply with quote

I do not understand this issue, so I can't comment on it any more. I'm referring it to the development team.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Thu Apr 14, 2011 8:35 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
sequencing



Joined: 10 Apr 2011
Posts: 4

PostPosted: Thu Apr 14, 2011 8:49 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
sequencing



Joined: 10 Apr 2011
Posts: 4

PostPosted: Sat Apr 16, 2011 3:49 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Mon Apr 18, 2011 9:11 am    Post subject: Reply with quote

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.
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