Last post Jun 09, 2017 02:58 AM by zxj
Jun 08, 2017 03:54 PM|gunderj|LINK
In IIS I create a website named myProject that does not go under “Default Web Site” and has these settings...
Site name: myProject
Application pool: DefaultAppPool
Physical path: C:\myProject (with connect as a Windows user with database privilages)
When using VS 2013 publish with web deploy, I have these settings...
Site Name: myProject
destination URL: http://localhost/myProject/index.html
The publish succeeds but I get error at end of publishing when it tries to open the index.html:
HTTP Error 404.0 - Not Found
In the error details I get...
Requested URL http://localhost:80/myProject/index.html
Physical Path C:\myProject\myProject\index.html
Why won’t the index.html open successfully? (I do see that c:\myProject\myProject does not exist)
btw, I did get this to work by creating the website under "Default Web Site" and adding that path to publish site name but this then forces me to add the project name in my custom URL’s. I do not want to add project name to the URLs because testing in VS 2013
fails (with or without tilda).
Thanks so much.
Jun 08, 2017 04:37 PM|JBetancourt|LINK
add to file C:\Windows\System32\drivers\etc\hosts
a line like:
then on the local iis modify the binding on your website(not default website) setting host name to abc.local
then in Visual Studio on you project properties, on the web tab change your settings to "local IIS" and project url to http://abc.local
Jun 08, 2017 04:46 PM|PatriceSc|LINK
localhost and localhost:80 is the same site.
When processing a request, IIS must have a way to select which site should process this incoming request. It is done by seeing which site best matches the IP address, port address and host header name for the incoming request.
So you have to configure at least one of those information else the default web site is still used (the default web site is configured for port 80 which is the default http port).
Jun 09, 2017 02:57 AM|EvenMa|LINK
According to your description, you create another web site in your IIS, the another web site you could specify another port(not 80, 80 is default exists by the Default Web Site) to access the site.
At first, you could specify 8080 port such as the following picture to create your site.
then when you use web deploy tool in visual studio to publish site, you could set the configuration as the following picture, I had been test succeeds.
You could try it as my did, that’s all right.
If you have any other questions, please feel free to contact me any time.
Jun 09, 2017 02:58 AM|zxj|LINK
I did get this to work by creating the website under "Default Web Site" and adding that path to publish site name but this then forces me to add the project name in my custom URL’s. I do not want to add project name to the URLs because testing in VS 2013 fails
(with or without tilda).
To access your website with a domain name, such as http://www.testsite.com, instead of http://localhost/testsite or http://127.0.0.1/testsite on your local machine. For more information, see How
to Access the Site Using Domain Name Instead of localhost in IIS.
Make a backup of the host file located at c:\Windows\System32\drivers\etc\hosts.
Change the hosts file: