Click here to Skip to main content
15,924,581 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello

I have developed a website in VS2008 using 2.0 framework.
Now I have uploaded it on live server which has VS2005, but it's not working.

Can anyone please tell me, does WebMethod works in VS2005?

Thanks in Advance.

Regards,
Aman
Posted
Comments
ZurdoDev 10-Dec-12 8:52am    
If it is on a live server then VS2005 has nothing to do with it because it gets hosted in IIS. We need a lot more details.
Member 9207317 12-Dec-12 0:02am    
Hello

Thanks for your help.

Actually I'm working on client's machine using Remote Desktop connection and developing the website on his machine using VS2005.
ZurdoDev 12-Dec-12 7:56am    
So, what isn't working?
Member 9207317 12-Dec-12 8:38am    
I'm calling a WebMethod using Jquery.Ajax.

Jquery code:
function Testok(values) {


alert(location.protocol + "//" + location.host + "//" );
$.ajax({
type: "POST",
url: "NotificationsPage.aspx/UpdateEmailStatus",
data: "{'IDs':'" + values.toString() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json"
});
dgNotificatons.Refresh();
}

VB.Net code:

<webmethod()> _
Public Shared Function UpdateEmailStatus(ByVal IDs As String) As Boolean
My code
End Function

it's working fine on my machine which have VS2010 but not on Client Machine that has VS2005.
ZurdoDev 12-Dec-12 8:49am    
First off, if it's a webmethod in my experience you put that in an ASMX file, a web service, not in a page (aspx). But have you stepped through the code? What exactly is it doing and what is it not doing?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900