2010-07-21 79 views
1

我有這個奇怪的問題...ASP.NET和jQuery AJAX - 奇怪的問題

我有一個運行在jQuery前端的web服務。當我通過VS2008的集成web服務器運行它時,它運行良好。 但是當我用IIS本身 - 我得到這個錯誤:

System.InvalidOperationException: Request format is invalid: application/json; charset=utf-8. at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

代碼爲AJAX:

$.ajax({ type: "POST", url: " http://localhost/MYSITE/WEBSERVICE.asmx/SOME_FUNCTION ", data: '{ prm1: "' + p1+ '", prm2: "' + p2+ '", prm3: "' + p3+ '"}', contentType: "application/json; charset=utf-8", dataType: "json", .....

任何想法,爲什麼出現這種情況?

該網站是使用「集成託管管道池」的.NET 3.5。

感謝, 羅馬

回答

4

得到的答案...

我添加的HttpHandler和HTTP模塊到web.config中,但沒有將它們添加到system.webserver的處理程序和模塊。

也許會幫助別人

羅馬