Hello guys,
JQuery AJAX is giving me a huge headache... Everything works fine on my local machine and used to work fine on the deployment server as well. Since yesterday it's not working anymore and I have no idea why....
For some reason I'm getting a 404 error.
Does anybody know why this could occur?
Javascript code:
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "/LocalServices/Admin.svc/ProductQuery",
dataType: "json",
cache: false,
data: {},
timeout: 100000,
success: function (obj) {
if (handleError(obj)) {
drawProducts(obj.d.Products);
}
},
error: function (xhr) {
if (xhr.responseText) {$("body").html(xhr.responseText);
}
else
alert('TimeOut');
return;
}
});WebConfig:
<?xml version="1.0" encoding="utf-8"?><!-- Weitere Informationen zur Konfiguration der ASP.NET-Anwendung finden Sie unter"http://go.microsoft.com/fwlink/?LinkId=169433". --><configuration><configSections><section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /><!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections><connectionStrings><add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings><system.web><customErrors mode="Off" /><compilation debug="true" targetFramework="4.5.1" /><membership><providers><clear /><add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /></providers></membership><profile><providers><clear /><add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /></providers></profile><roleManager enabled="false"><providers><clear /><add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /><add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /></providers></roleManager><!--Limit fileupload to 100 Megabyte--><httpRuntime maxRequestLength="102400" /><sessionState timeout="120"></sessionState><pages controlRenderingCompatibilityVersion="4.0" /></system.web><system.webServer><modules runAllManagedModulesForAllRequests="true"></modules><httpErrors errorMode="Detailed" /></system.webServer><entityFramework><defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /><providers><provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /></providers></entityFramework><system.serviceModel><serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="0" /><behaviors><serviceBehaviors><behavior name=""><serviceMetadata httpGetEnabled="true" /><serviceDebug includeExceptionDetailInFaults="true" /></behavior></serviceBehaviors></behaviors></system.serviceModel></configuration>
Method:
public Entities.AjaxResult ProductQuery()
{
return Core.Admin.AdminMethods.ProductQuery();
}Error:
