Sending jquery ajax request to ASP.NET 4.5.1 web:
var request = $.ajax({
url: 'ajax.ashx?' + ajaxMethod,
dataType: 'json',
responseType: "json",
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
type: "POST",
data: data
});
When using IIS Express the server receives the ajax request.
When using IIS 7.5 the server does not receives the ajax request.
Notes:
There was no problem on my old PC with this web site. The problem started on a new PC.
No problem with .aspx pages.
Solved.
The problem was permission to access SQL Server using trusted connection.
After changing the connection string to use User/Password connection it works.