Hi,
I have just posted a update to one of my controls which now uses webservices. The control tested fine on local then on connected server but once I put it up to our production on Azure I get Internal Server Error status 500. I really don't know what the difference would be.
My client script is
function PostFBID(method,data,callback,UserId,FacebookId,ItemRef) {
var sf = $.ServicesFramework(<%=ModuleId %>);
sf.getAntiForgeryProperty(data);
$.ajax({
type: "POST",
url: sf.getServiceRoot('MyView') + "ViewServices.ashx/" + method,
beforeSend: sf.setModuleHeaders,
data: data,
success: function (data) {
if (typeof (callback) != "undefined") {
callback(data);
console.log(data);
}
},
error: function (xhr, status, error) {
error);
}
});
};
and my service
[AcceptVerbs(HttpVerbs.Post)]
[ValidateAntiForgeryToken]
public ActionResult AddUserFbAccount(int UserId, string FacebookId, string ItemRef)
{
//edited out for posting size
}
my mapper
namespace MyView
{
public class MyViewServiceRouteMapper: IServiceRouteMapper
{
public void RegisterRoutes(IMapRoute mapRouteManager)
{
mapRouteManager.MapRoute("MyView", "{controller}.ashx/{action}", new[] { "MyView" });
}
}
}
Thanks for the help
Mark