web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Legacy Adxstudio : Redirect to a specific page based on condition

(0) ShareShare
ReportReport
Posted on by 687 Most Valuable Professional

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

I have the same question (0)
  • Tanguy TOUZARD Profile Picture
    687 Most Valuable Professional on at

    It seems to work!

    Thank you very much Guido

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans