Hello I aspx page with next call for my ashx
<script type="text/javascript" src="/Handlers/MyRedirect.ashx">
</script>
Inside of MyRedirect I do some hard logic and try to redirect to other page of my side it looks like:
public class MyRedirect : HttpTaskAsyncHandler, IReadOnlySessionState
{
public override async Task ProcessRequestAsync(HttpContext context)
{
//some logic here with out any output
//context.Response.ContentType = "application/x-javascript";
context.Response.Redirect("/adminDashboard.aspx", false);
}
}
but in Chrome I getting error Resource interpreted as Script but transferred with MIME type text/html: What I do wrong ? How to fix it thank ?