Re: Security Permission Issue with C# EXE on Intranet



The default CAS permission grant for the intranet zone includes permission
to read from, but not write to, its directory of origin. This means that
you will either need to grant additional permissions to your assembly on the
client machine(s) or find an alternate means of saving the file. One option
that would not involve altering client-side permissions would be to pass the
data to a web service on the same server for writing to the desired target
file.

On the other hand, if you're using (or can upgrade to) v. 2.0 of the .NET
Framework, ClickOnce might also be an option. It would allow users to grant
additional permissions to your application without requiring separate
permission elevation steps. If you're using v. 1.x, you'll need to deploy
the policy modifications under administrative privileges. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/entsecpoladmin.asp
for some options, and talk to your network admin. There may already be
something in place for distributing CAS policy changes and, if not, your IT
folks should still be involved in selecting CAS policy modification
approaches
..


"Johann Pietschnig" <abc.piet.com> wrote in message
news:8A413B99-DE63-42DE-887E-9C1B4870FD49@xxxxxxxxxxxxxxxx
The purpose of the C# EXE is to hand over the .TXT file to a Visual Foxpro
Program, which is in the same directory as the C# .EXE on the server.
The Visual Foxpro Program is waiting for this TXT file and picks it up, as
soon as is generated.
This is just a Setup until the Visual Foxpro Program is also rewritten in
C#.

Thanks

Johann Pietschnig


"Nicole Calinoiu" wrote:

When the application is run from the server, do you really want the file
to
be saved to the server share? If not, what do you mean by "same
directory"?


"Johann Pietschnig" <abc.piet.com> wrote in message
news:67857629-D053-4960-A9FD-6B2EC9D61BAC@xxxxxxxxxxxxxxxx
Hi Nicole,
Thanks for your reply.

In my case the program makes a calculation and puts 2 numbers in a .TXT
file
in the same directory. I think this is just a simple IO function.
Are there ways in .NET 2.0 to handle this in C# code?
Thanks again

Johann Pietschnig


"Nicole Calinoiu" wrote:

Before attempting to grant additional permissions to your application,
it
might be best to figure out whether you can find a way to accomplish
the
desired functionality without elevating privilege. In this particular
case,
does the user select the target file location via a file save dialog?
If
not, does it matter where the file is located, or is it only important
that
your application be able to locate the data?


"Johann Pietschnig" <abc.piet.com> wrote in message
news:4C90DC2D-5B65-44BE-800D-5FC7AA1D0FA0@xxxxxxxxxxxxxxxx
Hi,
My Problem: I have a C# EXE which writes a TXT file with results. It
works
perfect on my local computer, but when I try to run it from our
network
server (Drive G:), I am getting a
System.Security.Permissions.SecurityPermission error.
I found a lot of hints on the internet, also the .NET Framework
Configuration Utility, but I was not successful at all.
Has somebody a very simple to understand solution, what I have to
do,
to
bring this EXE on the server to run?
Thanks in advance
Johann Pietschnig
pietschnig@xxxxxxx










.



Relevant Pages

  • Re: Allowing Anonymous write access only.
    ... need at least READ permission for login. ... > been set up so that anonymous FTP users have write access only, this> may seem insecure and we do get a certain ammount of hackers or> taggers testing the system by dropping test files and folders onto the> server, but because anonymous users do not have read access they soon> find that they cannot download anything they upload and go elsewhere. ... This is where my problems have started,> I initialy replicated all the IIS setting and NTFS permission from my> NT box on my 2003 box but so far have been unable to achive the same> result, it appaers that I can only grant anonymous write access if I ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Complete Neophyte Question(s)
    ... You should not have to go Google to find out what WITH GRANT means. ... Server comes with online documentation on you hard disk. ... WITH GRANT is one of the more esotheric features in SQL Server in my ... Or does that depend on the permission? ...
    (microsoft.public.sqlserver.security)
  • Re: GRANT VIEW SERVER STATE to Database Role
    ... Since it is a Server permission, it has to be a login. ... If you have several domain logins to which you want to grant this permission, but you would like to limit how many times you grant this on the server, do the following. ...
    (microsoft.public.sqlserver.programming)
  • Re: How to GRANT *all* permissions to *all* users?
    ... permission to do anything ... I'm asking because I recently converted from SQL Server 2000 to 2005 ... GRANT VIEW ANY DEFINITION TO public ... But I still can't ALTER tables. ...
    (microsoft.public.sqlserver.security)
  • Re: Long delay before Drives & Files appear in My Computer & Address Bar
    ... > SERVICE JEFF-DZP8HX39G2 The machine-default permission settings do not ... > grant Local Activation permission for the COM Server application with ... > Ratcliff JEFF-DZP8HX39G2 The Adobe LM Service service was successfully ... > within the required timeout. ...
    (microsoft.public.windowsxp.help_and_support)