Not able to access blazor website from other computers - iis

I am trying to host a Blazor website on a local Windows machine via IIS, and it can be accessed from the same machine using IP address in the URL like https://10.0.0.123:8080/myblazor, and I also make sure port 8080 is opened on the firewall, but I am not able to access my Blazor website using the same URL from other computers. Does anyone know why? Thanks in advance!
I added another regular website (simple HTML website) and I can access from other computers. So doesn't look like it's the firewall issue or IIS issue.

Related

Local windows service not accessible to the remote computer

I am deploying a React app on a virtual machine, windows server 2012, hosted on the IIS server. The website is successfully running on the local server. When I try to access the website through a remote computer, the static components are rendered successfully, but the API doesn't work. The API is written in node.js and installed as a windows service on the windows server with the port number 5000.
I put localhost:5000 as the axios base url in react. But when I try to access from the remote computer, the computer is reading from its own localhost instead of the server's localhost.
Even if I change the axios base url from localhost to the server's ip address, it still cannot read the API properly.
My questions are as follows:
How to make the remote computer reads from the server's localhost without putting the server's ip address?
How to make the local server's windows service accessible to other computers?
What is the best practice to store the API base url in React in production? (store in.env, config, etc...)?
I just solve the issue and I post the answer here for anyone who has the same issue.
Windows
Create a firewall rule (Windows only)
You need to allow other computers to connect through your firewall.
Open the Windows Firewall
Go to “Inbound Rules”
Click “New Rule”
Select “Port” to make a port rule
Under “Specific local ports”, enter 80 and 8000 (for me it's port 5000)
Select “Allow the connection”
Click “next” then choose a name for your rule.
Source of this answer: [https://otree.readthedocs.io/en/latest/server/adhoc.html#windows][1]

How to access website hosted on IIS, from remote computer?

I hosted a website on IIS, running on port 81. I can access it on the server machine from http://localhost:81/test.aspx.
I also can establish a remote desktop connection to the server, using its ip adress server-ip.
Now I want to access the web site using my PC (or any other PC). However, I type type http://server-ip:81/test.aspx on my web browser and the page is not loaded.
I've already opened port 81, by adding a new inbound rule to the server's windows firewall. The exception for World Wide Web Services (HTTP) is also ticked on. I even shut down the firewall entirely, but I still can't access the web site remotely.
Can somebody tell what the problem may be? Thanks in advance.

IIS web application Error 401.2 through IP address

I have a web application on my local computer on a domain that works on IIS 7.5. When accessing this web app through localhost it works fine, but if I try using my IP address instead, It asks for my credentials and when I don't enter them, I get Error 401.2.
I already have Annonymous access and windows authentication enabled.
Please help me.
I was able to make it work. Instead of using my IP address to access the web app, I used my computer name.

Get domain & subdomain of server by console application

Let's take one case that i hosted my web application on window server 2008 R2 and one exe (console application) running on that server.
I can access that web application by URI:
<subdomain>.<domain>.net , is there any way to get subdomain and domain info from EXE (C#) ?
Thanks in Advance.
The answer is... it depends.
If you only have one site hosted on your box then you can just connect to the local instance via either the IP Address the website on the machine resolves too, or by using http://localhost etc.
When you have a URL, the situation becomes more complicated. The machine could be hosting several websites - how do you know which one you want to connect to? In this instance, I would advise just storing the url you want to connect to in config.
However, it should be possible to list the all of the domains from IIS - you'll need to use WMI.

Hosting website from home Windows Server 2008

I have created a website in asp.net and deployed it on IIS. It is working fine locally. Now I want to access this site on internet. I don't want to buy domain name now. So, I am perfectly fine with the URL like this http://120.89.12.32/MyAppName/Default.aspx
Could anyone assist me knowing that if it is possible for me to host my asp.net application from my home? I am using Windows Server 2008 [R2] Enterprise edition.
Yes you can, but you'll need a static IP address. Most people have a dynamic one, unless they've specifically requested a static one. You may have to pay a small surcharge for static.
You can of course just access your site with whatever the current IP is, but being dynamic it will change from time to time.
Also you'll have to make sure that your router's/modem's firewall is configured to relay requests to your server. And make sure that if your ISP also provides a firewall it is configured to allow inbound requests.

Resources