Referring to a Local Machine from a WebService

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • supersav144
    New Member
    • Feb 2010
    • 3

    Referring to a Local Machine from a WebService

    Hi there,

    i have a simple application which connects to a web service and then this web service creates a file on the machine which the application was accessed on...

    the problem i have though is that when i use the web service im not sure how i need to or the format to refer to the local machine (i.e do i use machine name, the IP address??) in order to save the file to this local machine.

    Any help would be much appreciated!

    Phil
  • supersav144
    New Member
    • Feb 2010
    • 3

    #2
    Create file on a local machine

    hello everyone, i have a web service and i would like to know how i can create a file on the local machine using the web service...pleas e help

    Comment

    • semomaniz
      Recognized Expert New Member
      • Oct 2007
      • 210

      #3
      can you show us your code and the error that you are receiving?

      Comment

      • supersav144
        New Member
        • Feb 2010
        • 3

        #4
        string file = textbox1.text;
        //retrieves the selected filename
        string linkname = Path.GetFileNam eWithoutExtensi on(@"" + file + "").Substring(0 );
        string directory = Path.GetDirecto ryName(@"" + file + "").Substring(0 );

        StreamWriter writer = new StreamWriter(di rectory + "\\" + linkname + ".txt")
        this is part of the code which i am using within the webservice...it creates a new text file in the same directory and with the same name as the file entered into the text box!

        the problem im having is that because its a web service its not recognising the local machine and so it cannot create the new file to the local machine

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          Please don't double-post your questions. It divides attempts to help you in an organized and cohesive manner. Your threads have been merged

          Comment

          Working...