且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

你怎么能保护/加密在asp.net中的查询字符串?

更新时间:2023-02-17 07:49:09

您必须手动将其使用.net加密之一进行加密。真,这是不查询字符串是什么。如果你不希望用户能够访问它,你会发现它传递页面之间的不同的方式。

You'll have to encrypt it manually using one of the .Net encryptions. Really this isn't what the query string is for. If you don't want the users to be able to access it, you should find a different way of passing it between pages.

下面是一个项目,会告诉你如何做对称加密。
HTTP://www.$c$cproject.com/KB/security/SimpleEncryption的.aspx

Here is a project that will show you how to do symmetric encryption. http://www.codeproject.com/KB/security/SimpleEncryption.aspx

敢我提到这一点,因为这会造成显著的开销,但你可以在视图状态张贴您的信息,并使用跨页的职位是传递的信息:

Dare I mention this, because it will create significant overhead, but you can post your information in the view state and use cross page posts to pass the information around:

http://www.velocityreviews.com/forums/t119789-view-state-in-$p$pvious-page-using-cross-page-postback.html