What may be the best way to hide request information from URL in c# MVC? Please explain full process. I am not getting how to do this..Thanks.
Asked
Active
Viewed 109 times
0
-
1It would be useful if you would also describe to the reader what you mean by "request information from url" and also what you have tried and need help understanding. – Kolban Nov 22 '14 at 19:25
-
"request information" means something like http://657898:Student/List?id=2....so i don't want id be appear... – Nov 22 '14 at 19:29
-
It might be that the following information may assist: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history I get the feeling that the "replaceState()" method may do what you need. – Kolban Nov 22 '14 at 19:33
-
You cannot hide it, but you can encrypt it. See: http://stackoverflow.com/questions/9110561/encrypt-query-string-including-keys – Zoman Nov 22 '14 at 19:41
1 Answers
0
you can modify your MVC app config file with the following tags:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear/>
</customHeaders>
</httpProtocol>
</system.webServer>
the clear option clears most of the response headers. if, by any chance, you can put your hands on the context object you can get the Response/Request properties and gain more control over this feature, for instance:
context.Response.ClearHeaders();

ymz
- 6,602
- 1
- 20
- 39