-2

I have an ASP.NET web form with a button on it. When I click the button I want to open a UNC path. I have created the event handler and placed the following code in it:

Process.Start(new ProcessStartInfo
    {
        FileName = "\\\\MyServer\\MyShare\\",
        UseShellExecute = true
    });

When I click the button, from my local machine, I receive the following error:

The specified network password is not correct 

When I upload the form and click the button from the test web server, I receive this error:

The parameter is incorrect 

Any ideas folks?

  • Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not"! –  Mar 25 '15 at 11:36

1 Answers1

0

I tested your code and it works fine here. The problem doesn't seem programming related, but more network related.

The error message "The specified network password is not correct" shows when you need to enter the credentials. You can't provide credentials like that when connecting using explorer, you can using net use, but you have to give a drive name for that.

You can open the share for C# internal usage using Impersonate, or NetworkConnection.

Community
  • 1
  • 1
Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325