RequireHttps 属性重定向到错误的端口
我想坚持使用该属性,因为它很简单。显然 VS2010 开发服务器支持 HTTPS,因为它工作没有问题,这很好。
我点击登录链接,被重定向到 443 并获得了证书。我输入了我的凭据并提交了。然后我被重定向到标准端口 80,而不是我设置的静态端口。
这是一个小小的不便,但不要遵循此帖子解决方案并向 asax/etc 实现一堆代码 在 MVC2 中使用带有 RequireHttps 过滤器的不同端口 我想我可能可以扩展该属性。我已经使用 AuthorizeAttribute 完成了此操作,效果很好。如何查看基本 RequireHttpsAttribute 正在做什么?代码定义当然只给出签名,MSDN也是如此。我是否必须从某个地方下载 MVC2 源代码?
其他想法表示赞赏。
I'd like to stick with the attribute as it is simple. Apparently VS2010 development server supports HTTPS as it worked without problem which was nice.
I followed the login link, was redirected to 443 and presented with a cert. I entered my credentials and submitted. Then I was redirected to standard port 80 instead of the static port I setup.
This is a minor inconvenience but instead of following this posts solution and implementing a bunch of code to asax/etc Use a different port with RequireHttps filter in MVC2 I thought I could probably just extend the attribute. I've done this with AuthorizeAttribute and it worked well. How do I see what the base RequireHttpsAttribute is doing? Code definition of course only gives signature, MSDN does the same. Do I have to download MVC2 source from somewhere or something?
Other ideas appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以从 CodePlex 下载源代码。您还可以使用RedGate的Reflector反编译DLL并查看源代码。
You can download the source from CodePlex. You can also use RedGate's Reflector to decompile the DLL and view the source.