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

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.

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.

I tried to setup Gitlab pages and it broke the VM?

I have been running a gitlab instance and today I was trying to setup the pages function. I followed the gitlab guides and google cloud docs, it seems my config file got corrupt or broke (by me ofc) and even the ssh was down (directly on google console) till I rebooted the VM. Now I'm able to see that the instance is working on the shell but can't get it back online, I have 3 options here, 1) I wait a day or so to see if this is a domain/dns issue, 2) keep trying to a recover the gitlab that only had 3 users and no projects, or 3) make a fresh one and try to setup everything well from the start. The only things bothering me is losing 2 users that came to my project organically.
What can I do here? I'm trying to fix the config file but at the same time I don't know if its a domain issue because I had to change some dns configs to set the subdomain. The only thing I cannot understand really is how or why did my shell went down for at least a hour after I changed the configurations for gitlab. And btw are snapshots the right way to make backups with gcloud ?
What can I do here?
Undo your changes; in other words, put things back they way they were before, when the system was working. To do that, you have to know exactly what you changed.
If you are not keeping your config file in version control, you should start to do that, as that will make it easier to track and control your changes.
I decided to answer my question since I know how this problem occurred and it may occur for others.
Conditions:
Have a Gitlab self hosted.
Try to setup DNS settings for Gitlab Pages and the URL stop
responding even if the Gitlab instance still runs on the machine.
Here we can see the problem was in the DNS setup.
In my case I setup different DNS cases in my DOMAIN service DNS settings. Instead this DNS setup have to be made in your HOST/SERVER side.
To properly make a Gitlab DNS:
the wildcard domain *.mydomain.com type A should be on the server config, in my case gcloud DNS. Find out the software you use for your main machine server config.
Its good practice to setup the domain and server without redirection and set the proper DNS on the DOMAIN settings. This way your domain will resolve the subdomains without need for redirection on the DOMAIN settings. Once you set a wildcard type A record you can or cannot make the subdomain as a CNAME example, subdomain.mydomain.com. or you can use a separate IP for the subdomain with a type A record.
In summary, when setting up Gitlab Pages DNS do not change your DOMAIN settings, change your SERVER DNS settings.

Can't open local IIS site in IE or Edge

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...

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.

CCtray unable to connect to dashboard

I am using CCnet 1.6 and cctray 1.6. On the build server, the tray works properly using localhost. Remotely though, I am not able to connect the tray to the dashboard. The dashboard URL works great, but when I put that into the cctray settings, I get a 500 internal server error.
This worked up until I had to move CCnet from defaultwebsite to its own. Did I miss something when I changed it over?
Thanks,
Joe
Actually this is similar to a question I just asked but if you want to persist with remoting (but may not work so well over the Internet with firwalls and the like)
Open your dashboard.config (likely path is C:\Program Files (x86)\CruiseControl.NET\webdashboard\dashboard.config)
Find the port number your dashboard is connecting to the server on (eg: 21234)
In CC Tray, select remoting and enter hostname:portnumber (eg: mycruiseserver:21234)
Assuming that the CCNET server is part of your local network this should work:
Select .NET remoting as connection type
Specify the CCNET server's address only by its IP address (instead of using the dashboard URL)
Try switching off your firewall, it may be that you havn't opened your port.
Then, use the buildserver:port method (remotely via .NET).
I just fixed my problem (v1.8.3 for my installation).
I set the name attribute in the <server /> tag in dashboard.config to match the hostname. I'm not sure if that is required but that is the first thing I tried.
Then I inspected the bindings for the site that the dashboard is hosted under in IIS. The hostname for the binding was blank, so I changed it to the hostname for the site.
I noticed that the CCNet machine's event log had exceptions logged for unknown domain when I was trying to connect CCTray to it.
When I went to add a build server in CCTray on the remote machine, I selected via dashboard and it worked for me.

Resources