Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums

Go Back   Vista Forums > Vista technology newsgroups > WinFX General

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

Reply
 
Thread Tools Display Modes
Old 07-31-2007   #1 (permalink)
DVMPX
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.
  Reply With Quote

Old 08-01-2007   #2 (permalink)
DVMPX
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.

  Reply With Quote
 
Reply

Thread Tools
Display Modes









Vistax64.com 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 2005-2008

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 47 48