CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    20

    URL Hashing in .NET

    Hi Friends,

    I've an interesting problem in .NET... I'm developing an Web app in .NET which requires the URL of the page(as shown in Browser's Address) to be hashed (encrypted) when posting the page and directing user to another page.

    For eg., if the URL of the page is http://SaleSource.ebix.com/Customer.aspx?ID=1&flag=2
    then the hashed URL should look like
    http://SaleSource.ebix.com/p1.aspx or somewhat like this...

    What I actually mean is the page name along with the Querystring variables need to be encrypted when the page is posted to prevent any malicious use or false post. I know there are different Hashing algorithms like MD5, SHA1 etc., but I need to know how one can write code in .NET to actually use these hashing algos to hash URLs...
    Also when the page is posted, then in the next page the Querystring variable values need to be decrypted in order to use them.

    Can someone help...it's urgent???

    Thanks in advance.


    cheers,
    debsoft

  2. #2
    Join Date
    Apr 2004
    Posts
    17

    ViewState

    Why not just use viewstate ??

    Viewstate is encrypted on the client anyway.

  3. #3
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    20

    Re: ViewState

    Originally posted by DecksTerrorT
    Why not just use viewstate ??

    Viewstate is encrypted on the client anyway.
    Hi DecksTerrorT,

    Thanks for ur reply....Actually I need to ensure when I post the page that the URL seen in the browser's Address bar should be encrypted (except the domain name). For example, if the page URL is
    http://www.microsoft.com/scrubber/scrubber.aspx ?ID=12

    then it should appear something like
    http://www.microsoft.com/r1/GHXY3R5TPQRI6FG in the Address bar.

    Viewstate can't help much in this...also we are not allowed to use Viewstate to store variable values as per client's request.

    Thanks.

    cheers,
    debsoft

  4. #4
    Join Date
    Aug 2001
    Location
    Stockholm, Sweden
    Posts
    1,664
    Hash will probably not be the best choice, because your web server won't be able to decode it (unless you store a hash copy of the org url or have list of urls which you hash against).

    Can you describe in more datail what you want to do, I didn't quite follow you? Which steps are involved? Please provide a user scenario.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured