question

QamarMo-8446 avatar image
0 Votes"
QamarMo-8446 asked AgaveJoe commented

WebMethod not being hit

WebMethod works fine if project is run in local Visual Studio but the same WebMethod will not be hit if project is deployed on local IIS.
What do I need to do to get it to work on localhost and/or a web server?

dotnet-aspnet-generaldotnet-aspnet-webforms
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @QamarMo-8446,
You should provide the error message and describe the problem more precisely.
Maybe you can try removing router settings in web.config and adding to httpmodules section

 <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Best regards,
Lan Huang

0 Votes 0 ·

It has been fixed.
I was making 2 ajax calls to web method; removed one and adjusted the first call.

0 Votes 0 ·
Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

you don't say the technology you are using, but use the browsers debug tools to see the url and server response. probably missing the part of the path.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

QamarMo-8446 avatar image
0 Votes"
QamarMo-8446 answered

It has been fixed.
I was making 2 ajax calls to web method; removed one and adjusted the first call.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

QamarMo-8446 avatar image
0 Votes"
QamarMo-8446 answered AgaveJoe commented

This issue has been resolved but I don't see an option to mark it as answered.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I was making 2 ajax calls to web method; removed one and adjusted the first call.

Right, I explained this several times in your other threads.

https://docs.microsoft.com/en-us/answers/questions/795672/invalid-web-service-call-error-jquery-post-to-a-we.html




0 Votes 0 ·