У меня очень простая страница ASMX ...
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services
<WebService(Namespace:="http://localhost/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ScriptService()> _
Public Class JSWSGuessWeddingsByDay
Inherits System.Web.Services.WebService
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=True)> _
Public Function HowManyPeopleAreGettingMarriedToday() As Integer
Dim weddingCount As New Controller.Member.MemberDal
Return weddingCount.GuessWeddingsByDay(Nothing)
End Function
End Class
Как добавить Access-Control-Allow-Origin в заголовки ответа, чтобы веб-сервис мог использоваться несколькими сайтами, использующими AJAX?