.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

SecurityPermission ?

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :.NET Framework

if I use this flag, did this order CLR to unrestricted all IO resource including memory or just disk ?

[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, Unrestricted = true)]

If this for memory also, can this flag work for Windows Forms application or just for ASP.net ?

The problem is sometime it throw error

Attempted to read or write protected memory. This is often an indication that other memory is corrupt

on my Windows Forms app. using C/C++ dll to persist into disk. And has possibility be called from multiple thread.

So any one have solution for this ?

It's hard to be advanced programmer

View Complete Post

More Related Resource Links

System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKe



I am currently working on SQL server reporting. I have created custom assemblies. I am loading the custom assebly in the rdl file.

I am getting following exception


An error occurred while executing OnInit: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsErrorInOnInit)



Please let me know if anyone knows the reason.

Thanks in Advance.

.NET error Request for the permission of type securityPermission for shared assembly on network


      We have following error while running one of .net assembly from our COM application.

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

The COM application built on mixed mode with .NET2.0 and VC++2008 and runs on various enviroments. but at
customer production fails with above error. Tried with different settings and CASPOL commands below but
still we get errors when running from SHARED drive

-Registered with regasm C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>regasm /codebase \\Machinexxx\folder1\\bin\Validation.dll

-Gave full trust to assemblies from .net configuration manager.
- caspol.exe -quiet -machine -addgroup All_Code -url "\\machine-xx01\folder1\Bin\*" LocalIntranet
- caspol.exe -m -ag LocalIntranet_Zone -url "\\machine-xx01\folder1\Bin\*" FullTrust –n FullTrustshare
after various caspol commands, which were successful, we did restart machine, but still when running
the application with that DLL it will throw above security error.

Any p

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend