Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 614515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:07:12+00:00 2026-05-13T18:07:12+00:00

How can I create a directory on a remote server using .NET? Both servers

  • 0

How can I create a directory on a remote server using .NET? Both servers are running Windows Server 2003. I have looked at the system.IO.directory class, and FtpWebRequest, both of which don’t seem to do what I need.

If there isn’t an existing method for this, I should be able to form a VPN tunnel, map the drive, and use directory.copy, right?

Update:
Decided to take Rockinthesixstring’s advice and create a web service on the server in which I need to create the directories. I built the following ASMX file, compiled it in visual studio, and was able to successfully invoke it from the browser page that is “automagically” generated from the ASMX file

Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel

    <System.Web.Script.Services.ScriptService()> _
    <System.Web.Services.WebService(Namespace:="http://ttanet.com/")> _
    <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    <ToolboxItem(False)> _
    Public Class Service1
        Inherits System.Web.Services.WebService
        <WebMethod()> _

        'Here is where we invoke our exposed method'
        Public Sub makeDir(ByVal dirName As String)
            System.IO.Directory.CreateDirectory("C:/TransferTest/" & dirName)
        End Sub

    End Class

Excellent suggestion -Thanks Rockin…

The second half of my question is the best way to invoke it. I need to call it from a VB.NET app. I am trying to invoke it from a browser, like:

http://localhost:60870/MakeDirectory.asmx/makeDir?dirName=testingFromURL

But it yields:

Exception Details: System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/makeDir'.

I was planning on looping through and sending WebRequestFactory.Create(urlForGetRequest) through an iteration. Is something wrong with the way my URL is structured, Is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:07:13+00:00Added an answer on May 13, 2026 at 6:07 pm

    I would recommend creating a web service on the machine that is to have the directory created. Then call the web service from the machine that is doing the creating. The web service can use the System.IO.Directory.CreateDirectory method.

    An alternative method would be to create the directory directly using a UNC Path. (requires a folder share across the network)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 386k
  • Answers 386k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can actually do this in regex alone using look… May 14, 2026 at 11:53 pm
  • Editorial Team
    Editorial Team added an answer They answer appears to be here if you dont mind… May 14, 2026 at 11:53 pm
  • Editorial Team
    Editorial Team added an answer @lopkiju, I think that the MVC pattern would serve you… May 14, 2026 at 11:53 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.