Re: SecurityException
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Oct 2007 11:32:56 -0400
Wally,
Are you running this assembly from the local machine? If so, are the
settings for that assembly such that you don't have full trust?
Also, does the user that you are running the app under actually have
rights to the file?
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"Wally Pipp" <wallyhpipp@xxxxxxxxxxx> wrote in message
news:vYeRi.5892$Oy1.5470@xxxxxxxxxxx
Hello All,
I've just inherited a PC with XP, so I loaded VS2005 on it and was running
a
simple windows application when I got a SecurityException just trying to
open a file with the following message:
Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
When I use the following:
FileStream fs = File.Open(@"C:\txtFiles\File2.txt", FileMode.Open );
I went to Control Panel->Administrative Tools->MS ...Framework 2.0->My
Computer->Runtime Security Policy->Increase Assembly Trust for
mscorlib.dll,
but it didn't help.
Any suggestions?
Thanks,
Wally
----------------------------------------------------------------------------
----
Peek-a-boo FREE Tricks & Treats for You! Get 'em!
.
- Follow-Ups:
- Re: SecurityException
- From: Wally Pipp
- Re: SecurityException
- References:
- SecurityException
- From: Wally Pipp
- SecurityException
- Prev by Date: Re: Textbox validation problem
- Next by Date: delay sign..
- Previous by thread: SecurityException
- Next by thread: Re: SecurityException
- Index(es):
Relevant Pages
|