Application was stopped if i run it from redgate

Code profiling for .NET developers.

Moderators: AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Application was stopped if i run it from redgate

Postby hyang » Wed Mar 20, 2013 8:19 pm

hi,
I got a problem with start application by using redgate performance profiler.

The application self works without problem

but when i start it from redgate, it always says ".... has stopped working"

I noticed that. the exception comes from line of

JsonConvert.DeserializeObject(value, type, (JsonSerializerSettings)null);

The exception is:
{"Operation could destabilize the runtime."} System.Exception {System.Security.VerificationException}

I rechecked it, it works without any problem if I didn't run redgate.
any idea why redgate will stop applicaiton for this line? and what's solution for it? thanks a lot
hyang
 
Posts: 11
Joined: Thu Aug 16, 2012 11:00 pm

Postby james.billings » Thu Mar 21, 2013 7:16 pm

Thanks for your post.

We've seen this previously- it's due to some tighter security that's incompatible with line level timings.

You can get around it by changing some of the Json source:

- find JsonWriter.cs
- comment out "[assembly:System.Security.SecurityTransparent]"
- expand the "properties" folder
- comment out "[assembly:AllowPartiallyTrustedCallers]" in the #if !SILVERLIGHT region
- rebuild your solution

With those changes, it should hopefully work. You can uncomment the lines again when you release your app if you wish.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to ANTS Performance Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests