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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:41:13+00:00 2026-05-11T20:41:13+00:00

I am writing a test web service, and noticed a strange corner case. If

  • 0

I am writing a test web service, and noticed a strange corner case. If you include two slashes after the port, the method will be called anyway for localhost, localhost:80, 127.0.0.1, and 127.0.0.1:80. But if I try it on the web server I’m developing on (port 55731), it fails.

localhost.Service1 s = new localhost.Service1();
string uri = "http://localhost//testService.asmx";
s.Url = uri;
double result = s.multiply(5,5);

Here’s the specific cases:

uri = "http://localhost//testService.asmx"; // works
uri = "http://localhost:80//testService.asmx"; // works
uri = "http://127.0.0.1//testService.asmx"; // works
uri = "http://127.0.0.1:80//testService.asmx"; // works
uri = "http://localhost:55731//testService.asmx"; // fails - HTTP status 400 - bad request

Any idea why this is the case? I know I should have just one slash after the port, just curious.

  • 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-11T20:41:14+00:00Added an answer on May 11, 2026 at 8:41 pm

    It’s an implementation detail specific to a web server. One server may consolidate the slashes into a single slash, another may look for a directory with an empty string as the name, or does a pattern check on it.

    I’m assuming your webserver on port 80 is differnt from the one on 55731, IIS has many differences from the devserver.

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

Sidebar

Related Questions

I'm writing UI to test an asmx web service. Server and client are .NET.
I want to stress test a web service method by calling it several thousand
I am writing a simple web service using .NET, one method is used to
I am writing code to performance test a web site. I have the following
I am writing an unit test for a mvc web application that checks if
I'm writing WatiN tests to test an Ajax web application and have come across
I'm writing a test for a file parser class. The parse method receives a
I'm writing some test cases, and I've got a test case that is using
I'm writing some code that calls a web service, reads back the response and
I'm writing a WPF test application against a WCF REST service running on Azure

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.