Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Portal Error: Failed to retrieve current HTTP context

Posted on by Microsoft Employee

Hello,

We are running v7.0.0023 Portals in production on a 2 instance Azure WebApp application.  We are occasionally running into a 'Failed to retrieve current HTTP context.' portal error that causes the entire portal to crash.  A restart of the WebApp application resolves the problem.  We are unable to reproduce the error and the problem appears to occur randomly.  We have plenty of unused room on CPU and memory server resources.  This is happening for us a couple times per week.  

Has anyone else run into this problem or know a solution?


Thanks,

Greg

*This post is locked for comments

  • Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Portal Error: Failed to retrieve current HTTP context

    Hi, 

    Please plan to upgrade your Adxstudio Portal to the latest one to get this issue resolved.

    I am not sure what exactly line of code and changes I made at that time. Since, now I have been moved to the Adxstudio latest version so unfortunately, it's not possible for me to find.

    Thanks

  • Suggested answer
    Alan Mervitz Profile Picture
    Alan Mervitz 295 on at
    RE: Portal Error: Failed to retrieve current HTTP context

    I think this is supposed to be fixed in version 7.0.0026 that was released on February 2, 2018 (download page). This is the relevant item from the release notes:

    • Fix a race condition during portal application startup that could cause a portal to fail to initialize successfully and be stuck in a failed state until restarted.
  • RE: Portal Error: Failed to retrieve current HTTP context

    @Arpit I checked our Web Pages and we did not have any pages with 'Enable Tracking' set to 'Yes'.  Do you have and could you share the web.config lines provided by MS support?

  • Mahesh Wankhade Profile Picture
    Mahesh Wankhade 90 on at
    RE: Portal Error: Failed to retrieve current HTTP context

    Thx for all the responses(Arpit,Goodwin).

    @Arpit -

    For us they suggested some changes in our Global.asax as explained in below post

    www.adoxio.com/.../2017-04-03-workaround-fix-for-validation-of-viewstate-mac-failed

    but this this didn't worked for us :(

    were you suggested any other changes ?

    will you able to share what code changes Microsoft suggested in your Web.Config.

  • Suggested answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Portal Error: Failed to retrieve current HTTP context

    Hello Everyone,

    I had also faced the same problem in my Production instance with Adxstudio 7.23 version. It was a showstopper issue so I raised a ticket with Microsoft and got to know It's a bug in Adxstudio code. They suggested me to upgrade it to the latest version but doing the upgrade was not the solution for me as this process may take time.

    Another solution was:

    1. Microsoft developer has given few lines of code that I had to place in my web.config file of Adxstudio solution.
    2. Set all Webpages 'Page Tracking' values to 'No' completely in your CRM instance. (see below image to navigate to 'Page Tracking' option on your webpage)

    Microsoft suggested avoiding the 'Page Tracking' feature in Adxstudio, especially when you're portal is being used by the large audience. This is the root cause of this issue.

     Enable Tracking

    After doing this my issue got resolved completely.

    First, I would recommend you to try the second step and observe whether the issue gets resolved or not. If not, then get in touch with Microsoft to perform the first step also.

    If you find the answer as useful, please mark it as verified

    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

     

  • RE: Portal Error: Failed to retrieve current HTTP context

    We still randomly run into this problem.  We haven't found a pattern to the problem.  Our portal usage is pretty consistent, and sometimes we run into the error multiple times per week, at other times we can go a month or two before running into the error again.  

  • Mahesh Wankhade Profile Picture
    Mahesh Wankhade 90 on at
    RE: Portal Error: Failed to retrieve current HTTP context

    Any luck with this error we are seeing same issue. after heavy load portal goes down for us. we are also using same ADX version.

    Thanks,

    Mahesh

  • Tanguy TOUZARD Profile Picture
    Tanguy TOUZARD 687 Most Valuable Professional on at
    RE: Portal Error: Failed to retrieve current HTTP context

    Is anyone found out a confirmed cause and solution? I'm experiencing the same

  • Alan Mervitz Profile Picture
    Alan Mervitz 295 on at
    RE: Portal Error: Failed to retrieve current HTTP context

    We use Always On without any problems, all that does is prevent the application pool from shutting down during periods of inactivity.

    The only other change I can think of that we made which may have stopped the error from occuring is reducing to 1 instance. If you could try that and the error stops then I think the error is probably related to the portal bus cache invalidation.

  • RE: Portal Error: Failed to retrieve current HTTP context

    Alan Mervitz We do not have application initialization enabled in web.config, but we do have 'Always On' configured on the Web App instance running our Portals application.  Any experience with this setting causing problems?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans