IIS cannot access page through domain - asp.net

I have successfully published a website(whatever.com) and it is accessible for global users except for the server itself.
If I input the domain(whatever.com) in the server's browser, it would display "This page can't be displayed."
How could I fix it that could let me access the page through the server's browser?
Other information:
Users from other computers could access my page.
Localhost(http://localhost/) works in the server's browser but domain(http://whatever.com/) doesn't.
Port 80 is opened.

Make sure that the domain "whatever.com" is in the bindings list on the website from IIS.
You might have a DNS problem on the server, you can manually map the "whaterver.com" domain in the hosts (C:\Windows\System32\drivers\etc\hosts) file of your server by appending the following line:
127.0.0.1 whatever.com

Related

How to configure IIS to redirect to site

So far I downloaded and configured IIS (version 10) on my windows machine. I created a domain called kinux, using the hosts file, so when I navigate to kinux.com, I'm brought to my IIS server root directory. I then created a site called localwww and configured ColdFusion to run via this site.
What I'm trying to do is make it so that when I go to kinux.com, it redirects me to my ColdFusion site. Does anyone know how to do this?
hosts
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 Kinux
127.0.0.1 Kinux.com
localwww site
Default site
Two solutions that I can think of:
Move your ColdFusion site to port 80 and add binding for hostname "kinux.com" such that all incoming requests to kinux.com will be served by your ColdFusion site.
Assuming "Desktop-server" is the website that gets called when you enter "kinux.com, click on it in IIS manager. In the center panel you will find "HTTP Redirect". Set the URL of ColdFusion website here. What will happen now is any request coming in to "Desktop-server" website would be redirected to your cold fusion website.
In solution 2, an important thing to note here is that the when the first request reaches "Desktop-server" site, IIS will indicate to the client (browser from where it is being accessed) that a redirect rule has been set to the new URL. The client will now once again make a new request to the new address (ColdFusion). So please ensure that the URL you enter in HTTP redirect rule can be accessed by client machine as well.
Let me know if you have any questions.

How to open a website by entering its name, not the IP address of the server

I have created a website and set it up on IIS on a Windows Server 2008 R2 which is on the local network. What should I do to be able to access that website by typing its name in the browser from client machine? Right now there're only two sites: One is the Default Website and the other one is my newly created one. If I type this IP in the browser of a remote computer, which has access to the server, the default website opens. If I add https:// to the ip address I get directed to my website. This means the website opened is decided upon the protocol (http or https). What if I add another website that would require SSL?
Actually the site you browse to is not decided by the protocol, it's decided by the port. By default HTTPS is port 443, and HTTP is port 80.
So if you have an HTTPS and HTTP protocol added to a website in IIS, you've created bindings for these two ports automatically.
This is visible by going into IIS clicking "Sites" from the "Connections" section in the left pane and then looking at the "Bindings" column in the center pane.
If you create another website on the host which uses SSL you would have to assign it to a different port.
To browse to that new SSL website you would have to enter the port when browsing to it.
e.g. https://serverName:444
(You don't have to enter default ports, 80 & 443, your browser automatically infers which to use from the protocol type and adds them if no other is present)
This is inconvient for users so people get around this by registering domain names such as stackoverflow.com and pointing them to the address with the port e.g. https://stackoverflow.com:444, so users don't have to enter port numbers.
Have you added the website address to the host file which sits in the drives folder of the system32. If you add the website name against the IP in the host file you should be able to access it using the name rather than than IP address
Something like this- 10.18.20.108 test.stackoverflow.com

I cannot access my IIS7 site on the network

I have an IIS7 site that works fine while on the server, however refuses to work from anywhere on the network.
When logged onto the IIS Server itself (with remote desktop) then the website shows fine, as per this link (I used port 801 for this site):
http://localhost:801/
However when attempting to access this site from the network, it refuses to work, giving the generic 'cannot display the webpage' message, while using the following link:
http://<<my IIS server>>:801/
Another thing I have noticed however is that on the network the default page (port 80) of the IIS server DOES work. I.E this following link shows the standard IIS7 page:
http://<<my IIS server>>:80/
Most of the help topics I've read point to it being a firewall issue, however as a test I disabled all firewall settings on the IIS Server, yet it still refused to show.
Does anyone have any other suggestions?
Many thanks
Did you tried with computer name and / or IP Address
e.g: http://192.168.1.105:80/
http://DELL_PC:80/
Run the following tests:
Check connectivity from both computers.
Firewall settings, temporary disable the firewall from all profiles (private, domain, public) if this works, try adding a Port Rule to your firewall allowing incoming connections to port 80.
Also, it'd be important to check the bindings configuration of your website, bindings specify the address the server should listen to for incoming connections, make sure you have 'All Unassigned'.
Reference : Click Here !!

IIS website inaccessible from server (but ok from outside)

On a server where an IIS website is hosted, if I open IE or Firefox and type the IIS website url, i got an error after a few seconds ("Cannot display the webpage", just like website would be offline). If I do the same from the exterior (as normal user do) everything works.
I have tried to give the IP address directly (thus skipping DNS), problem is the same. It only works if I type the internal ip address of the IIS website (eg : 10.0.0.x).
The reason I want to do that is that I need to access a specific page of the website in order to execute a scheduled task. I cannot use internal ip address to do that, because host name (HttpContext.Current.Request.Url.Host) is used inside ASP.NET code to switch between different configuration.
Here is my question : is it possible to access a specific page on a IIS website from server where website is hosted ? (using complete url, not internal ip address ?)
Yes - If I understand your question correctly you should be able to add a mapping in your local hosts file to point that domain at your IIS webserver.
e.g.
10.0.0.x my.example.hostname
(where x is obviously a number)
We use this configuation internally when developing multiple sites on our local machines - each site is bound to a specific hostname and all these hostnames have mappings in the 'hosts' file to 127.0.0.1
The same principal applies here, if I've understood the question correctly :)

HTTP request fails

I am trying to make an HTTP request from a micro-controller , the request is successful when I make it to google.com usign its IP (173.194.33.104) , while it fails when I use my server ip
when I put the ip address in the browser it show me a message like this
"Great Success ! Apache is working on your cPanel® and WHM™ Server" and some more info about apache server , I get my ip from the terminal (ping www.xxxxxx.com)
also if I put my ip with the user name in the browser I see my pages in my server (xx.xx.xx.xx/~aymanj/)
I want to make the HTTP request direct to my pages in the server
how can I do that ?
Lets assume you are using a browser (like IE, FireFox or Chrome) and that we aren't talking about using network functions from the Arduino. When you put an URL or some IP address in the browser's address control, and then hit enter - the browser parses that string to determine an address. Then based on your network settings, attempts to make a network connection to that address (typically over port 80). One it connects, the next step in the HTTP protococl is to request a single page from that connection. That page is everything after the address. If there is no page after the address specified, then its just the default "/" or default page. Each web server (Apache, IIS, etc) has options to set up different defaults. Typically that's something like index.html or default.aspx located in the root directory of whereever the web server lives. Extending that, a web server can map other directories to other paths. In your case, someone mapped a directory "/~aymanj" to your username. In that directory, there is probably a file something like "index.html". And when you go to that address without a directory or path, you are requesting the webserver root. Appparently no one has set a default page for it. Hope this helps you get started.

Resources