I have MapRoute on my C# MVC website like this :
routes.MapRoute(
name: "Default4",
url: "{param1}/{param2}/{param3}/{param4}",
defaults: new { controller = "Home", action = "Index" }
);
and the URL that access will contain encoded value
$2a$10$InFyv7LT7RUa.IRfJcY/B.edpZsJcRtImQrODwN9lvb2pee0jJ/Bu
sample URL :
here's my controller code :
[HandleError]
public class HomeController: Controller {
public ActionResult Index(string param1, string param2, string param3, string param4, string param5) {
Response.StatusCode = 302;
String userAgent;
userAgent = Request.UserAgent;
string typevalue = "";
string value = "";
param1 = string.IsNullOrEmpty(param1) ?
"" :
param1;
param2 = string.IsNullOrEmpty(param2) ?
"" :
param2;
param3 = string.IsNullOrEmpty(param3) ?
"" :
param3;
param4 = string.IsNullOrEmpty(param4) ?
"" :
param4;
param5 = string.IsNullOrEmpty(param5) ?
"" :
param5;
if (param1 != "") {
// do something
}
}
tried the setting with config not fix the problem. but the value could be in any path, is ther solution to handle this? because the code always get 404.