I’ve moved my blog to a self-hosted account.
So, you can see this post at http://www.leandrodg.com.ar/blog/2007/10/05/determine-current-execution-context-webforms-or-winforms.
Thanks for the support!
I’ve moved my blog to a self-hosted account.
So, you can see this post at http://www.leandrodg.com.ar/blog/2007/10/05/determine-current-execution-context-webforms-or-winforms.
Thanks for the support!
Hey! Thanks for the tip. I was using HttpContext.Current but found that it was null when invoking methods via reflection. Using Assembly.GetEntryAssembly() allows for this scenario. I combined the two checks to be safe:
if (Assembly.GetEntryAssembly() != null && HttpContext.Current == null)
Thanks again!
Jimmy
Thanks!,
[...] Got the solution from Leandro’s blog post [...]