Hi community,
I don't know if I will find help here but let's try
I implemented a project using Adxstudio 7.0.11.0 and I was able to perform redirection on condition by updating method OnInit of class PortalMasterPage this way
var myPage = ServiceContext.GetPageBySiteMarkerName(Website, "My Page");
var myPageUrl = ServiceContext.GetUrl(myPage);
myPageFullUrl = new UrlBuilder(myPageUrl);
if (somecondition)
{
Context.RedirectAndEndResponse(myPageFullUrl);
}
I'm in the process of migrating to latest version of Adxstudio and this code does not work anymore. I'm getting a "Thread was being aborted" exception with the following stack trace.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at Adxstudio.Xrm.Web.Extensions.RedirectAndEndResponse(HttpApplication application, HttpResponse response, String url)
at Adxstudio.Xrm.Web.Extensions.RedirectAndEndResponse(HttpContext context, String url)
Any help on how to fix this error and make the redirection works?
Thanks
*This post is locked for comments