HttpContext not supported in Sandbox environement RRS feed

  • Question

  • What is the alternative approach to use  HttpContext on online ? 

    • Edited by ykumar01 Monday, December 26, 2016 8:18 PM
    Monday, December 26, 2016 8:09 PM

All replies

  • Hello,

    What's your scenario? What do you plan to get from HttpContext?

    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Tuesday, December 27, 2016 8:32 PM
  • Hello! For example, to get host name from plugin: 


    var webContext = HttpContext.Current;

                if (webContext != null)
                    var requestHostUrl = webContext.Request.Url.Host;


    Tuesday, October 3, 2017 4:34 PM
  • Kirill,

    Have you tried code that you provided in Sandboxing mode? HttpContext is null there. Just FYI.

    Dynamics CRM/Business Solutions MVP
    Read My blog

    Tuesday, October 3, 2017 5:24 PM