problem | |
c# security fucken error!!! (microsoft SUCKS) --------------------------- Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. | |
difficulty level | |
3/10 :| | |
compatibility | |
vs2008 .net 2.5 | |
solution | |
- be sure that the file you are trying to open it from you code, is in the same directory or somewhere where is valid to reach- open the properties of the application - go to at security tab - click "Enable ClickOnce security settings" - select "This is a partial trust" - Zone your application: (custom) - Select above all the secutiry settings required from the environment where the application will run (consider about this!). You must include FileIOPermission if your application open files. Do not include regardless permissions because in case where the end user hasn't them (i.e. guest user) your application will not run. - Under all these, there is a button "Advanced" where it is not displayed sometimes if your monitor has lo resolution, scroll down to see it, press it and there you may find the settings if you with to use this "permission set" on debug execution. If you selected to use this settings you cannot use the specified arguments at "debug" tab of the parameters (one more reason why Microsoft sucks). Your application will use the command line arguments finally in "release" version. - SAVE the parameters window and then ReBuild! - open the file c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config ; this key and update accordingly: <trust level="Full" originUrl=""/> |
Developing with CSharp many time you feel a strange feeling... then feeling of lost and how to solve it. Fortunately MSDN has done a good work to help the developers. .net offers thousand ways to do several things! This is the worst thing… because, you do not know where to start from and what works in real world! I hope to help you with your CSharpache.
Tuesday, 28 June 2011
Runtime error Request for the permission of type 'System.Security.Permissions.FileIOPermission
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment