开发者

Https Implementation in asp.Net [closed]

开发者_Go百科 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

How i can implement https login in asp.net and C#


I'm assuming you your ok with a normal login page. So for ssl buy your certificate and install http://www.instantssl.com/ssl-certificate-support/cert_installation/iis_ssl_certificate_5x.html

Then make sure you login page redirects to https rather than http.

        if (!Request.IsSecureConnection)
        {
            Response.Redirect(Request.Url.AbsoluteUri.ToLower().Replace("http", "https"), true);
        }


The same way you do for the "regular" login. You only have to enable SSL in IIS. For this you will need a server certificate. Read This And This


As with all things .net, first check out what The Gu has to say: Protected ASP.Net Site in 24 lines of code. That should cover the basics of creating a protected site.

In order to protect the page with SSL, you will need a server certificate. Installing one with IIS is covered here: IIS 5/6 and IIS 7. Some specifics of how to secure ASP.Net in this manner are covered here. Dominick Baier's blog is also always a good source of info on .net security matters, and he has an old post on partially-SSL secured ASP.Net sites here that could be helpful depending upon the requirements you are working with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜