.net Core service accessing serialport from remotedesktop session - iis

I have a .net core 3.1 service running that is using a custom Com dll that is talking to a machine connected on a serial port(serial to usb cable). The service is hosted on a windows 2012 server.
A user is then opening a remote desktop session to the server and forwarding the local serial port where the machine is connected to. When we run the service as a service the custom Com dll cant talk to the forwarded port, but if we run the service as a standalone, not as a service, (kestrel) session inside the remote desktop session it works fine.
Cant a windows service(or IIS service) communicate with a serialport that is forwarded using remote desktop port forward? is the port only available in that "session" and not accessable from the service context?
We have tried to run the service as the current users, local system, network system etc.. we have tried to run the service hosted in IIS and regular window service, we also tried to run it as a scheduled task but with same result.
Anyone have any idea on this?
Thanks in advance!

Related

Is it possible to connect to the Azure App Service windows machine with RD?

I have an App Service in my Azure resource group. My ASP NET application is hosted on the windows environment inside that app service. I am wondering if it is possible to connect to this desktop windows server using Remote Desktop or something like this. There is a KUDU feature on the Azure but the only one thing that I can do with this is to show server's CMD. That is not enough, because I need to access to the windows desktop GUI like on typical PC. Do you know any tool that would allow me to do this?
App Service runs your applications in a sandbox and it's simply not possible to remote desktop to the underlying VM. There's no Windows GUI that you can access.
The Virtual Machines service allow full control of the VM and you can access the Windows GUI using remote desktop.

Azure webapp to local server

I have a web application mounted on azure webapp is an api on node and I also need you to consume a service of a esp8266 wifi module but this module has a server with a local ip mounted, I need this azure app to connect to this local server of the Wi-Fi module.
NodeAPP in Azure ->>> Modulo Wifi (ESP8266) in local Server
Usually when I have this kind of requirement, the easiest way to solve is by using Ngrok. Then, your web app will send data to ngrok, which will forward it to your local pc.
More info: https://ngrok.com/

'us-ascii' is not a supported encoding name on Windows Phone 8/Azure

I'm trying to test the Microsoft Azure's Mobile Services. I've created a Mobile Service on the Azure portal and downloaded the "getting started" project with the Todo demo application.
I was able to deploy the service on the cloud and to run the app with the simulator but when a I try to host the service on my local IIS and run the mobile app, I've got the following exception on the client side:
System.ArgumentException: 'us-ascii' is not a supported encoding name.
Parameter name: name
at System.Globalization.EncodingTable.internalGetCodePageFromName(String name)
at System.Globalization.EncodingTable.GetCodePageFromName(String name)
at System.Text.Encoding.GetEncoding(String name)
at System.Net.Http.HttpContent.<>c__DisplayClass1.<ReadAsStringAsync>b__0(Task task)
My Windows's language is English and my keyboard's language is French. I tried to configure the encoding of the HTTP requests on both client side and service side but nothing worked.
Any help would be greatly appreciated :)
Thanks.
This is a side effect of now allowing your WP8.X Emulator (VM) to connect to your local Service that runs under IIS.
When you create a WCF web service in Visual Studio, by default the service is hosted in IIS Express and only accepts connections at localhost
The Windows Phone 8 Emulator, however, configures itself as a separate device on the network. As a result, an app running on the Windows Phone 8 Emulator can’t connect to the development computer as localhost.
Before you can connect successfully from the emulator to the local web service, you have to follow these steps
In short :
Go to %USERPROFILE%\Documents\IISExpress\config\
Open applicationhost.config
Add a new Binding with the IP of your WPEmulator VM
Restart VS as Admin

Remote Desktop Web Connection

I understand pretty well that Windows RDP works on TCP port 3389, I came across Remote Desktop Web Connection feature in IIS that adds tsweb access, my question is, does Remote Desktop Web Connection use http protocol as a transport protocol over port 80? Or is tsweb just an ActiveX control that acts as an rdp client and connects normally to 3389?
Windows Remote Desktop Services (RDS) role have a IIS feature called "Remote Desktop Gateway". This gateway makes the TSWeb ActiveX to tunnel the RDP session through an HTTPS channel (port 443) instead of having it acting as an RDP client (using the mstsc COM object probably) on port 3389.
If you don't mind trying an open source alternative, written in C# (.NET) and also using a IIS gateway (but not the RDS one), without any plugin browser side (and working in all browsers, HTML 4 and 5), I released recently Myrtille.
The Remote Desktop Web Access role (formerly Terminal Services Web Access) installs a website on a Windows Server machine. "TSWeb" is a website : you access it using the http protocol.
If you access this website with Internet Explorer, IE will ask you if you want to download an ActiveX. This ActiveX will allow you to connect to remote machines via port 3389 (RDP). However, "TS Web Access" itself is not an activeX, it is a website containing an activeX.
FYI, other browsers do not support activeX objects. On such browsers, the "TSweb" website will make you download a .RDP file instead of launching a remote connection via the activeX. When you double click on this file, or launch it with Remote desktop client, the remote connection is established via port 3389.

How to access remote desktop from two machines in windows azure

I published the cloud service from VS2010 with Remote Desktop enabled. I downloaded the remote desktop connection for that instance. I just logged in to cloud server using Remote Desktop. Now i published same application from another computer. When i want to connect Remote Desktop from new machine its unable to connect to server. Even i tried from previous machine i am getting the same thing.
Application has 1 role & 1 instance. help me with this thing.
You must allow the RDP while publishing it to the cloud...Check the publish settings once...

Resources