本文介绍了如何在global.asax中将http路径更改为https?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 如何在global.asax中将http路径更改为https?我正在本地测试。但是将Request.UrlReffer设为null。 private void test() { if (Request.UrlReferrer!= null ) { _Apppath = Request.ApplicationPath; _HostName = Request.UrlReferrer.Host; _ApplicationURL = http:// + _HostName + _Apppath + /; / * ***************设置在SAFP服务器中********************* / // _ HostName =safpnet.safp.org; // _ApplicationURL =https://+ _HostName + _Apppath +/; } Response.Buffer = true ; Response.ExpiresAbsolute = DateTime.Now; Response.Expires = 0 ; Response.CacheControl = no-cache; Response.CacheControl = private; } 解决方案 第四次...... 如果请求,如何纠正url中的response.redirect到https。在Global.asax下,url是本地的http? [ ^ ] 请尝试以下链接,希望它可以帮助你 http://www.youtube.com/watch?v=GADxwe4XY5Y& list = PL6n9fhu94yhXQS_p1i-HLIftB9Y7Vnxlo [ ^ ] How can I change http path to https in global.asax? I am testing locally. But getting Request.UrlReffer as null.private void test() { if (Request.UrlReferrer != null) { _Apppath = Request.ApplicationPath; _HostName = Request.UrlReferrer.Host; _ApplicationURL = "http://" + _HostName + _Apppath + "/"; /****************Settings in SAFP server*********************/ //_HostName="safpnet.safp.org"; //_ApplicationURL="https://" + _HostName + _Apppath + "/"; } Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now; Response.Expires = 0; Response.CacheControl = "no-cache"; Response.CacheControl = "private"; } 解决方案 4th time...How to rectify response.redirect to https in url if the request.url is http locally under Global.asax?[^]Try below link , Hope It helps uhttp://www.youtube.com/watch?v=GADxwe4XY5Y&list=PL6n9fhu94yhXQS_p1i-HLIftB9Y7Vnxlo[^] 这篇关于如何在global.asax中将http路径更改为https?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-23 01:48