Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private IWebOperationContext context = new WebOperationContextWrapper(WebOperationContext.Current); // Get the context
- context.OutgoingResponse.StatusCode = HttpStatusCode.Unauthorized; // Set the 401
- throw new WebFaultException(System.Net.HttpStatusCode.Unauthorized);
- HttpContext context = HttpContext.Current;
- context.Response.StatusCode = 401;
- context.Response.End();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement