I have deployed mvc application in IIS 7 on my machine(Windows 7 Professional).
Its working fine in my machine with url: http://localhost/testApp. When I tried to access the same (http://182.18.140.188/testApp) in other machines, I couldn't able to access. My system IP is 182.18.140.188.
I gave full permissions to other machines also. Still not working. Other machines are in same network and they could able to ping my machine. Please let me know how to access the application from other machines.
Related
I'm hosting a .NET Core HTTP application on localhost using Kestrel on an available port for some browser-based UI tests, but when trying to access it using real iOS devices with BrowserStack Automate with BrowserStackLocal.exe, Safari consistently refuses load the page.
I've tried various parts of the IP ranges documented here, but none have been successful. Desktop browsers (Chrome, IE, Edge and Firefox on Windows, Safari on macOS Mojave) and real Android devices work as expected.
I've also tried using the local IP address of the machine and the fully-qualified domain name (FQDN) as described here, but neither work portably as Windows Firewall blocks the connections even through BrowserStack Automate can resolve the address.
Port 80 is not a viable solution as developers' machines will have IIS running on their machines using that port, so it is not available for other purposes.
Given the following constraints, what are the workable solutions?
Hosted on HTTP.
Runs without admin privileges (i.e. no reconfiguring the firewall or using privileged port numbers <1024).
At least two possible port numbers to use so that if one is in use there's at least one alternate to try.
No additional manual setup required to run the tests (should just be the command dotnet test).
On the iOS devices, try resolving http://bs-local.com:5000 instead of http://localhost:5000.
You can access the site using http://bs-local.com:5000, But make sure to disable the host check for webpack using disableHostCheck: true in configuration.
For angular cli users, to disable to the host check you need to use --disable-host-check like ng serve --port 4200 --disable-host-check
This is from BrowserStack's support:
a) On Safari
Previously, accessing local websites with 'localhost/127.0.0.1' in the URL was not supported on iOS devices running iOS versions 10 and above.
However, to make sure that your website loads with 'localhost' in the URL, we now modify the URL to http://bs-local.com on these devices. This helps in loading your website in an expected manner. The same is mentioned here.
In the screenshot you've shared, you can see the redirection to bs-local.com as well.
It seems that your localhost website is configured to be accessible only via specific hostnames such as 'localhost'. Thus, you face the reported error.
To be able to test your localhost website via Safari on iOS devices, I would recommend configuring your localhost website to be accessible via the private IP address of your local machine.
Once done, you can access your localhost website as http://<private_IP_address:port> and this should work.
I would also encourage reading through this guide to understand how you could achieve the above: https://www.notion.so/Testing-localhost-on-iOS-devices-1ceb5e274cee46d7ac538b71304919b4
b) On Chrome
Due to restrictions imposed by Safari, testing localhost websites on Chrome is not supported by default on iOS devices.
The problem arises with the usage of the domain 'localhost'. We are actively trying to find alternatives for this behavior as well.
However, in the meantime, you can access your localhost website via the private IP address as mentioned above via Chrome browser on iOS devices as well.
Once you make the necessary changes to your configuration to allow your localhost website to be accessible via the private IP address, you can test your localhost website via Chrome on iOS as well.
Feel free to reach out should you need any further assistance!
Note: The private IP address is not the same as 127.0.0.1. You can use this article to identify the private IP address of your machine.
Regards,
Reehan
BrowserStack Support
Did you try changing the 'localhost' with the IP address of the machine (where the web is hosted)?
For instance - If the IP for the machine on which application/webpage is hosted is 22.22.22.22, then change http://localhost:3000/index.html to http://22.22.22.22:3000/index.html in your test
They have mentioned the same here - https://www.browserstack.com/question/663
If you are using Angular CLI then please run command
ng serve --host 0.0.0.0 --port xxxx
This will make sure that you would be able to access application using your IP and port specified. Once done you should be able to access your application using browser stack iPhone device browsers using IP and port rather than localhost.
I'm about to being developing an application that will connect to a Unix machine on a network (via internal IP). The machines that will be running this application already have access to connect to the Unix machine.
If I develop an ASP.NET MVC Web App running on an external IIS instance, will the web app be able to connect to a private local machine? I realise the IIS server won't (as it's private), but there will be locally executed code. Is this going to be able to access the machine? If not, I will have to resort to Windows desktop app.
You can use a VPN connection from an external server to the private network. Virtual hosting hasn't this feature, so you must use virtual machine.
A firewall software allows you to create VPN server usually, and any version of Windows allows you to establish a VPN connection to the server.
With a help of VPN connection your virtual machine can get ф private IP-address, and can access private network resources.
I have an ASP.MVC site hosted on my computer with IIS. This site is using the 8090 port, and i already set the inbound firewall configurations on Control Panel.
Im not able to access this site from all Windows 7 computers and Android Smartphones on LAN, but Im able to access from all Windows XP computers on the same lan.
Since your XP-PCs can access the site, the MVC-site is correctly working.
Check the following things:
whether the Win7 and Android devices are in the Same LAN, check IP address AND subnet mask.
whether the MVC-Site is configured to only response to certain IP addresses.
I am not sure what to look for with the current problem and I appreciate your suggestions.
Basically, all I want to do is locally host a web application on IIS and access it from my mobile browser.
My web application is hosted on the local IIS and works fine on the main machine. I can use my computer name, internal ip or external ip instead of localhost to connect to the app from the main computer. But when I go to another computer (which I can see and exchange files with) connected to the same network I cannot access the web application on the main machine. I tried ip and machine name.
At work, we are connected to a Domain and I tried the same thing with the work computer. When I write my computer name or it's ip, I can access hosted app from another computer.
So the question is, do I have to have a domain for this capability and if so, Is it possible to create a local domain at a home network? What do I need to search for to get this working? Is WAMP a must?
Apparently opening the outbound/inbound port 80 from windows firewall is enough
I have a little game project that uses a MVC 4 api server, however since I installed windows 8 / VS12 / WP8 SDK I havent been able to access the server from my app in the emulator, I can however access the deployed webserver.
Is there some sort of default firewall that would prevent me from contacting a localhost server? I just get a NotFound exception when I try, the localhost server works fine in my browser to retrieve some xml object
I have the same code working in windows 7 with vs2010 and wp7 sdk.
To connect to the server I use http://restsharp.org/
The emulator is running in Hyper-V, which is a virtual machine. It runs it's own network, and thus your PCs "localhost" isn't available from inside the virtual machine.
You don't have to set up a full IIS... you can go about with IIS express ( the visual studio way when you run the Web api solution ).
You need to do 2 things, first one check
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx - only the part called 'Quick solution with IIS Express' ( parts 1 to 4 )
Second one, add a Microsoft Firewall rule to allow access from the VM to the IIS express.
Firewall > Advanced Settings > Rules for incoming > New port rule