2

I have a Web App written based on MVC framework. It runs really well on the localhost and default port 51290. Now I need to run it using my domain name e.g. myhostname. What I have tried is to add a line in "applicationhost.config" section:

            <binding protocol="http" bindingInformation="*:80:myhostname" />

When I press Ctr+F5, I got an error msg saying port 80 is in use.

The server is IIS express.

Can someone please instruct how should I run this App using host name? Thanks.

Bing Han
  • 545
  • 1
  • 6
  • 10
  • If you use Skype, it could be that using port 80. See [here](https://stackoverflow.com/questions/22994888/why-skype-using-http-or-https-ports-80-and-443) – ProgrammingLlama Nov 09 '17 at 00:55

2 Answers2

1

After I run visual studio as admin, everything worked!

Bing Han
  • 545
  • 1
  • 6
  • 10
-1

Win+R to open the Run dialog.and type "drivers"

now you can see "etc" folder,inside that there is a file named as "hosts".open that and change local host name to your domain name. http://www.c-sharpcorner.com/UploadFile/8d44fb/how-to-access-the-site-using-domain-name-instead-of-localhos/

Ajas Aju
  • 725
  • 7
  • 30