如何配置Visual Studio 2017以在ASP.Net MVC https站点中公开未加密的端口 [英] How to configure Visual Studio 2017 to expose a non-encrypted port in a ASP.Net MVC https site

查看:1153
本文介绍了如何配置Visual Studio 2017以在ASP.Net MVC https站点中公开未加密的端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Visual Studio 2017在我的locahost(开发机器)上测试来自Stripe.com的webhook。我的网站使用https。为了测试webhooks,你需要一个url,所以在我的本地机器上我必须安装和使用ngrok。 Ngrok给了我一个提供给Stripe的网址,因此条纹知道发送帖子请求的位置。问题是ngrok无法使用https!



我一直在寻找2天的解决方案,我已经通过电子邮件向ngrok询问,他们回复了


能够配置VS以暴露未加密的端口,但我不是非常熟悉它以某种方式告诉你如何去做。也许ngrok VS扩展会有所帮助?


I'm trying to test webhooks from Stripe.com on my locahost (dev machine) using Visual Studio 2017. My site uses https. In order to test webhooks, you need a url, so on my local machine I have to install and use ngrok. Ngrok gives me a url to provide to Stripe so stripe knows where to send the post request. The problem is ngrok doesn't work with https!

I've been looking for a solution for 2 days and I've emailed ngrok to ask, they replied with

you should be able to configure VS to expose a non-encrypted port but i'm not super familiar with it in a way that I can tell you how to go about doing it. maybe the ngrok VS extension will help? https://ngrok.com/docs#visual-studio

I've already tried running the extension. No luck! All it does is open up the ngrok.exe and runs it.

So I'm trying to see if it's possible to open/expose a non-encrypted port? I assume this means a action method or controller using http and NOT https?

Or does it mean something else? Is this possible in ASP.NET MVC???

解决方案

See my answer here: How To Disable Https in Visual Studio 2017 Web Proj ASP.NET Core 2.0

Note: If I'm wrong about there being a default unsecured URL, the question above has a solution for disabling the secured URL. I didn't try it because there was already an unsecured URL defined in my existing project (as I suspect there is with yours as well)

Just use the established unsecured URL instead of the secured one.

这篇关于如何配置Visual Studio 2017以在ASP.Net MVC https站点中公开未加密的端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆