asp.net web api - Character 'E' in OData v4's function string parameter is causing 404 error -



asp.net web api - Character 'E' in OData v4's function string parameter is causing 404 error -

i'm having weird problem when i'm writing odata function. function takes string parameter, , returns collection of dtos. function works fine long string parameter doesn't contain character 'e'. i'm wondering if bug in urlroutingmodule or something?

the method declaration is:

[enablequery] [odataroute("getmaintaininglogbyidnumber(idnumber={idnumber})")] public ienumerable<maintaininglogdto> getmaintaininglogbyidnumber([fromodatauri]string idnumber)

and code register function in edm model is:

modelbuilder .function("getmaintaininglogbyidnumber") .returnscollectionfromentityset<maintaininglogdto>("maintaininglog") .parameter<string>("idnumber");

if phone call function with

http://hostname/odata/getmaintaininglogbyidnumber(idnumber='0001100110124221929')

the function returns right result. , url, includes ’e' cause 404

http://hostname/odata/getmaintaininglogbyidnumber(idnumber='000110011e0124221929')

all other characters working fine.

it indeed bug of url parser of our odatalib implementation, github issue has been opened in our issue tracker: https://github.com/odata/odata.net/issues/3 , fixed in our internal code base. should able see prepare in our next nuget release , corresponding prepare code in our next github source update.

asp.net-web-api http-status-code-404 action odata

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -