IIS 7 and Above
vs2017 website published to IIS
Last post Oct 31, 2017 12:04 AM by bbxrideriis
Oct 03, 2017 12:32 AM|bbxrideriis|LINK
can't figure how to run localhost webiste
trying to run vs2017 published site in local host mode i.e. not vs2017 debugger
1. create new folder C:\inetpub\wwwroot\p3, give iis_iusrs modify permission
2. in iis, create new website, p3site, ip address = all unassigned port = 8083
3. in vs2017 create website, site3 (site3.aspx) runs ok in debugger but can't send gmail (trapping that error, working on that)
4. in vs2017 create new publish website project to: local iis, p3site (from above) publish method = file system and target = localhost:8083, all t he files from the project are there
5. hosts file has entry for 127.0.0.1 localhost
url = http://localhost:8083//p3/site3.aspx
server error resource can't be found
url = http://localhost:8083
Line 13: </asp:PlaceHolder>
Line 15: <webopt:bundlereference runat="server" path="~/Content/css" />
Line 16: <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
url = http://localhost:8083/p3site
HTTP Error 404.0 - Not Found
Oct 03, 2017 06:31 AM|Yuk Ding|LINK
Th error message looks just like a code issue. So please just ensure it could works fine in IIS express in visual studio debug mode.
In IIS, You could publish the website following this link:
Please check whether the application file has been copied to the root folder of your website and your site binding is
<site name="Default Web Site" id="1" serverAutoStart="false">
<binding protocol="http" bindingInformation="*:8083:" />
In web deploy wizard, just set server:localhost, site name:default web site, destination URL
Considering it is pure 404 error, please check whether IIS developer feature has been installed like world wide web service/http common feature/static content and features under application development feature.
Oct 03, 2017 07:36 AM|bbxrideriis|LINK
well this works: localhost/p3/site3.aspx
not sure why I don't need to designate the port? because its localhost?
and since I have created both a site and application that points to site3.aspx should I not be able to reference just the site and have the default app be invoked?
but moving on I have questions about the site being SSL enabled and if that will allow being able to send encrypted email authentication to a smtp server like smtp.google.com which requires authentication be encrypted. After enabling site SSL and sending
email with EnableSsl = True I'm still getting email rejected at google with:
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
Oct 05, 2017 03:54 AM|Yuk Ding|LINK
I think because the binding is set to unassigned IP address. So when you need to acccess the website, you don't have to input the port.
This link provide the solution for SMTP error:
Oct 05, 2017 05:26 PM|bbxrideriis|LINK
I think I have seen and tried all the SMTP/google posts, I think I have code that should work. after many posts replies and untold frustrating hours trying to get sending mail, the problem now seems to be the narrowed down to the version of .net framework
for some reason my vs2017 keeps using .net framework of "Version: 4.0.30319.42000" which does not implement TLS 1.2 which is evidently required by google. In the vs2017 project compile properties I have selected to use 4.7.1 the highest
version available but I'm still stuck with the 4.0......
I have a post into the visual studio community but not getting replies for that.
Oct 05, 2017 07:00 PM|Rovastar|LINK
Really you will have better luck diagnosing this if you use IIS proper and not VS/IIS Express.
Running wireshark.netmon will tell you what the TLS handshake is doing and what you are communicating on.
Check you machine is patched up to date too. I think it was older CLR had an issue with the coding and sending TLS1.2 by default that needed a hotfix that then became an update.
It sounds like you are using latest .net CLR v4.0 which will include asp.net 4.7
As what OS are you on? do you have correct ciphers and compatibility on there to match the destination server?
Oct 06, 2017 07:01 AM|bbxrideriis|LINK
thanks for the reply
Really you will have better luck diagnosing this if you use IIS proper and not VS/IIS Express I have run in both local IIS and the debugging IIS express with same results for the google sendmail, "System.Net.Mail.SmtpException: The SMTP server requires
a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at"
It sounds like you are using latest .net CLR v4.0 which will include asp.net 4.7, it does appear that the "Version: 4.0.30319.42000" which I thought was the .net framework version is a CLR, and supposedly that CLR version does include/use
.net framework 4.7.1. sorry my ignorance and mistake there
As what OS are you on? do you have correct ciphers and compatibility on there to match the destination server? I'm running win10 pro and depending on MS to keep me updated. Don't know what are ciphers and compatibility for the destination server?
my destination server is my local Installed IIS 10, when I published to IIS for now I just let vs do the publish, for the project URL I specified http://localhost/mysite
and vs created a virtual directory, "mysite" pointing to my file system vs development directory ..../source/project/project/project
downloaded the wireshark, have to figure out what that does tomorrow, will post results of that tomorrow
put some of the reply here in italics to reference your input but looks like that is not being rendered?
Oct 09, 2017 08:39 AM|Yuk Ding|LINK
IIS crypto could help you modify the SSL configuration:
Oct 11, 2017 05:41 AM|bbxrideriis|LINK
thanks for all the replies, still working on ports and sites names but at least I can run site with localhost/FileSystemFoldername/programName
Oct 17, 2017 03:01 AM|Yuk Ding|LINK
So have you checked whether the 404 errro is displayed in IIS log? If there is a log entry, at least prove that the request is routed to localhost:8083 correctly.
Oct 31, 2017 12:04 AM|bbxrideriis|LINK
created a local domain in my hosts file and can run website using that domain
also created a binding (with no domain name) to my local ip and a unique port and can run website using local Ip with the assigned port
so for now not concerned how to run website using specific "localhost" in the url