可以在 .NET 应用程序中对一页进行 SSL 吗? [英] Can you SSL one page in an a .NET application?

查看:13
本文介绍了可以在 .NET 应用程序中对一页进行 SSL 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能否在 .NET 应用程序中拥有一个页面是 https 而其余页面是 http?例如,只是登录页面?这是否需要在应用程序中进行额外设置,还是像 IIS 设置一样简单?

Can you have one page in a .NET application that is https but the rest be http? For instance, just the login page? Does this take extra setup in the application or is it just as simple as an IIS setting?

推荐答案

是的,你可以.我推荐这个免费的开源 DLL,它可以让您指定哪些页面和文件夹需要 SSL,哪些不需要:

Yes you can. I recommend this free open source DLL that lets you designate which pages and folders need SSL and which don't:

http://www.codeproject.com/KB/web-security/WebPageSecurity_v2.aspx

所以你可以像这样在你的 web.config 中设置一个安全的页面:

So you can setup a page to be secure in your web.config like this:

<secureWebPages encryptedUri="www.example.com" unencryptedUri="www.example.com" mode="RemoteOnly" >
    <files>
      <add path="/MustBeSecure.aspx" secure="Secure" />
    </files>
</secureWebPages>

这篇关于可以在 .NET 应用程序中对一页进行 SSL 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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