Jay Kumar
Jay Kumar

Reputation: 11

My WPF C# Exe when shared over network and accessed with drive letter works but with just the shared drive does not

My executable developed on C#, WPF is shared on network. When I input this and run, \192.168.0.15\D$\App\WinApp.exe the application kicks off, but when I just do \192.168.0.15\App\WinApp.exe the application does not kicks off. I have logger implementation in the App() constructor but it does not even reach that point. On the event viewer, got exception code 0xc0000005

Upvotes: 1

Views: 615

Answers (1)

Giulio Vian
Giulio Vian

Reputation: 8353

0xc0000005 reads a security issue, in fact you cannot run .Net code from a network share unless you explicitly allow for it. I assume that the first invocation is not recognized as a remote share (maybe it is the same machine).

You have many options to solve this:

  1. Avoiding the share path (e.g. Run c# .NET Program from network share)
  2. Tweaking the security of all client machines (e.g. run c# app from network share)
  3. Publish the program on an HTTP server and use ClickOnce

Upvotes: 1

Related Questions