Click here to Skip to main content
15,892,281 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
To create encrypt URL in asp.net c#

What I have tried:

i have tried to get the value from user and allocate the value to one variable and give encrypt the value to the declared variable.but i want to encrypt the whole URL.
Posted
Updated 20-Apr-16 1:50am
Comments
phil.o 20-Apr-16 7:28am    
If you encrypt the whole URL, how do you expect the browser to know where to navigate?
Imagine you send an encrypted letter to someone, but you also encrypt the address; how is the postman supposed to know to which mailbox distributing the letter?
OriginalGriff 20-Apr-16 7:31am    
That doesn't make a lot of sense to me - perhaps it's lacking the context you already know and we don't.
As Phil.o has said, as stated it won't work - so you need to explain in much better detail what problem you are trying to solve, and why you think encrypting the URL (if that was possible) would help.
Use the "Improve question" widget to edit your question and provide better information.
F-ES Sitecore 20-Apr-16 7:33am    
Given you haven't said if you are using webforms or MVC this question is impossible to answer. You can't encrypt the entire url, just the bits after the domain. You'd have to implement your own urlrewriting mechanism so that the encrypted urls are decrypted and the request re-routed to the right resource....how you do this depends on if you're using webforms or mvc.

Regardless, this is a pointless idea. If you explain what problem you think url encryption is the solution to, someone might be able to suggest alternatives.

http://forums.asp.net/post/5825782.aspx

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900