We are using Open Rasta on an Azure Web Role to provide a REST API. Our GET methods work fine returning Json data. When I try and POST a request with a 开发者_如何学JAVAJson body I get this error.
The server cannot service the request because the media type is unsupported. It returns a 415 code. I examined the messages in Fiddler and they look ok.
I am guessing that IIS is not setup to allow -> Content-Type: application/json
I found this http://msdn.microsoft.com/en-us/library/gg433059.aspx but am not sure what I need to do to get this to work.
Any help would be great.
I dont recall the answer exactly, but in Non Azure types of situations at least there is a web.config file that you set to allow Posts.
I believe it's this:
system.web
protocols
add name = "HttpPost"
精彩评论