Beispiel #1
0
        protected void Page_PreInit(object sender, EventArgs e)
        {
            Uri redirectUrl;

            switch (SharePointContextProvider.CheckRedirectionStatus(Context, out redirectUrl))
            {
            case RedirectionStatus.Ok:
                return;

            case RedirectionStatus.ShouldRedirect:
                Response.Redirect(redirectUrl.AbsoluteUri, endResponse: true);
                break;

            case RedirectionStatus.CanNotRedirect:
                Response.Write("An error occurred while processing your request.");
                Response.End();
                break;
            }
        }