0

I want to publish asp.net MVC web application on my windows laptop and I want to access published web application with my customized URL which not contained localhost keyword.

I tried it a lot but there are 2 problems:

1) I am not able to access the published site

2) If I publish as localhost I can reach my web application [Which I don't want]

Prashant Pimpale
  • 10,349
  • 9
  • 44
  • 84

1 Answers1

0
  1. Publish your site normally on IIS
  2. Go to C:windows/system32/drivers/etc/
  3. Open the hosts file with notepad
  4. Go to the end of the last line and hit Enter, then add the following line
    127.0.0.1 fatma.com
  5. Save the file. Note: If Save As dialog shows up, choose another directory. Change Save as type to All Files. Press Save. Replace the hosts file in C:windows/system32/drivers/etc/ with this one.
  6. Open your browser and type fatma.com This will open your localhost site. If you published your site on a different port for example 8090, you can reach your site by fatma.com:8090
    For more information check this .
vahid
  • 258
  • 2
  • 8