Solved

Bad Request - Invalid Hostname

Posted on 2013-01-17
5
1,816 Views
Last Modified: 2013-01-18
Hi,
In my Win 2008 server, I have published the project fine in "Start" of the site called "WIN-BVDIC8GIAHI". But when I go to this
http://WIN-BVDIC8GIAHI:81/Start

I've got, while I am able to ping "WIN-BVDIC8GIAHI"
Bad Request - Invalid Hostname

HTTP Error 400. The request hostname is invalid.

why?
0
Comment
Question by:HuaMinChen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:becraig
ID: 38792690
Can you check your site bindings in IIS

run inetmgr and for the site you intend to browse to ensure iis has the port 81 bound to that hostname.

click on the site in inetmgr and edit binding and from the dropdown select your site and enter the port 81 (you should be good to go)

If any issues you can run iisreset /noforce from the command line.
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 38795420
Thanks a lot. I can see Site bindings that is

Type      Host name            Port
http      win08.huamin.com      81

is already there. What to adjust on that?
0
 
LVL 29

Assisted Solution

by:becraig
becraig earned 500 total points
ID: 38795454
This indicates that port 81 is bound to win08.huamin.com

You need to create a binding to WIN-BVDIC8GIAHI on another port (e.g 8080 etc) or change the hostname on that binding to reflect WIN-BVDIC8GIAHI.


If you are deploying a testing site you want to configure a different port when deploying your test application, since I am guessing the site on  win08.huamin.com  is a live site.
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 38795483
Thanks a lot. After I have used "WIN-BVDIC8GIAHI" instead as the hostname and have restarted the machine, I then get this
Server Error in '/Start' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:

Line 12:
Line 13:   <system.web>
Line 14:     <compilation debug="true" targetFramework="4.0" />
Line 15:
Line 16:     <authentication mode="None">


Source File: c:\inetpub\Start\web.config    Line: 14

Does it mean a problem with the Framework version?

Many Thanks & Best Regards,
HuaMin
0
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 38795491
check the framework version for the app pool in IIS

your web.config indicates 4.0 ensure you app pool is set to the same, it might be set to 2.0 instead of 4.0


click on the app pool and you will see the version on the right column
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question