Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > WinFX General

Vista - Request for the permission of type 'System.Security.Permissions.Fi

 
 
Old 07-31-2007   #1 (permalink)
DVMPX


 
 

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.

My System SpecsSystem Spec
Old 08-01-2007   #2 (permalink)
DVMPX


 
 

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.

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Request for the permission of type 'System.Net.SocketPermission fa PowerShell
cant turn off - permission request Vista file management
Services request permission Vista account administration
Permission Request Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46