![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest
Posts: n/a
| Request for the permission of type 'System.Security.Permissions.Fi I've been trying to run XAML browser applications on the C drive using visual studio 2005, but I receive the error System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. I have tried setting the trust level to full in the application configuration file, and adding; [assembly:FileIOPermission(SecurityAction.RequestMinimum, Unrestricted = true)] [assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name = "FullTrust")] to the AssemblyInfo.cs file. I have also set intranet trust to full under the .Net configuration tool. Can anyone help me fix this error? Thanks. |
|
|
| |
| | #2 (permalink) |
| Guest
Posts: n/a
| RE: Request for the permission of type 'System.Security.Permissions.Fi I have found the problem. In a resource dictionary file I was using, some of the XAML referenced images using the full path name as shown below. <ImageBrush Stretch="None" Viewport="0,0,128,128" ImageSource="C:\VS Projects\FCI Logo 3\FCILogo_files\image0.png" TileMode="Tile" ViewportUnits="Absolute"> <ImageBrush.Transform> <MatrixTransform Matrix="1.33364,0,0,1.33667,-91.198,537.827"/> </ImageBrush.Transform> </ImageBrush> When I changed the path to ImageSource="image0.png" it worked. I don't quite understand why the error should have occurred anyway since the file was on the local drive, not on a network. Also, does one have to change the image references manually each time or can one get expression blend to do it automatically? "DVMPX" wrote: > I've been trying to run XAML browser applications on the C drive using visual > studio 2005, but I receive the error > System.Security.SecurityException: Request for the permission of type > 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. > I have tried setting the trust level to full in the application > configuration file, and adding; > > [assembly:FileIOPermission(SecurityAction.RequestMinimum, Unrestricted = > true)] > > [assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name = > "FullTrust")] > > to the AssemblyInfo.cs file. I have also set intranet trust to full under > the .Net configuration tool. > > Can anyone help me fix this error? > Thanks. |
|
| |
| |