I'd agree with that assesment. It's important to realize that CAS security sits on top of NT security, and does not replace it. Even if the CLR will
allow you to read or write a file (ie you have the correct FileIO permissions), ACLs on the NTFS (or ACLs on the file share you're writing to) may still
This posting is provided "AS IS" with no warranties, and confers no rights.
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they
originated.
>From: "Toby Herring" <therring*@*teletrack.com>
>References: <1bc2c910.0409081019.24e677b0@posting.google.com>
>Subject: Re: System.IO.File.Copy(..,..) doesn't really work (WinApp)
>Date: Wed, 8 Sep 2004 14:34:31 -0400
>Lines: 36
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>X-RFC2646: Format=Flowed; Original
>Message-ID: <O#8iQJdlEHA.3632@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.dotnet.security
>NNTP-Posting-Host: 12.178.11.194
>Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.security:7358
>X-Tomcat-NG: microsoft.public.dotnet.security
>
>Sounds like you don't have permission to read the XML file.
>
>Either that, or the XML file already exists at the target destination, but
>it's either locked by an application or you don't have permission to modify
>it.
>
>--
>Toby Herring
>MCDBA, MCSD, MCP+SB
>Need a Second Life?
>
http://secondlife.com/ss/?u=03e0e5b303c234bf08e80ee40119a65e >
>
>"Volker Stahl" <gotchafighter@gmx.de> wrote in message
>news:1bc2c910.0409081019.24e677b0@posting.google.com...
>> 1. signed assembly with a StrongName
>> 2. Caspol -m -af MyUpdServ.exe
>>
>>
>> Following Code functioned:
>>
>> File.Copy(@"\\SERVER01\MyApp\MyApp.exe", @"C:\Programme\MyApp\MyApp.exe",
>> true);
>>
>>
>> Following Code not functioned:
>>
>> File.Copy(@"\\SERVER01\MyApp\MyApp.xml", @"C:\Programme\MyApp\MyApp.xml",
>> true);
>>
>> -> here was throw a System.UnauthorizedAccessException
>>
>>
>> How could that be ?
>
>
>