62249

Running a C# exe file

Duplicate:

Why does my .NET application crash when run from a network drive?

<hr>

Can someone help me? For a school project, I wrote a C# windows application in Visual Studio 2005. It works just fine, no problems. I want to be able to share this program with others in my department at work. So, I copied the exe file to a network drive. When we attempt to run the exe from the network, it fails with "name of progrm...has encountered a problem and needs to close". If I have the co-worker copy the exe file to their c:\ drive then attempt to run, it works. Why won't my program run from the network drive?

Susan

Answer1:

.NET by default does not allow applications to be run off a network drive. Either copy it to a local drive or alter the security settings for .NET.

This discussion should give you what you need.

Answer2:

Microsoft has finally realised that the default behavior of preventing applications from running off a network drive is wrong. From The .NET 3.5 SP1 download page:

"Additionally, managed applications that are opened from network shares have the same behavior as native applications by running with full trust."

This change is long overdue: there is virtually no security benefit in preventing managed applications running from a network share, since a hacker could just as easily use an unmanaged application.

Answer3:

Take a look at this article that discusses how to get a .NET application to work executed from a network: http://www.west-wind.com/WebLog/posts/275.aspx

Recommend

  • How to share a database between ASP.NET MVC 5 application and .NET console application?
  • ASP.NET MVC2 Error: No parameterless constructor defined for this object
  • Symfony2 redirect to https route fails (uses wrong port)
  • QPushButton is not changing the background-color proper
  • Why is django manage.py syncdb failing to create new columns on my development server?
  • ASPNetCore MVC Routing Let Server Handle Specific Route
  • Efficient User-Agent Regex to find Safari in Python
  • ImportError: cannot import name Pubnub
  • netsh acl setting (need alternative method - registry settings?)
  • Hibernate to update table schema
  • jQuery: add elements until a particular height is reached
  • aapt.exe'' finished with non-zero exit value 1
  • npm 5.4.1 install/uninstall all failing
  • Reading a file into a multidimensional array
  • Tamper-proof configuration files in .NET?
  • Code in Job's Script Block after Start-Process Does not Execute
  • Needing to do .toArray() to get output of mongodb .find() on key name not value
  • OpenGL 3.3 on Mac OSX El Capitan with LWJGL
  • Typescript - Unable to get 'import' statement to function
  • Reading JSON from a file using C++ REST SDK (Casablanca)
  • C# - Is there a limit to the size of an httpWebRequest stream?
  • Optimizing database types to compact database (SQLite)
  • TFS: Get latest causes slow project reloading
  • Join two tables and save into third-sql
  • How to model a transition system with SPIN
  • ORA-29908: missing primary invocation for ancillary operator
  • Akka Routing: Reply's send to router ends up as dead letters
  • R: gsub and capture
  • Numpy divide by zero. Why?
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Comma separated Values
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Free memory of cv::Mat loaded using FileStorage API
  • coudnt use logback because of log4j
  • Running Map reduces the dimensions of the matrices
  • Reading document lines to the user (python)
  • Converting MP3 duration time
  • How to load view controller without button in storyboard?