Ticket T125518
Visible to All Users

Using WebWindowTemplateHttpHandler in v14.1 as per B222208

created 11 years ago

I did that you said in the previous message, but when i tried to test the application in the Login.aspx dissapear the User and password fields . Please help us with this as soon as possible because we need it to implement this new version in ours clients.
I'm sending you a code sample.

Answers approved by DevExpress Support

created 11 years ago

The WebWindowTemplateHttpHandler is not currently in use. If it is required for your particular task, make sure that it performs only what you want it to do and simply calls the ProcessRequest method of the requested page to restore the normal request processing flow.
In you case, the handler should look as follows:

Visual Basic
Public Class WebWindowTemplateCustomHttpHandler_B222208 Implements IHttpHandler Implements IRequiresSessionState Private m_actualHandler As IHttpHandler Public ReadOnly Property ActualHandler() As IHttpHandler Get Return m_actualHandler End Get End Property #Region "IHttpHandler Members" Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property Public Sub ProcessRequest(context As HttpContext) Implements IHttpHandler.ProcessRequest Dim templateContext__1 As TemplateContext = WebApplication.Instance.RequestManager.GetTemplateContext() WebApplication.CurrentRequestTemplateType = WebApplication.Instance.RequestManager.GetTemplateType() If templateContext__1 <> TemplateContext.Undefined Then If Not WebApplication.Instance.IsLoggedOn AndAlso templateContext__1 <> TemplateContext.LogonWindow Then Dim redirectTemplate As New Page() Dim script As String = RenderUtils.GetScriptHtml(String.Format("window.location.href='{0}' + '?ReturnUrl=' + encodeURIComponent(window.location.pathname + window.location.hash);", WebApplication.LogonPage)) redirectTemplate.Controls.Add(New LiteralControl(script)) redirectTemplate.ProcessRequest(context) Return End If Dim template As IFrameTemplate = WebApplication.Instance.CreateTemplate(templateContext__1) Dim page As Page = DirectCast(template, Page) m_actualHandler = page DirectCast(template, IHttpHandler).ProcessRequest(context) Else Dim unknownPage As IHttpHandler = DirectCast(System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(context.Request.Path, GetType(Page)), IHttpHandler) m_actualHandler = unknownPage unknownPage.ProcessRequest(context) End If End Sub #End Region End Class

Do not hesitate to contact us in case of further difficulties.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.