server DNS address could not be found - iis - google-chrome

I added new site in IIS
When I'm trying open site in browser it is showing DNS error
trying to resolve it since 5 days but I'm unable to solve this issue. please help
I'm using windows 10 OS

It's because the host name is not recognized by the DNS server that your browser is querying looking for the IP address. You can get around this by editing your hosts file at c:\windows\system32\drivers\etc\hosts (there is no file extension on this file). Here's a link explaining how to edit this file: http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
Once you get into your hosts file, add an entry for your local website like so:
127.0.0.1 admin.vdeliver-local
Save the file, then clear your browser's cache and then you should be able to visit the site.

Related

Adding 127.0.0.1 to hosts file to redirect locally has error. Says my site “refused to connect.”

I answered this below for anyone that is interested
I'm on Windows 10 using Chrome, Firefox and MS Edge. I'm trying to do something for a class I'm taking and can't get it to work. All I want to do is add something like this to the hosts file:
127.0.0.1 mysite.dev
This is ALL to run on my local PC. I eventually need to have my site able to run on IIS, but this is the first step and I can't get past it. (I'm on my second day trying)
What I've done:
I did edits in notepad on a file on my desktop.
I renamed the original hosts file in the drivers/etc directory.
I copied my file into the drivers/etc directory.
I ran ipconfig -flushdns
I successfully pinged the new site with: ping mysite.dev
I cleared browsing history in all three browsers.
I reopened all three browsers.
All that failed to make any difference (and I rebooted as well) So I added this:
I ran ipconfig -flushdns
Then ipconfig -renew
Then ipconfig -registerdns
Then repeated steps 5->6 and all failed to make any difference. These are the errors per browser:
Chrome: This site can’t be reached mysite.dev refused to connect.
Firefox: Unable to connect Firefox can’t establish a connection to the server at www.mysite.dev.
MS Edge: Hmmm...can’t reach this page
I noticed that all three browsers changed http to https. Not sure if that mattered but I followed instructions to disable this re-direct for all three browsers and NONE of them actually stopped the redirect to https.
And I still can't the correct result, which should be the IIS default page. I can see the IIS default page with localhost, so IIS is running.
Help! Any ideas or directions at all would be very appreciated!
Got the answer from someone. Google owns the .dev domains and has restrictions on it so it HAS to be HTTPS, which requires certs etc, which is not in the scope of my class. I just changed it to mysite.local and BOOM!, there it was! Thanks.

Hyperlink not working address automatically updated with extra forward slash

I have an HTML document with a hyperlink to a Visio version of the HTML.
I have been able to successfully access the Visio version, however, now when I click on the hyperlink to access the Visio I am getting an error:
Windows can't find 'file:///C:/DDL_14.1.1/DDL/HTML/filename.vsd"
Where are these 3 forward slashes prior to the file address coming from? The address link saved in the hyperlink address does not have the 3 forward slashes.
Possible cause: Your web server may not be running. The prefix "file:///" means your browser is trying to access a local file or is assuming so. Have IIS running, and put the file in the folder equivalent of wwwroot or in a virtual directory. Look at the original address of the hyperlink and see whether it points to another web server on the network or on the internet. After you place the file in the wwwroot, in IIS itself you could say 'Browse' and the IIS will serve it with an address that looks like 'localhost' or a local network ip address and port.

Local debugging of subdomains with VS 2015

I have a multi-tenant website that has to take care of any incoming request and determine the appropriate routing by the URL subdomain.
I set up the subdomain routing using this or a similar solution.
However I'm trying to access my website on my local machine using subdomains an alias website. I'm unable to get my local IIS to port to my website with the subdomain I've specified.
I want to dedicate a virtual domain name in my local machine that will port to the website I'm debugging on VS (localhost:23456).
I've read some answers of identical questions (like this or this one), but it looks like the system has changed with the new IIS and Visual Studio 2015 and ASP.NET 5 MVC 6 (vNext) project configuration.
Here's what I've tried according to the answers linked above:
I tried setting the hosts file porting www.myexample.com to 127.0.0.1 but I get a "Bad request" error when navigating to www.myexample.com:23456 in my browser, and anyway the debugger doesn't report a request.
I tried setting <binding protocol="http" bindingInformation=":23456:www.myexample.com" /> in the applicationhost.config file, gets IIS to raise an error saying "Replace hostname with localhost. Any other bindingInformation not specificying localhost as the website raises that IIS error.
Update
After opiants answer
I knew about the .vs folder and that's were I was configuring the bindings indeed.
However, looks like it was the permission that caused IIS to throw errors.
Running that netsh command solved the issue. And BTW, since I'm only running it my own machine, I'm not gonna need to open the firewall.
Anyway my question is if there is a way to add a wildcard instead of each subdomain separately? Since each tenant gets a unique subdomain, the whole process of adding subdomains is going to be dynamic by nature. I need to allow an asterisk in all the 3 places:
hosts file
applicationhost.config file
netsh command
It looks like I can add the asterisk in those places but it doesn't actually work.
I'm guessing you're using IIS express locally?
If so, in your solution directory, there is a .vs folder. You need to add the binding in the \config\applicationhost.config file inside that folder. Then make sure that you've allowed IIS express to listen to that subdomain.
You can refer to Scott's article on how to configure IIS Express. Specifically look for this paragraph "1. GETTING IIS EXPRESS TO SERVE EXTERNALLY OVER PORT 80"
To be more specific, you need to run these commands:
netsh http add urlacl url=http://{your-domain}:{custom-port}/ user=everyone
netsh firewall add portopening TCP {custom-port} IISExpressWeb enable ALL

Chrome localhost does not work

I have defined some virtual servers that until the last days were working fine.
Now they don't on Chrome, but there are no problems in firefox or safary.
I get this:
This webpage is not available
ERR_ICANN_NAME_COLLISION
Hide details
This site is using a new generic top-level domain (gTLD). If you have
used loc.dev to access an internal site in the past, contact your
network administrator.
I found as a solution:
Set the "Built-in Asynchronous DNS" to "Disabled" in chrome://flags, but the is no such flag in my chrome version ( 43.0.2357.81 )
Do you know a solution for this?
LE : If i move the site on the htdocs file and i go on the url http://localhost, it works. It seems that it has a problem only with virtualhosts.
Got the same issue after updating to the latest chrome version last night. I was getting a ERR_NAME_NOT_RESOLVED error only on google chrome for all of my virtual hosts. Here's how that looked.
Screen Shot-> DNS name not resolved error
Here's the fix I made.
Clear up the google DNS cache by typing this in the Chrome browser
chrome://net-internals/#dns
Screenshot -> Flushing Chrome DNS cache
You will see a button "Clear Host Cache". Press that DNS cache
will be flushed.
Keep this DNS window open. Now access the virtual host in the browser
for me it was http:/api.localhost. Once you do that you will see a
new entry in the DNS window. for me it was "localhost."
notice the period "." at the end of localhost that showed an error.
Last step is to simply add this entry as to your localhost file.
Your hosts file should be updated with an entry to resolve localhost. to 127.0.0.1:
# dont forget the trailing . !!!
127.0.0.1 localhost.
in the hosts file located at:
for linux : /etc/hosts
for windows : C:\Windows\System32\drivers\etc\hosts
Another solution for your case might be to ditch the .dev at the end of your local virtual host domain
This has to do with some new changes by google. ".dev" comes under google's TLD (In the corner of the internet where people care about DNS, there is a bit of an uproar at Google's application for over a hundred new top-level domains, including .dev)
Try this Use a domain name you own. Possibly using the full name like "localhost.dev.$yourdomain" could help you here depending on your setup.
With the 'chrome' I face the same issue because by mistake I comment out the
127.0.0.1 localhost from the host file, But 'Firefox' will work.
Just make sure your host file include
127.0.0.1 localhost
FIXING
Try contacting your system administrator.
ERR_ICANN_NAME_COLLISION.
if you are using magento and getting such error
just go to you database and search for core_config_data
click on it then check your web store name
change the store name
restart your wamp and fixed.
Worked for me:
chrome://net-internals/#hsts -> Domain Security Policy -> Delete domain security policies -> enter there localhost and press delete
Here is another catch for you, my virtual hosts in Windows hosts file were defined as:
127.0.0.1 bla.bla.bla.localhost
127.0.0.1 bla2.bla2.localhost
And actual server virtual host directives in Xamp Apache Vhosts file made it all work nicely in all browsers, but Chrome!
A simple fix - dont end with full "locahost" word, rename the vhosts to end with anything else, just "loc" did it in my case, all works in Chrome now!
Been having this problem with Version 56.0.2924.87 (64-bit) of chrome, attempting to access a vm by gset.localhost, just would not work.
Changed the url in the hosts file to gset.loc and it works fine.
The answer seems to be do not use localhost in your hosts file urls when attempting to access a virtual machine running on your machine using chrome.
All browsers - chrome, firefox, safari were not resolving my virtual host and kept re-directing to www.mysite.dev
After pulling my hair for hours - it turned out I just need to change mysite.dev to www.mysite.dev in the /etc/hosts file.

Set chrome to ignore hosts file

How can I set chrome to ignore hosts file?
Here is the scenarion:
I have www.example.com site which is Live and customers are using it and now I have got the code hosted on a new server with a host file entry to that server for my domain I am able to browse to the new server. Problem is everytime I want to check whats on live I have to edit my host file entry. So is there an option to manually set one of my browsers ex: Chrome to ignore the host file entry?
HostAdminApp, a Chrome extension, does exactly what you need.
No, I don't think you can, since the hosts file is an operating system wide setting. It would be easier and better to manage if you change the domain of the test server to www.example.local, so www.example.com will go to the live server.
Edit: Another simple solution would be to use a browser in a virtual machine. It could be worth the effort if you need to do a full testing
As it turns out you may be able to use an issue with Chrome to accomplish this. I was having trouble getting Chrome to recognize/use my /etc/hosts file to locate locally defined IPs. It was always doing a search on the name rahter than going to the locally defined domain.
I had to comment out these 2 lines to get it to work:
::1 localhost
fe80::1%lo0 localhost
So, I am guessing that if you put them in, Chrome will ignore your hosts file. It seems it is an issue the Chrome has with IPv6, so as long as you only need IPv4 for the things in your hosts file you may be able to use this Chrome bug to accomplish what you want. At least until it gets fixed...
There is no straight forward solution. The sort of temporary solution is Browser loads host file only when its loaded so I ended up editing the hostfile entry open the browser instance and changed the host file entry back.
So that way the new browser opened will have a new host file entry loaded.
Well, not a solution to the actual problem (force the browser to ignore hosts file), but rather a flexible alternative.
Ok, so what you usually do in your site's configuration is to have a server alias for www.example.com and example.com. So, then you probably enter in your host file something like this 123.231.123.231 example.com where that IP is your new server's IP and you access your site via example.com. Right ?
Well, here's the catch, if you type www.example.com in your browser instead of example.com you will still see the old site, even if you have set alias with www in your new server's configuration. I think you can apply the same trick with http and https, but you get the idea.
Hope this helps.