telesphoreo
New Member
I'm using Asp.Net + MVC 4.
I'm working on a REST API, so the parameters are specified in the path part of the url (e.g. /accounts/account1) rather than in the querystring (accounts?id=account1). I want to be able to query for an account that has a question mark in an ID. The approach is to uri-encode the ID of the account, then use it in the url. However, ASP.NET automatically unescapes this, and my MVC app does not see a difference between a request for "/accounts/%3Faccount1" and "/accounts/?account1". Is there a way to change this behavior?
I'm working on a REST API, so the parameters are specified in the path part of the url (e.g. /accounts/account1) rather than in the querystring (accounts?id=account1). I want to be able to query for an account that has a question mark in an ID. The approach is to uri-encode the ID of the account, then use it in the url. However, ASP.NET automatically unescapes this, and my MVC app does not see a difference between a request for "/accounts/%3Faccount1" and "/accounts/?account1". Is there a way to change this behavior?