Skip to main content

Notifications

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

  • Tanguy TOUZARD Profile Picture
    687 Most Valuable Professional on at
    RE: Legacy Adxstudio : Redirect to a specific page based on condition

    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans