ecLearn LMS, developed by Engineered Code, is proud to sponsor Community Summit North America. Visit us at booth #1857 and get on the list for our Summitland Prize!
If you’ve done any work with Dynamics 365 Portals, you’ve probably run into the dreaded “We’re sorry but something went wrong” white screen of death. In this post I’ll share the tricks I’ve used to get more details about the error without contacting Microsoft support.
I’ll soon be releasing a series of blog posts on how Dynamics 365 Portals works with Virtual Entities (spoiler alert – pretty well!). More than once during my research I ran into the White Screen of Death, or a variation where an Entity List wouldn’t load, or certain features of an Entity Form wouldn’t act the way I’d expect. Essentially, any time the portal runs into a server-side error, this screen is displayed. The error screen provides no details on what the problem actually is, so in the past you were left with taking shots in the dark, or contacting Microsoft support to get more details. Neither of these options is desirable.
I thought to myself, “There must be a better way!”. And of course, the good news is I wouldn’t be writing this blog post if there wasn’t. The better news is that with the latest release of Dynamics 365 Portals (v8.4), we have even more options.
In the last couple weeks, Microsoft has started rolling out v8.4 of Portals, which includes two new features that help with the White Screen of Death:
Both of these are super helpful, and often will give you an indication as to what is going on. However, these new features are only available in v8.4 so, in the meantime if you haven’t upgraded, this won’t help. Also, sometimes error logs aren’t always enough; sometimes you need to be able to step through the code in the debugger in order to figure out what’s going on. That leads me to Option 2.
Last year, in order to appease on-premise customers (since the new version is online-only), Microsoft released the full source code for the Dynamics 365 Portals web application. Adoxio (the company spun out of Adxstudio, who originally built Portals) took this code, uploaded it to GitHub, and called it xRM Portals Community Edition.
For now, we can take this code, point it at our CRM, and run the web application locally to see what’s going on.
It’s actually pretty quick and easy to get started:
<add name="Xrm" connectionString="ServiceUri=https://instancename.crm.dynamics.com; Username=user@instancename.onmicrosoft.com; Password=password;" />
If you build and run the project, it should connect to your existing Portal data, and you should have the ability to step through the code.
Microsoft has been adamant that the code release they provided was a one-time only thing. Therefore, there is an expiry date on this technique, we just don’t know what that date is. At some point, the version in the cloud will be different enough that the code won’t even work. It’s hard to say how soon that will be, but my guess is that we are months away from that. My testing was with the new v8.4 released just a couple weeks ago (the xRM Portals Community Edition is based on v8.3), and I didn’t run into any major show stoppers.
Hopefully with these techniques the white screen of death won’t be so terrifying.
[…] post Debugging Dynamics 365 Portals Server-side Code appeared first on Engineered […]
Interesting and very helpful post. Keep it up Nicholas 🙂
Very helpful. This was a big concern of ours flipping from Adx v7 to online portals. We relied heavily on running the portal in VS to find issues.
[…] a previous blog post I had mentioned how it can be useful to use the Portals Source Code release to actually step […]
[…] a previous blog post I had mentioned how it can be useful to use the Portals Source Code release to actually step […]
[…] curious how I was able to determine how the functionality worked, it all goes back to one of my old blog posts. No, I don’t have special access to product team developers that tell me how it works. […]