Can't open local IIS site in IE or Edge - iis

I have a site set up locally to do development on it and I have added it to iis and edited my host file with the url (see below). However, when I browse to the url I only get the "hmm, we can't reach this page" message.
The site works well in all other browsers including ie 11 so I was wondering if there are any settings to get local sites to work on edge.
I have been searching and could only find this related post, but the accepted answer on that makes no difference to me as the option is already checked on my edge. I have also tried the rebooting and flushing my dns but both didn't work.
I am using windows 10 and iis version 10 build 10240
Hosts File
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost loopback # tried with and without this as thought it may have something to do with the loopback option in edge
127.0.0.1 test.local
127.0.0.1 dev.local
Other links I have managed to find - no solutions though and the second one seems to suggest that we just use ie11:
Why does Microsoft Edge open some local websites, but not others, where the domain name is routed to 127.0.0.1 in hosts file
https://social.technet.microsoft.com/Forums/en-US/246298d8-52c1-4440-8d7f-05329d50e653/edge-browser-hosts-file?forum=win10itprogeneral
Update
Could it be something to do with the fact the site app pool is running under my work account instead of IIS or Network services (I cannot run under the latter 2 as they don't have the correct privileges to browse certain folders on my computer)
Update 2
For anyone coming to this who has tried everything below. I have found out it may be something to do with my windows 10 installation - My first install on the machine was windows 8. I then upgraded this to 8.1 and the up to 10 when that came out.
Having had issues with a few other things, I bit the bullet and did a completely fresh install of windows 10 and voila, everything works perfectly!
May be a bit drastic, but if all else fails...
Update 3
I recently got a new work machine and had this problem all over again, tried everything but still couldn't get it to load - turns out that the work proxy was causing the issue so if you try everything below and have a proxy, check the proxy is not blocking it

The network is blocking loopback as a security measure in Windows 10, you need to make an exception by running this command for IE Edge in elevated privileges
CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"

This worked for me;
Open the Internet Options dialog
Go to the 'Security' tab
Select the 'Local intranet' zone
Click the 'Sites' button
Check the 'Automatically detect intranet network' box
Edge can now find my local website (with a single word name!)

I figured it out and posted the answer over at my question: Why does Microsoft Edge open some local websites, but not others, where the domain name is routed to 127.0.0.1 in hosts file
(Assuming your issue isn't simply the loopback checkbox in about:flags)
The fix is to remove the domain names from your trusted sites list for the trusted zone. That's it. It took me two weeks to figure this out.
Open the Internet Options dialog (just ask Cortana or use windowskey+s)
Go to the Security tab
Click on the Trusted Sites zone
Click the Sites button
Remove the troubled domain names from the trusted sites list
Click Apply and then close the dialog
Open Edge (or restart it if it is already running) and try your site

Follow these steps:-
Step 1: Run Command Prompt as Administrator
Step 2: Write command "CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"" and press enter. It returns OK.
Step 3: Restart Microsoft Edge or Internet Explorer to view your web page
I hope, this helps you.
Thanks!!!

Internet Options / Local intranet sites
This works for me:

On my Windows 10 machine with Edge these are my results:
127.0.0.1 local # Hmm, we can't reach this page
127.0.0.1 my.local # Works :)
127.0.0.1 my.local.ca # Works :)
127.0.0.1 test.local # Works :)
127.0.0.1 dev.local # Works :)
In your hosts file, use a fully qualified domain name (FQDN) instead of a nickname. In other words, include a dot. Then it will work in Edge.
My environment is also Windows 10 with IIS 10.0.10240.16384 installed.
And these are my settings within Windows Features > Internet Information Services > World Wide Web Services
The Application Pool that I am using has its identity set to the account with which I log into my computer. It also works, though, when the identity is ApplicationPoolIdentity. In other words, both the EdgeHostsFile and the DefaultAppPool in the image below work on my machine.
And as you have already posted, my about:flags look like this with the allowance of the localhost loopback.
My Edge version is 20.10240.16384.0

After you have tried all instructions or settings from other users but it doesn't work, try this:
Open Internet Options. (type "in" in "Search Windows/Cortana" if you using Win10)
1. select "Security" tab.
2. click on "Local intranet"
3. click "Sites" button.
4. Uncheck "Include all local (intranet) sites...."
5. Uncheck "Include all sites that bypass..."
- click "Advanced" button, remove all site address which defined in %windir%\System32\drivers\etc\hosts
6. & 7. OK
8. Restart Microsoft Edge or Internet Explorer.

In addition to adding the hostname to the hosts' file, go to Internet Options and add the URL to the trusted sites under the Local Intranet. That works for me.

I faced this error when i try to run my application locally using IISExpress. I have changed below configuration it fixes the issue.
Go to IISExpress config file which you will probably found in Documents-->IISExpress-->config--> applicationhost.config
Move the NTLM provider value above Negotiate like this
<windowsAuthentication enabled="false">
<providers>
<add value="NTLM" />
<add value="Negotiate" />
</providers>
</windowsAuthentication>
It fixes my issue. And i was able to browse my application with out any error in microsoft edge.

For IE specifically, on this page...
I found an answer similar to others, but a slightly different command:
CheckNetIsolation LoopbackExempt -a -n=windows_ie_ac_001
...As admin, like the other solutions.
I don't know if I found a different answer because I was searching for Internet Explorer specifically, but it worked anyhow.

I tried all the options mentioned , but no success with IIS Express !!!
BUT
just a small thing i did (i don't know why) . and the stuff started working for me
I deleted the entire .vs solution folder. which has the applicationConfig for solution , to be used with IIS Express ....
IT Worked !!! i am not sure if its the combination of above mentioned stuff and this file, or just this file...

Related

Unable to host Blazor application

I am unable to get a Blazor app working while hosting the application as an IIS application on my local Windows 10 machine. The app is very simple, with just one page with minimal components - even simpler than the default Blazor app provided.
These are my steps:
Click on publish app
Select Folder, note it's going to ...\bin\Release\net5.0\browser-wasm\publish\
Open IIS, navigate to Default Web Site
Right-click Default Web Site and select Add Application
Select physical path as the path above, and host at www.NAME.com
Click Browse.. to view the app at www.NAME.com on *:80
Page displayed is the welcome page of IIS
Attempted Solution 1: Install URL Rewrite
Attempted Solution 2: Go to Hosts (in System32) and tried adding 127.0.0.1 or 127.0.0.1::80 followed by www.NAME.com
Attempted Solution 3: In index.html, edit the base element to include the link <base href="/NAME/" />
Attempted Solution 4: Instead of adding an application under Default Website in IIS, add it as a website instead
Attempted Solution 5: Gave IIS_IUSRS full permissions to web.config (Image)
None of the attempted solutions worked. I just started using Blazor yesterday and I am very new to this. Am I doing something wrong? Thank you!
Please refer to this tutorial, I think is one of the best tutorial to achieve your goals:
https://blog.medhat.ca/2020/08/deploy-client-side-blazor-web-api-to.html?m=1
Remember that the configuration of the hostname in your hosts file is related to your machine only
So, in order to allow the students to access your IIS published site you need:
Register a hostname in a DNS server that all the computer of the students will use to resolve your machine name. I.e. if your machine should be accessible with www.name.com you need your DNS server resolves this name with your local IP address
To use the https protocol you need a certificate on your local machine, loaded in your IIS configuration, but the same certificate has to be available to every computer of your students.
I think the better and simpler solution is to use your local machine name, probably using your full DNS name, and allows the students to access the site using this name on their browser.
In this case you can use your local development certificate to allow https connection
This certificate is already installed on your machine for development purpose.
Every concept I've described is well documented on the web and here on the SO.

ReInstall Sitecore IIS can't resolve host (with ERR_NAME_NOT_RESOLVED)

I decided to reinstall Sitecore 8 instance via wizard, I have removed instance and install a new one with the same name XYZ.
but after reinstall it I am getting an error in browser - ERR_NAME_NOT_RESOLVED
I checked IIS binding, I checked hosts file, reset DNS, restart PC and etc I still get this error in any browsers.
How I can fix it? What is the issue?
I have found solution https://support.microsoft.com/en-us/kb/2823477 but I can't understend how sitecore installer can change it.
Generally, the process of site resolution goes in the following consequence:
DNS - find ip address by the hostname (from request header)
Access IIS with that IP (and port if not default 80)
IIS checks bindings by hostname from header and serves corresponding website.
Website being resolved has (merged) web.config in root folder. It has node with all sites served by current Sitecore instance, being listed. Order does matter! First successful match (by hostname or port or default) works it out.
Site being found on previous step has startItem property which is your Sitecore item served by dafault.
Please go and carefully check all those steps to see where it breaks. Also I have previously write a blog post, you may find it helpful with more details on that:
http://blog.martinmiles.net/post/how-websites-are-resolved-with-sitecore
Do any sites work with a Local name configured in 'hosts'?
You may need to disable the Loopback Check in your tcpip stack. Windows uses this as a countermeasure for man in the middle attacks by default on many systems. A registry change is needed to allow a machine to refer to itself using a name that is not its own Hostname. Sorry, but I can't remember the actual key.

404 not found on client website on Mac only - works on other computers, smartphones, tablets

I created a website based on wordpress with a custom theme setup. The live website renders fine on every computer, smartphone and tablet i've tried, except for my Mac, which I use as my local development machine. I have tried various browsers on my mac. The off-line development version renders fine.
When I visit the website http://www.redroselimos.com/ I get the following error:
Not Found
The requested URL / was not found on this server.
I suspect it is a DNS issue or perhaps a Mac configuration issue?
Mac OSX 10.7.4
Chrome 22.0.1229.79
MAMP PRO 2.0.5
DNS: 208.67.222.222/208.67.220.220 (openDNS)
If it shows up fine on every other machine then the site is validly there and it can only be a networking issue for your Mac. Most likely as it is your dev setup you have other settings in place. The 404 error means you are at least reaching a webserver, so you are getting out to the internet. There are a few things you can do:
You could check your /etc/hosts file to see if you send that domain to another IP - which would be my first suspicion.
Also check the httpd.conf on the server to see if you handle your dev machine's IP differently, or if it's rerouted in .htaccess.
You can also try tail -f /var/log/httpd/access_log or whatever your log file is and then try hitting it again from your Mac and see what comes through.
Try going through a proxy from your Mac to your site. proxify.com and hidemyass.com both work for this, that way you'll see if it's strictly an IP issue.
This should point out exactly what the error is.
I have Mac, Lion 10.7.5, Safari 6.0.1
no error. Surfed to the link you wrote, I can see the site (top left a form to login, center header a kind of gallery, some other stuff in the center)
I have no special configuration, only default. If you didn't change the configuration before that is not the problem. If you do, try to restore the default settings.
I think that is a problem with localhost, because you want to surf to your pc from the outside being inside. I don't see a valid reason to do that, if your mac is the host of the site you just need to surf to localhost.
By the way, there is an update to version 10.7.5 for Lion
What causes the Hosts File 404 Error in Mac OS X
The Hosts File is found on the user's computer machine. It is not found using the Search or Finder function. It is woven into the machine code.
The hosts file is used to map DOMAIN hostnames to IP NUMBER addresses. Example: MyDomain.com shown in browser is really a number on the internet 111.11.11.11
This map process is called "resolving" the browser alpha letter name into the numerical number address used by the internet.
Most hosts files do not have many entries because most browser name entries are resolved in DNS lookup tables provided to the user by the internet provider.
A hosts file can cause the local computer machine to present a 404 Cannot Find Page error. This is because a webpage domain entry is in the list that is wrong or it is out of date.
One day the domain entry was correctly shown to be 222.22.22.22 but really it has been changed to 333.33.33.33
Another computer machine will go to 333.33.33.33 without any problem because there is an up-to-date listing in the local machine's hosts file. Or there is not even an entry.
So, the local computer hosts file needs to correct the error. To stop the 404 error. This is done by editing the local machine's host file. The bad out-of-date entry needs to be is updated. Or the entry is needs to be completely removed from the hosts file.
If the entry is completely removed from the hosts file then the internet provider just sends the local computer machine to a internet DNS file to "resolve" the browser alpha letter entry into a numerical interet address
Instructions for editing the hosts file are here: How to Edit the Hosts File in Mac OS X with Terminal. Knowing how to use Terminal is required.

Configure IIS to access Deployed website globally (through WAN) [NOTE: I have static IP]

I am completely new bie to IIS.
I have a very basic knowledge about how to configure IIS.
Today I have a requirement to access website Globally through WAN (through internet from any PC all over world) which I have deployed in my Local IIS.
The website=> SilverLightBusinessApplicationWeb
which you can see in my below screen shot can be open in LAN nicely.
so I only looking for how to open it in WAN?
So anybody please suggest me a simple steps or instruction for it.
You can see two screen shot of Internet Information Service (IIS) Manager.
NOTE: 1. I also have static IP 2. i am using IIS7.0 with Windows-7
Thank you so much…..
1. Screen Shot1
2. Screen Shot2
This question is probably better off on ServerFault. However, providing you have everything set up on your machine, you just need to open and forward port 80 to your host machine and set up a domain or access the site directly via external IP providing your bindings are set up correctly.
EDIT From a security point of view, it would be better practice to do as Germann said by having your public facing web server in its own DMZ.
Finally i have got it........
the steps i have followed are......
define port forwarding at router for that i have enter following values in my router's forwarding page.
--IP address of my PC
--port number which is open(you can see screen shot Brouse*:80(http) which shows port 80
is open for website on my IIS.
finally i have opened website on my IIS by : .http://mystaticip:port/xyzfolder/xyz.html.

IIS 7.5 broken, cannot connect to localhost, error 404

Someone set up IIS 7.5 on my computer with a sample project. I created a new project and I wanted this new project to be accessible on the localhost (default port 80). I changed the Site (under Sites in the navigator) in the IIS Manager and now I can't do anything.
When I try to run the project from Visual Studio it opens successfully in the browser in "localhost/#somePort" but when I try to type in just "localhost" into the browser, I get a 404 Error.
Please, any ideas on how to fix this? I think maybe some default files for IIS were changed/corrupted.
Usually from Visual studio if it's an ASP.net project it will run from the Web Developer test engine (which is a mini iis that runs on a random port)... You need to publish the project to IIS or copy the compiled output to a folder that is within your IIS's site's directory path and change that folder to an application (from the iis mmc console, right clicking on the folder and selecting Change to Application, I believe...
I wasn't sure about the "localhost/#somePort" but i'm assuming I am getting what you meant ;)
I just ran into the same problem. Apparently changing the bindings changes only the default site / and not the child virtual applications.
I found this article - http://www.carryoverbit.com/running-iis-on-localhost-only/
Incase the link is broken...
After editing the bindings in IISManager ("Edit Bindings..."), you need to use netsh and add 127.0.0.1 as a listener for http traffic.
Open command prompt (as admin)
netsh
netsh> http
netsh http> show iplisten
(empty list is shown)
netsh http> add iplisten 127.0.0.1
IP address successfully added
Now use iisreset and everything should work.

Resources