Answer the question
In order to leave comments, you need to log in
How to restrict ajax?
We have a page that responds to ajax. Made like a regular aspx page in which the session is checked and a response is given. Approximately like this.
public partial class GetChatMessages : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SessionHelper.LoggedInOrRedirect();
SessionHelper.AllowedRequestOrThrow();
Response.ContentType = "application/json";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Write(getResponse());
}
Answer the question
In order to leave comments, you need to log in
If you can do this, then it is specially configured this way, by default cross-domain requests are prohibited.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question