0

Im trying to call a asp.net webservice from jQuery but I get the telling me that i need to set the System.Web.Script.Services.ScriptService(). The only problem is that i have set this in the webservice and it still complains?

The jQuery uses POST and application/json and iv inlcuded HttpPost and get in my web.config. What can the problem be???

Thx for any help!

asked Feb 12, 2010 at 12:05
1
  • 1
    Try using something like Firebug to see exact request + response might help. Commented Feb 12, 2010 at 12:32

1 Answer 1

2

Decorate your method with the scriptmethod attribute:

(vb.net)

<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False, XmlSerializeString:=True)> _
Public Function SomeMethod() As String 
End Function
answered Feb 12, 2010 at 12:28
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.