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

  • Home
  • SEARCH
  • 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 6580485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:02:08+00:00 2026-05-25T16:02:08+00:00

I am trying to map a network drive on to the server inside a

  • 0

I am trying to map a network drive on to the server inside a windows service written in c#.
I tried using net.exe with below code

        System.Diagnostics.Process p = new System.Diagnostics.Process();
        p.StartInfo.UseShellExecute = false;
        p.StartInfo.CreateNoWindow = true;
        p.StartInfo.RedirectStandardError = true;
        p.StartInfo.RedirectStandardOutput = true;

        p.StartInfo.FileName = "net.exe";
        p.StartInfo.Arguments = " use " + DriveLetter + Path + " " + Password + " /user:" + Username;
        p.Start();
        p.WaitForExit();

the arguments basically translate to ” use X: \\192.45.xx.xxx\sharename “xxxx” /user: domainname\username”

i get a “network name not found” error when this executes. The server i am trying to access is on a different domain than the one my app is sitting on, which is why i think i get that error.

Does anyone know how i can get past this and map a shared folder from another domain on to my local computer?

I’d greatly appreciate any help

Thanks
Karthik

  • 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-25T16:02:09+00:00Added an answer on May 25, 2026 at 4:02 pm

    the arguments basically translate to " use X: \192.45.xx.xxx\sharename
    "xxxx" /user: domainname\username"

    Assuming everything else is correct, this error is caused by specifying one backslash before the IP address — you need 2 backslashes.

    enter image description here

    update

    In response to your comments, clearly you are authenticated to access resources this other domain. Unless it is wide open, it is unlikely that the Windows Service, which is probably running under a system account, can access those resources.

    As a troubleshooting step, change your service to run under your account, and see if that makes a difference.

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

Sidebar

Related Questions

I'm trying to map network drive from windows service, I use batch file for
Trying to map the following schema using the Entity Framework. A Customer can have
I'm trying to map a struct definition using ctypes: struct attrl { struct attrl
I am trying to map several tables using Fluent Nhibernate. My tests are giving
I am trying to map a table frp, a SQL Server 2005 DB to
I'm trying to access a network path in my ruby script on a windows
I am trying to map all network devices and create a visio file with
I'm trying to create a dynamic ItemizedOverylay (please see the code below) on Google
I am trying to map a method in a Controller using the annotation with
I have a Windows service running in local system that simply keeps trying to

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.