I have ASP.NET MVC website that runs on my local sever and I need to check mobile area.
So I decided to connect to it via Android Emulator (AVD)
As I read IIS server reject incoming requests from remote devices.
So from this thread I think I found solution
Post
I make all described on his github and get this
So as I understood it can receive external requests now.
And I tried to make request from AVD (192.168.2.106:3000)
And I get this
So as I understood it got path, but IIS still not receive external request.
Maybe someone faced this problem and can help me solve it?
Related
A client has a Sharepoint 2013 farm consists of 2 servers acting as frontend and app and 2 SQL server (SQL14) all with windows server 2012.
My application is a windows application that calls sharepoint with CSOM requests.
All the environment was late by 10 min from the real time and for years everything was working, suddenly after fixing the time on the Domian sever so that it is fixed on all the severs and client machines, all the CSOM requests to sharepoint severs throws exception request aborted request timeout. Nothing is logged on the server and I couldn't find any reason.
Suddenly and by chance when I changed the IP on one of the PCs that holds my windows application to a one that was not in use, things started working again and I continued the same on all PCs.
But the client wants a clear justification on what was the problem.
Does anybody know how time is related to sharepoint and client.svc and is there any way the time keep cached on any level of the network
Actually it was not a problem of sharepoint.
The client was using a new NSX system and for unkown reason it was causing packets loss. Basically net tcp requests packages.
I am having an issue connecting to my web api (via Postman)from a separate computer on the same network. I am Able to connect (Via Postman) if I am working on the same computer where the API is located. However When I attempt to connect to the same API (Via Postman) on a separate computer (within the same network). I receive an error stating
"Could not Send response
ECONNREFUSED"
I have tried to unblock SSL certificates.
I have also tried to add bindings to the applicationhost.config file
Neither of these have worked for me.
As a side note, The API does not have any Authentication associated with it so my guess is it has something to do with access to the web server where the API is housed.
Any help would be greatly appreciated
Connect through Ip Address That should work.
For Example
on local it should be like this
http://localhost:8050/ParseXml
On Remote or other Pc
http://10.45.0.38:8050/ParseXml
Another thing is did you check if your system can successfully ping that system?
First off, I know very little about signalR. I'm trying to learn and I'm just messing around mostly.
Running on .NET Core 3.1.
I have 2 machines:
PC1 is my dev desktop with Win10 Pro and IIS which is on our domain.
PC2 is running Ubuntu (Not on the domain) with a Win10 VM which is on the domain.
I've created the Chat app from the Getting Started with SignalR.
If I host this in IIS on PC1 it all works fine. The SignalR connection is established and I can send messages from PC1, PC2 Ubuntu, PC2 Win10 VM, and even my phone. Any device on the network can connect to the hub just fine while there is no authentication in place.
If I add Cookie Authentication loading the site will redirect to the login page, login will be successful, and the user will be redirected back to the main index page.
However, only a machine that is part of the domain can establish a SignalR connection after login. This means PC1 can login and establish a signalR connection and send messages.
PC2 ubuntu can login, but get an Unauthorized error when trying to establish a SignalR connection.
PC2 ubuntu/Win10 VM (Which is on the domain) can login, but get an Unauthorized error when trying to establish a SignalR connection.
Using my phone I get the same Unauthorized error.
If a work colleague, who is part of the domain, loads the site on his machine, he can login and establish a working SignalR connection.
When authentication is active, no device that is NOT part of the domain can establish a working SignalR connection.
Any device that is NOT part of the domain get a Unauthorized 401 error when trying to establish a connection to the Hub after login.
Any device that IS part of the domain can login and establish a working SignalR connection with no errors.
The code seems to work fine. I'm thinking it's an IIS issue. My IIS setup is based on this:
https://damienbod.com/2018/09/21/deploying-an-asp-net-core-application-to-windows-iis/
It all seems to work and run fine as far as the code is concerned, but a device that is NOT part of the domain cannot establish a signalR connection when Authentication is active.
If there is no authentication, ANY device on the network can connect to the hub just fine.
Again, this is just me messing around and trying to learn what I can or cannot, OR, should or should not do. And yes, I did Google this A LOT.
My Startup code:
Login code:
Hub code:
I got it working... posting this in case it might help someone else and spare them many days of getting nowhere :)
It turns out the Windows domain does not play a role. None of the devices/machines on the network can make a signalr connection over the network if I have authorization active in the app. Only the machine where the IIS is running can open the app, login, and make a signalR connection and work as intended.
Yesterday I happen to watch a video about publishing .net core apps to IIS in Win10 and the guy created a new site under IIS instead of creating a new application under the Default Site that comes with the IIS install.
Decided to give this a go and sure enough the app started working when hosted under a new site in IIS.
I don't know if there is a setup issue on the Default Site... I'm the only one that uses this IIS install and I know I didn't change any of the Default Web Site settings. The win10 install is also only about 6 month old.
I want to test with a fresh install of IIS on a Win10 laptop we have here at work to see if the same issue comes up... I doubt it, but might be worth checking anyway.
I have a web app made in C# using asp.net core 2.0.
This app is hosted in IIS, as this is the recommended way to expose it to the internet.
I am now making some services hosted in the same local lan as the webapp, which need to connect to the above webappp. I can connect to the public iis server which of course works. However, would it also be possible to directly connect to the Kestrel server managed by IIS? So instead of connecting to public_ip/somewhere, connect to kestrel-local-ip:port/somewhere. The advantages would be:
avoid an extra hop
the kestrel app is still hosted and managed by IIS, so no worrying about self-hosting/management.
Reading the documentation here: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?view=aspnetcore-2.1 it states: "Additional checks are performed, and requests that don't originate from the module are rejected.". Reading the Github repro, this seems to be an HTTP header called "MS-ASPNETCORE-TOKEN".
So is this scenario possible somehow? To connect directly to IIS but ALSO to kestrel directly?
If it is possible, should I do this? The performance gains seem immense as I have a lot of small requests which Kestrel can handle really well.
I have test this scenario。
when APP kestrel behind iis,
you can use netstat command get the kestrel process "port".
and then curl the "localhost:port" , you will get the 400 bad request, also you can get a error log indicate the MS-ASPNETCORE-TOKEN token .
you can curl the "localhost:port"again with the MS-ASPNETCORE-TOKEN request header.
I create Asp.net WS and host it on the IIS.Now i want to consume it from remote computer or another computer.When i insert the URL of the WS on the remote computer an error message appears inside internet explorer browser page says
This program cannot display the web page
i work on Visual studio 2008, windows 7 and the client application is Asp.net website.
i don't know what is the problem??
have i connect the two computers with LAN(make network between them) or just enough each one connect to the internet??
Your computers need to be able to connect to each other.
If they on LAN, then You need to specify LAN address for asp.net WS.
Also check Your firewall for blocking connections, need to be sure that port were IIS hosted is available for connection
If nothing helps, then provide us more information about problem.
Really i don't know what is the problem.When i do the same thing in another computer it runs but on my laptop doesn't run.