adding website to local iis. getting Server not found error - asp.net

I am adding a web application to my local iis. I added the path to the folder with the bin is inside. I specified the application pool and applied my login credentials. When I hit test settings, everything passed. When I typed mysite.local on the browser, I get the following. I also clicked on Browse Website and get the same error. This is on my personal PC.
Server not found
Firefox can't find the server at www.comicrage.local.
Check the address for typing errors such as ww.example.com instead of www.example.com
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Have you added mysite.local to the hosts file? If not, add the following to C:\Windows\System32\Drivers\etc\hosts.
127.0.0.1 mysite.local
The hosts file is responsible for any local overrides that should take precedence over DNS.

Related

blank page with domain name inside

I set up a server on Ubuntu 20.04, installed and configured UFW and fail2ban, installed nginx, opened 80 and 443 ports. Created a config file for my domain and started the server. It works, but from my IP address (from which I set up the server), I cannot get to the site. When I request a domain, I get a white page on which my domain is written in plain text. But as soon as I register the domain and IP in the hosts file, the site becomes available. I see the problem only from my IP, from others - the site is available. I can provide server settings, but they are corny simple. The site is still pure HTML. Even php didn't install.
Help me find the problem, or at least a direction to fix it.
Thanks!
It might be related to cached DNS queries. Remove the entry from /etc/hosts file and restart your local machine.

ERR_INVALID_REDIRECT When Accessing An IIS Website From Another Machine On The Network

I'm receiving an ERR_INVALID_REDIRECT error when trying to access the Default.aspx webpage from another computer.
I have setup a local website using IIS - from the machine where the website has been hosted using IIS, I am able to navigate to the Default.aspx webpage on the local browser.
I have setup bindings to an IP address so I can access it from other devices on the network. I have also setup the firewall to unblock all ports so I am able to access this.
Problem:
When I navigate on the local machine where I have the website hosted using IIS, I am able to see the Default.aspx webpage.
However, now that I have binded an IP in IIS to the website, I want to be able to reach it from another PC on the network.
Currently I am able to access all the webpages in sub directories and also the main directory for the website using:
192.168.1.165:81/SubDirectory/File.aspx
192.168.1.165:81/FileInLocalDirectory.aspx
BUT I am not able to access the homepage named 192.168.1.165:81/Default.aspx.
I have no idea why. The error I receive is
192.168.1.165 sent an invalid response.
ERR_INVALID_REDIRECT
I don't know what the issue is. I don't know if there is something in Default.aspx that is stopping the webpage from being displayed when trying to be accessed from a machine and not the local machine.
#LexLi

Host ASP.Net MVC Site

I've created a site using ASP.Net MVC that is meant to be stored on a local machine at my place of work. The intention is to have the site stored on this machine, but then accessible by all the other machines within this building.
I've followed Microsoft's tutorial as well as Code Project's tutorial, but I am not having very much luck. The binding is just the localhost, port 80, with * for the IP address. The URL is localhost/GrantTracker.
I've opened the ports within the firewall, checked the permissions on the directory (which is just within wwwroot), tried having the site take the place of the default IIS site (as Microsoft tutorial has you do) and tried having the site stand on its own with its own port (per Code Projects tutorial).
On the host machine I am receiving the standard "This site can't be reached, localhost refused to connect" which feels like either a port or permissions problem. I must be missing a step, but I can't seem to find what it would be. I am new to hosting sites through IIS so forgive me if I am just missing something basic.
I find it a bit strange too because my project uses Windows Authentication and when the site is first visited it performs that initial check with the user, authenticates, but then throws me the error.
Anyone have any ideas? Thanks in advance.
start simple,
create a simple html page, create an IIS application for it, on port 80.
Check and make sure you can see that page from another computer using the internal IP address of the the host machine so something like:
http:\\192.168.0.3\hostapp\test.html .
You can see the proper URL by running it from IIS, this will give you the entire URL you need, with localhost then just replace localhost with the IP address of the host machine to see it on other machines.
Do this in the original IIS folder so you don't encounter any folder permission issues. If you choose another folder you'll have to give access to the Network Service user ( i think, can't remember now, but there is a specific user that needs access to the folder where the website is deployed )
if you can see the page then deploy a proper website and do the same thing. Make sure the app pool is created correctly and it's up and running, then access it again on other computers and it should work.
Port 80 should be open by default so that should not be an issue.

Why my webservice runs in localhost but doesn't run in my host on the internet?

I wrote a simple web service and published it, then upload it in my host. There is a folder with name "webservice1" in my host, beside other files of my web site.
In folder "webservice1" I upload 2 files: myclass_Service1.asmx and web.config and a folder bin which has dll files.
But when I type the address of my webservice in the URL, it isn't recognized.
I also upload files in root of my host, but they also aren't recognized.
In my local host it will run, but on my host it doesn't
Why?
thanks
What exactly does your Browser say?
Sounds like a Firewall issue to me:
Open the "Windows Firewall with Advanced Security"
Choose the "Inbound Rules"
Search for Rules including "WWW-Services" or Similar
Make sure to Activate the Rules allowing Port 80 (and 443 for https)
Screenshot (Sorry for german):
Windows Firewall

Access wordpress website on localhost from remote network

I want to show my client the WordPress website on localhost being developed by me (it's still in the beginning stage, not ready to go live yet). This is what I have done so far:
- I have done port forwarding and have tested it (whenever I access my Xampp localhost from the remote network by entering my computer's ip, it opens up the localhost dashboard).
Now this where I'm stuck:
- Whenever, I specify a directory of website (in htdocs) on my remote network's url (like this: mycomputer's ip/folder's name it changes the url to localhost/folder's name and the page doesn't open).
How do I resolve this issue?
Add this line to your wp-config.php might help:
define('WP_HOME','http://your-computer-IP');
define('WP_SITEURL','http://your-computer-IP');
and comment or delete that line when your work from home.
But there's something can be improved. Try to some DDNS services and install their application to your local machine. After installed, you can access your computer from mymachine.ddns.net even you're home or not. So with below setting, you no need to edit anything when you change your work location.
define('WP_HOME','http://mymachine.ddns.net');
define('WP_SITEURL','http://mymachine.ddns.net');

Resources