i have seen similar question in SO, and i tried them but dont know why it didnt meet my requirement
i get this error in website, actually our site works this way, when a users click a product on our site, we redirect them to another site
and in sql db, column site is stored this way : http://another.com/
so when user clicks the button in our site, this works fine, he is redirected another.com
but when i change site column in sql db to http://another.com/GiftPack/PackageDetail?packageid=41
i get this error with following url in our site
http://oursite.com/Product/90/httpcolonslashslashanotherdotscom/GiftPack/PackageDetail%3fpackageid%3d41
this what i tried thus far:
in controller:
[HttpPost]
[ValidateInput(false)]
public ActionResult Product(int prodid, string site)
{
return Redirect(site.Replace("colon", ":").Replace("slashslash", "//").Replace("dots", ".")
.Replace("%3D", "=").Replace("%3F", "?").Replace("slash", "/"));
}
in web.config
<httpRuntime targetFramework="4.5" requestValidationMode="2.0"
requestPathInvalidCharacters="*,:,&,\,?,=" relaxedUrlToFileSystemMapping="true"/>
may i know what wrong i am doing, any help would be great.