Domain alias for localhost

Kenny Deblaere asked on August 18, 2016 11:24

Hello

I've created a Domain Alias for my localhost space, but when I'm running the alias I'm gettting HTTP Error 400: Bad Request - Invalid Hostname. I've seen I need to create a license, but after creating it, it gives the same error.

Correct Answer

Fabian Haeger answered on August 18, 2016 13:17

Your binding definitly is in an incorrect format. Everything else seems to be fine.

http:127.0.0.1:80:localhost is invalid. It should be just "localhost", maybe "localhost:80".

0 votesVote for this answer Unmark Correct answer

Recent Answers


Markus Gruen answered on August 18, 2016 11:26 (last edited on August 18, 2016 11:26)

0 votesVote for this answer Mark as a Correct answer

Fabian Haeger answered on August 18, 2016 11:27

Does your IIS has a binding for localhost configured? And is it pointing to the corresponding CMS folder of your Solution?

0 votesVote for this answer Mark as a Correct answer

Dawid Jachnik answered on August 18, 2016 11:28

Hello,

Did you bind your domain localhost for your website? Also check the web.config for errors.

0 votesVote for this answer Mark as a Correct answer

Kenny Deblaere answered on August 18, 2016 11:36

When I'm surfing to localhost:51872, I don't have any problem. I hope this answers your question.

Web.config does not give any error.

I've created a free license for office.localhost, the license I have is the default license for localhost.

0 votesVote for this answer Mark as a Correct answer

Fabian Haeger answered on August 18, 2016 11:53

It looks like you are using IISExpress in your solution.

You can configure your IIS to point to your Solution. To do this, you need to configure a binding for localhost for your website.

To achieve this, you need to open IIS and create a new site via "Add Website". You can choose the Site name freely. The physical path needs to point to your /CMS directory of your solution. As hostname configure localhost.

Otherwise you could do this kind of in your Solution. Right click your CMSApp Project and select "Properties". Navigate to "Web" and switch the dropdown under Servers to local IIS. Now edit the URL to "http://localhost" and click "Create Virtual Directory". Save the Project, build again and should work too.

0 votesVote for this answer Mark as a Correct answer

Kenny Deblaere answered on August 18, 2016 12:02

I've configured my IIS to point to localhost, But I'm getting HTTP Error 404. The requested resource is not found.

0 votesVote for this answer Mark as a Correct answer

Fabian Haeger answered on August 18, 2016 12:08

Can you give us a Screenshot of your IIS configuration under "Bindings" and "Basic Settings"? It's hard to tell if there might be something wrong, without knowing the configuration :)

Do you have any additional webs configured in your IIS which point to localhost too?

0 votesVote for this answer Mark as a Correct answer

Kenny Deblaere answered on August 18, 2016 13:08 (last edited on August 18, 2016 13:09)

This is the binding. I removed other websites, but I keep getting the same error

Binding

Basic

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.