I have developed Asp.net Core 6 Web Api and want to host it on my Windows server on a specific port that has SSL installed. Here is what I have done so far -
I have an SSL certificate which I added in the Personal store using certificate manager.
I installed this SSL certificate on Port 10001 and it got added successfully.
I created a subdomain and pointed it to this web server.
I want to run this API as an EXE hosted with Kestrel. I tried -
app.run("https://api.xxxxxx.com:10001")
I get an error that SSL Certificate could not be located.
Please help me with how to do this.
It would be useful if you provided the commands used for adding the port reservation and how you added the certificate to Windows, but anyways, my personal experience dealing with self-hosted apps and SSL is the following:
Add the certificate used for https to the Windows Certificates Store -> Local Computer (this is important, don't use the Current User store) -> Personal store
If NOT using localhost as the server address, as in your case, a Url mapping must be done with netsh.exe (with an elevated command window):
netsh.exe http add urlacl url=https://+:10001/ user=Users (*)
Next, make a port reservation using also netsh.exe:
netsh.exe http add sslcert ipport=0.0.0.0:10001 certhash=[your cert hash here] appid={your app id here}
(*) If your Windows language is other than English, use the name of the translated Users group. For instance, in spanish it would be "Usuarios".
If all these procedures are done correctly, you should be able to launch a server that binds to the specified port with https enabled.
Good luck
I need your help. I am trying to completely avoid connecting my windows server 2012 r2 with an existing Squid proxy server.
I tried the following:
Netsh winhttp show proxy -> answer DirectAccess???
In the LAN settings, the automatic detection and proxy options are turned off
Registry:
I deleted the keys(predefined proxy settings) under:
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
DefaultConnectionSettings and
SavedLegacySettings
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings ( ProxySettingsPerUser value set to 1)
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\Connections keys deleted
I have tried to disable and enable HKLM\System\CurrentControlSet\Services\WinHttpAutoProxySvc settings but unfortunately it didn't help.
I have deleted cached files under: C:\Windows\ServiceProfiles\LocalService\winhttp
I have deleted the sub key under HKEY_USERS\S-1-5-19\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad
Yet somehow my host still connects to the proxy server in the background. I really don't know what to do next.
Internet explorer does not connect to the proxy server, but I can see the following in the background in the access log:
I have two network adapters, one is LAN and one is Microsoft Hyper-V. In the Proxy access log it says that my first adapter try connect with second one.
xx.xxx.xxx.01 TCP_MISS/503 3677 POST http://xxx.xxx.xx.02:8080/gofrom/RPC2 - DIRECT/xxx.xxx.xx.02 text /html
Do you have any idea? Thank you in advance!
I have found a solution.
WinHTTP Web Proxy Audo-Discovery service must be disabled and stoped.
Under %systemdrive%\Windows\System32\Drivers\etc\hosts
Create the following entry for WPAD in the host file: 255.255.255.255 wpad.
Delete cached files under: C:\Windows\ServiceProfiles\LocalService\winhttp if they exist.
Of course, all registry keys in the above post must be deleted and after that a new start of the SERVER is required. Please first export and make registry backup file.
I have windows server ( AWS Workspace ) which uses a proxy server for internet access. I set the proxy in "Network and Internet" -> "Proxy" -> "Manual proxy setup" -> and . After setting up the proxy, my internet access through the browser started to work fine. But, when I try to run my java code using the command prompt, the internet access fails and libraries fails to download. The same libraries are accessible via browser.
Is there anything specific to be done, to direct the internet traffic through proxy for cmd prompt?
We are using squid proxy.
The "command prompt" does not have proxy settings.
Windows applications that use the WinInet or WinHTTP libraries for HTTP connections generally follow the users proxy settings. Applications/libraries that uses plain sockets do not get automatic proxy handling, they need to call WinHttpGetIEProxyConfigForCurrentUser to retrieve the proxy configuration.
For Java, you can try System.setProperty("java.net.useSystemProxies", "true");
I am trying to Remote Desktop onto an Azure instance from Mac OS X, but can't find a tool that allows me to do it. Address and username is fine, but none of the clients seem to have the capabilities to include the instance information.
I have so far tried the Miscrosoft RDC and CoRD but to no avail.
Has anyone succeeded in using RDP to an Azure instance on a Mac?
By default, you can't connect to an Azure Windows server except through the Windows Remote Desktop client.
To connect from OS X, whether through CoRD or the Microsoft Remote Desktop client for Mac, you need to turn off network level authentication:
Connect to the Azure server using the Remote Desktop client on a Windows machine
Under Control Panel, go to System, then open 'Advanced system settings'
On the Remote tab, uncheck "Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)"
Re-connect from OS X
you need to create connect from microsoft remote desktop on mac
add ip, user, password
and you can connect now
if you still can't connect , check your azure endpoint setting
set the port that your firewall can pass
I have the same problem with you, and I think there is nothing to do with the network level authentication. The main reason is the default remote desktop app will connecting through port 3389, but your VM's default endpoint set another public port, here is what i do to solve it:
Download the latest version of Microsoft Remote Desktop app at Mac app store.
Add the port after your connection's DOMAIN/IP like yourvmdomain.com:yourpublicport. You will find the public port on endpoint setting tab. To me, the public port of Remote Desktop is 58494, so the connection will be xx.xx.xx.xx:58494.
This works for me.
Download the new Microsoft remote desktop client, which will allow you to connect to Azure instances without changing the configuration.
(As suggested in the comment from Kim Burgess)
It's tricky to connect to an Azure Cloud Service (aka Web or Worker Role) from a Mac, since PaaS instances sit behind a load balancer. You therefore need to specify which instance to connect to via cookies.
Royal TS supports cookies, so I got this working:
Install Royal TS free version (http://www.royalapplications.com/ts/osx/features)
Add the Remote Desktop plugin
Create new connection
Enter usual details (server/username/password)
Advanced > Connection > Load Balance Info > Cookie: mstshash=Your.Server#Your.Server_IN_0
This cookie info is available in the RDP file you can download for your instance from the Azure management portal (just open it in a text editor).
I use the Microsoft Remote Desktop application on OSX to connect to an Azure VM.
Recently I set up a VM from a Windows machine and was able to connect successfully using the admin username and password, but found that I had to reset the admin password to connect from OSX.
You can easily reset the password from the Azure portal for the VM. Go to "Support + troubleshooting/Reset Password".
I often have to enter the user name in the form:
PC name: xxx.xxx.xxx.xxx:yyyyy
Gateway: No gateway configured
User name: localhost\user.name
Hope that helps someone.
To access Azure instances from a MAC download Microsoft Remote Desktop client in Appstore. The default RDP client Azure provides doesnt work on a MAC. Worked for me
Check that your Networking Inbound Port rules (typically port 3389, but will change behind a load balancer) for the Azure VM allow you in.
I downloaded a windows app that is connecting to the Internet to get data from the external source. My network uses proxy server that requires authentication so whenever that app is trying to get online, it returns a 407 error.
I tried to use netsh to import IE proxy settings for winhttp, but it doesn't seem to help.
Is there any way I can set up this specific app or set universal proxy settings for all Windows apps?