c# - WCF ServiceRoute POST 405 method not allowed -
i error on operationcontract
post
: 405 method not allowed
get
work fine. i've tried on local , remote server webserver e.g. localhost/mypostmethod/myparam
i host service these :
routetable.routes.add( new serviceroute(@"default", new customwebservicehostfactory(), typeof(defaultservice)));
(i use webhttpbinding inside customwebservicehostfactory)
can not change settings inside iis on remote server. think it's not necessary ether. seems problem somewhere inside code.
tried many thinks , i'm little bit desperate right now. happy suggestions.
added header... solved.
<system.webserver> <httpprotocol> <customheaders> <add name="access-control-allow-methods" value="get, post" /> </customheaders> </httpprotocol> </system.webserver>
Comments
Post a Comment