如何获取ScriptResource.axd? HTTPS 调用
我的网站是 HTTPS,我使用重定向模块将对 HTTP 页面的任何请求更改为 HTTPS 页面。使用这个效果很好...
http://www.codeproject.com/KB/ aspnet/WebPageSecurity.aspx
但是,该页面还获取各种脚本资源作为 ASP.Net AJAX 和 Telerik 控件的一部分,例如
http://www.mywebsite.co.uk/ScriptResource.axd?d=RZJPznutyCmbbBAHSbKedj3kgUyiK7uBICOoB7IdFt8MWVJ-D-TxNWt-mdkCrv5HGSAToaV2udumFlE1EKBiow2&t=7dbf7a27
,由于我的站点的大部分使用 HTTPS,然后一些 GET 请求使用 HTTP 形成页面IE8 根本不喜欢这样,并提示用户仅显示通过 HTTPS 接收的内容。如果用户这样做,那么 ASP.Net AJAX javascript 文件不会加载到浏览器中,并且会发生混乱!
有没有办法告诉 ASP.Net 或 IIS 通过 ScriptResource.axd 作为 HTTPS 提供所有请求?我在论坛上看到有人说他们使用了处理程序来执行此操作,但没有提供示例代码。
如果能指出正确的方向,那就太好了。
谢谢。
My website is HTTPS and I use a redirect module to change any requests for a HTTP page into an HTTPS page. This works nicely using this...
http://www.codeproject.com/KB/aspnet/WebPageSecurity.aspx
However, the page also gets various script resources as part of the ASP.Net AJAX and Telerik controls e.g.
http://www.mywebsite.co.uk/ScriptResource.axd?d=RZJPznutyCmbbBAHSbKedj3kgUyiK7uBICOoB7IdFt8MWVJ-D-TxNWt-mdkCrv5HGSAToaV2udumFlE1EKBiow2&t=7dbf7a27
As the majority of my site uses HTTPS and then a few GET requests to form the page use HTTP IE8 does not like this at all and prompts the user to only show the content received via HTTPS. If the user does this then the ASP.Net AJAX javascript files are not loaded into the browser and chaos occurs!
Is there a way I can tell ASP.Net or IIS to serve all requests via ScriptResource.axd as HTTPS? I saw on a forum someone saying they had used a handler to do this but no example code was supplied.
Would be really greatful for a pointer in the right direction.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论