0

I have a problem.

I have to create a Wcf service with a method that receives a string and write a file, on a server, with the content of that string.

I have to put the file in the url \server123\inp (when I paste that url in the file explorer, I insert username and password and I access the directory.

How can I do it in c#?

I would like to something like this:

  IWshNetwork_Class network = new IWshNetwork_Class();
        network.MapNetworkDrive("k:", @"\\server123\in", Type.Missing, "username",    "password");

And after

System.IO.File.WriteAllText("k:\\file.txt",string);

But I have an error on the typed password(but the password is CORRECT!!)

Thanks a lot

greg
  • 1,289
  • 2
  • 14
  • 33
user2328912
  • 235
  • 2
  • 3
  • 17

0 Answers0