If you use Ants Performance Profiler, and you choose "Line-level" You may have the following problems:
System.Security.VerificationException: operation may break runtime stability.
How to solve the foreigner: Http://stackoverflow.com/questions/378895/operation-could-destabilize-the-runtime
This happens regularily to me when using the ANTS performance Profiler with the projects that make use of htmlagilitypack. The solution to exclude htmlagilitypack by adding <assemblyName>HtmlAgilityPack< /assemblyname> to the file "C:\Users\YourUserName\AppData\Local\Red gate\ants performance Profiler 9\ Linelevelblacklist.xml "(Replace" YourUserName "by your actual user name).
I tried, seemingly no use, I still directly in the software to modify the analysis configuration mode, not select Line-level and with source.
error message:
Operations can disrupt run-time stability.
Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace information For more information about the error and the source of the error in your code.
Exception Details: System.Security.VerificationException: operation may break runtime stability.
SOURCE Error:
An unhandled exception was generated during the execution of the current WEB request. You can use the following exception stack trace information to determine information about the cause of the exception and where it occurred.
Reason:
The Framework platform trust level has been modified by the host vendor (the foreign host is generally modified), resulting in a low level of trust.
Workaround 1:
Locate the Framework configuration file path: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\Web.config (Note that different versions of the red part of the directory may not be the same, if you purchase a virtual host, please contact the host to modify)
This open file finds the following paragraph.
<location allowoverride= "true" >
<system.web>
<securityPolicy>
<trustlevel name= "full" policyfile= "internal"/>
<trustlevel name= "High" policyfile= "Web_hightrust.config"/>
<trustlevel name= "Medium" policyfile= "Web_mediumtrust.config"/>
<trustlevel name= "Low" policyfile= "Web_lowtrust.config"/>
<trustlevel name= "Minimal" policyfile= "Web_minimaltrust.config"/>
</securityPolicy>
<trust level= "full" originurl= ""/>
<identity impersonate= "true"/>
</system.web>
</location>
RedTrustPart of the level is the default is full, some of the host business here is set to Medium or other, will prompt the untrusted error, change back to full.
Workaround 2:
You can change the allowoverride of the blue section above to True (indicating that the user is allowed to customize the trust level)
Then add <trust level= "full" originurl= ""/> on the </system.web> line of the Web. config file that pageadmin comes with.
The modified web.congfig are as follows
<?xml version= "1.0" encoding= "UTF-8"?>
<configuration>
.... Middle part omitted
<trust level= "full" originurl= ""/>
</system.web>
</configuration>
The Pageadmin system can be run correctly after the above modification.
Workaround for operations that may disrupt run-time stability