How to install dev certs and run as HTTPS on non-dev machine? - asp.net-core

I am publishing my ASP.NET Core 2.2 to a local location, then zipping it and trying to run on another machine. The other machine when launching does not show listening on HTTPS, only HTTP.
This is making the app not work. Locally on my dev machine I get both endpoints. I understand that I have to possibly use dotnet dev-certs https --trust or similar command but since my build is self-contained I really do not want to install the .NET Core SDK on every machine I run this on just to get that command.
How can I make my app run with endpoint on the other machine with the least hassle?
Update:
The following message is also shown in the launch console window:
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.

Related

https requests from a Jenkins Job blocked

I'm experiencing an issue with https requests sent from a Jenkins job, which are blocked and do not reach the final server.
The scenario is as follows:
I have a server where I'm running some backend, exposing APIs both over http and https (it's a django + django rest framework backend)
I implemented a Rhinoceros Plugin in C#, which needs to perform some rest API requests to the above mentioned server
On another server, I'm running a Jenkins job that is responsible for compiling the plugin, installing it on Rhinoceros and run some operations on Rhinoceros for test purposes
All calls over http do work like a charm from the plugin running on the Jenkins job, but all https do not work.
NOTES:
When manually running the plugin outside Jenkins, the https remote request succeed without any issue
Moreover, https requests sent from any other location do work
When the plugin runs from the Jenkins job no trace of any incoming connection is logged into the backend server, so that makes me believe the request never leaves the Jenkins server
WHAT I TRIED:
I installed the domain certificate locally on the Jenkins server, using keytool, on the JAVA_HOME/lib/security/cacerts keystore
I tried to install some Jenkins Plugins to skip certificate check or to trust certain domains
I checked the firewall on the Jenkins machine (adding allow rules for both Java and Rhinoceros applications)
So far, nothing worked.
Any idea?
Thanks

ASP.NET Core Application registers following url https://gearssdk.opswat.com/ even though I was not registered it

I have noticed that my app is receiving requests to https://gearssdk.opswat.com/ even though I never registered this url
I'm building asp.net core web app with asp.net.core 3.1 framework
screenshot
edit:
this happens both on my PC during debugging and on staging instances
this url is not resolving when app is not running.
It looks to me like your app might be intercepting traffic intended for some security tool that's installed on your machine.
If you run nslookup gearssdk.opswat.com from your machine, you should get a response of 127.0.0.1, which is the local loopback address. You could try listening on a different port

How to setup mobile-first-cli to deploy on bluemix behind a corporate proxy

I'm using Mobile Foundation on IBM Bluemix and I'm facing problems in setup IBM MobileFirst-CLI to deploy adapters and apps throw my corporate proxy.
In time, I'm on a macOS with the CLI version below:
mfpdev -v
8.0.0-2016070716
At this time, every time I have to interact with the server in have to connect to it using my phone tethering. Please help, I'm running out of all my data plan.
The actual error:
$ mfpdev adapter deploy
Error: Cannot connect to server 'mfp-bluemix-dev' at 'https://xxxx-server.mybluemix.net:443'.
Reason: Missing runtime configuration details.: connect ECONNREFUSED 158.99.999.99:443
ps: address and ip of server obfuscated.
Best regards,
Bernardo Baumblatt.
At the moment, MFP Dev CLI does not have the feature to configure a proxy. However, if all communications in your enterprise are routed through the corporate proxy, and the proxy can connect to IBM Bluemix, there should not be a problem.
You can submit a Request for Enhancement to add proxy feature to MFP Dev CLI.
What Pat said in his comment is correct. I suspect that you have two issues to address:
Your corporate proxy must allow access to your server's HTTP and HTTPS endpoints (9080 and 9443). I've also heard of cases where the personal firewall on the individual's workstation has interfered.
You are running a VERY old version of the CLI. Assuming your instance of Foundation Server on Bluemix isn't that old, you'll need to upgrade to interact with it properly. I strongly suggest that you upgrade to the latest version via npm -g install mfpdev-cli.

Cannot connect to meteor server running on virtualbox when using force-ssl

I have a windows 8.1 machine running ubuntu 14.x on a virtualbox. I'm running meteor inside that virtualbox. I've bridged the connection and turned off the firewall on both machines. I'm able to connect to the internet from the virtual box, and I can telnet from the windows host into the ubuntu machine.
I can also connect to meteor apps that are not using the force-ssl package; however, I CANNOT connect to meteor apps that are using force-ssl!
If I run "meteor remove force-ssl" I can connect to the app. Any thoughts? Thanks.
EDIT - by connect to the app, I mean "http://[ip_address_of_guest]:3000/" in a browser on the host machine. I've tried both http and https.
I'm new to Meteor but, from this documentation, it looks to me like you are seeing the intended behaviour ...
"This package, part of Webapp, causes Meteor to redirect insecure
connections (HTTP) to a secure URL (HTTPS). Use this package to ensure
that communication to the server is always encrypted to protect users
from active spoofing attacks.
To simplify development, unencrypted connections from localhost are
always accepted over HTTP.
Application bundles (meteor bundle) do not include an HTTPS server or
certificate. A proxy server that terminates SSL in front of a Meteor
bundle must set the standard x-forwarded-proto header for the
force-ssl package to work.
Applications deployed to meteor.com subdomains with meteor deploy are
automatically served via HTTPS using Meteor's certificate."
This answer clarifies.
I am about to try the Digital Ocean guide, "How To Deploy a Meteor.js Application on Ubuntu 14.04 with Nginx", myself to see if it correctly documents the required set up steps. I'll update with my results.

Using dropins in a web app not running in the cloud

I am trying to use the Dropbox drop-ins in one of my projects. It is a web application that should be able to be run locally without a web server. I am using the Dropbox chooser, but it gives an error if it is not running on a web server. It says "invalid origin". Is it possible to get rid of this error without using a local web server to run the application?
You'll probably need to run a local server. Each domain you serve your page from has to be entered in the App console. "localhost" or "127.0.0.1" will work, but those require you to actually run a local web server. (It doesn't have to be a complicated web server... python -m SimpleHTTPServer would work.)