Running .exe across network

I'm developing a small application that pops up a "message of the day" box when a user logs onto the intranet. The application works just fine when I run it off the local machine. However, when I attempt to run it across the network from another machine, I then get a MS .NET Framework Security Error.

  "The application attempted to perform an operation not allowed by the security policy ..."

     If I click continue the Form is displayed, but the results from a streamreader object don't render as expected. Everyone on the network has access to the directory that both the .exe and .txt files that I'm reading from.
    There is no IIS available on this server to run it as an ASP.Net page. Has anyone run an .exe across the network, or can you point me in the right direction to find out about the security settings I'll have to set
    Thanks.

MarkF



Answer this question

Running .exe across network

  • R.Papa

    The Code Access Security settings for application run over an intranet are more restrictive than apps run locally.  By default, the LocalIntranet code group does not have File IO permissions.  

    The fix would be to either change the permission set for LocalIntranet to allow it or give your assembly a strong name and give the required permissions to applications with a matching public key.  The second option is the more restrictive, and therefore more secure, option.

    You can read up on CAS here:

    <a href="http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconintroductiontocodeaccesssecurity.asp">Code Access Security</a>


  • Running .exe across network