My asp.net application have form authentication. When user logs in, he is redirected to a new page abc.aspx. On this page, in javascript, on document.ready, a service call is made to some service which have AspNetCompatibilityMode on. In the interceptor of the service, I try to find the HttpContext.Current but when its the first request to the application, interceptor does not get HttpContext.Current and is found null. After that, its never null but only on the first request to the application.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to store image outside of the website's ro
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
相关文章
- WCF发布Windows服务 POST方式报错 GET方式没有问题 应该怎么解决?
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
Correctly said by Peer, there is no HttpContext in WCF. You may use OperationContext.Current.RequestContext
You would have to follow below link
http://www.danrigsby.com/blog/index.php/2008/05/23/understanding-instancecontext-in-wcf/
If you use WCF, in the wcf there is no HttpContext.Current. You have to use the InstanceContextMode of the Service class in the Session.