c# - 500 internal server error when : (colon) is at the end of WebApi Url. Accepting ipv6 as param -


i have action method receives ip parameter.

[httpget] [route("lookup/{ipaddress}")] public string get(string ipaddress) {     return ipaddress; } 

problem when api called ipv6 compact in parameter ending : (colon), call doesn't reach action , getting 500 internal server error no detail.

works fine local machine using vs 2013 when deploy azure appservice ipv6 gives internal server error.

already added requestpathinvalidcharacters

<system.web>     <compilation debug="true" targetframework="4.5" />     <customerrors mode="off" />     <httpruntime targetframework="4.5" requestpathinvalidcharacters="&lt;,&gt;,*,%,&amp;,\,?" /> </system.web> 

and set the

<modules runallmanagedmodulesforallrequests="true"> 

works fine on local iis , iis express when deployed azure website api not working.

could try:

change config string <... requestvalidationmode="2.0" requestpathinvalidcharacters="*,:,&,\" ...>, happens? problem discussed in internet, , ways fix there, example here:

http://www.hanselman.com/blog/experimentsinwackinessallowingpercentsanglebracketsandothernaughtythingsintheaspnetiisrequesturl.aspx

using colon (:) in url asp.net/iis

asp.net mvc colon in url

2) encode/decode other unicode character


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -