Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Legacy Adxstudio : Redirect to a specific page based on condition

$
0
0

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


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>