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 8683095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:57:08+00:00 2026-06-12T21:57:08+00:00

I do not have IIS, I use my localhost that comes with Visual Studio,

  • 0

I do not have IIS, I use my localhost that comes with Visual Studio, I am not sure how to make a service call work if I am using localhost. It tells me “Unable to connect to remote server” , Is there a way I can make a webservice call work using localhost?. Here is my code:

    public void CallService()
    {
        WebRequest requestweb = WebRequest.Create("http://localhost/WebServices/MyTestService/HelloWorld");
        requestweb.Method = "GET";
        //Line below returns "Unable to connect to remote server"
        WebResponse response = requestweb.GetResponse();
        Console.WriteLine(((HttpWebResponse)response).StatusDescription);
        Stream data = response.GetResponseStream();
        response.Close();
    }

Would truly appreciate an advice on this. Thank you

  • 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-06-12T21:57:10+00:00Added an answer on June 12, 2026 at 9:57 pm

    Open the website you’re trying to connect to in your favorite web browser. Copy the value from your location bar and paste it as the parameter to WebRequest.Create.

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

Sidebar

Related Questions

I have deployed a WCF service that use HTTP binding on IIS 7.5. When
I have an iis server on a windows 2003 production machine that will not
I have a web application (hosted in IIS) that talks to a Windows service.
I have a problem with my Visual Studio 2008 debugger not attaching to the
I changed from running Use Visual Studio Development Server to Local IIS Web Server
I'm using a WCF service that is running on an IIS 7.5 (W2k8 R2).
If I run a 2010 visual studio C# web project using the Use Visual
I've had not a lot of luck creating a WCF service with Visual Studio.
I am hosting web service in a one machine using Visual studio 2008. I
I have a Xaml file that does not have any code behind. I would

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.