views:

171

answers:

1

I am using DotNetOpenAuth-3.3.0.9302 nightly build, I have run into a problem where it seems that if openidajaxtextbox is placed in a update panel it blocks autopostback events from firing. so i did a simple sample to illustrate the problem.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
    <%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty"
    TagPrefix="openid" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

                        <openid:openidajaxtextbox id="OpnIdAjxTxtB" runat="server" onloggingin="OpnIdAjxTxtB_LoggingIn"
    onloggedin="OpnIdAjxTxtB_LoggedIn" onclientassertionreceived="onauthenticated(sender)"
    onunconfirmedpositiveassertion="OpnIdAjxTxtB_UnconfirmedPositiveAssertion"
    identifierrequiredmessage="Vänligen kontrollera OpenID innan du fortsätter."
    logoninprogressmessage="Vänligen vänta tills OpenID inloggningen har slutförts."
    logontext="LOGGA IN" logontooltip="Klicka här för att logga in med ett popup-fönster."
    retrytext="FÖRSÖK IGEN" retrytooltip="Försök igen att hitta en misslyckad identifierare."
    authenticationfailedtooltip="Verfifieringen misslyckades" authenticatedastooltip="Verfierad som {0}."
    authenticationsucceededtooltip="Verfierad av {0}." busytooltip="Verfiferar" 
                        autopostback="True" CssClass="M_TxtB" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">                             
        <ContentTemplate>

                 <br />

            <asp:Label ID="Label1" runat="server" Text="1"></asp:Label>
                 <br />
                 <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" Text="test" />
        </ContentTemplate>
        </asp:UpdatePanel>


    </div>
    </form>
</body>
</html>

     Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration
        Imports DotNetOpenAuth.OpenId.RelyingParty

        Partial Class test
            Inherits System.Web.UI.Page

            Protected Sub OpnIdAjxTxtB_LoggedIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs)
                If OpnIdAjxTxtB.AuthenticationResponse.Status = AuthenticationStatus.Authenticated Then

                    ' do something
                End If
            End Sub

            Private _runOnes As Nullable(Of Boolean)
            Protected Sub OpnIdAjxTxtB_LoggingIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs)
                ' Retrieve the email address of the user
                If Not _runOnes.HasValue Then
                    Dim c As New ClaimsRequest
                    c.Email = DemandLevel.Require
                    e.Request.AddExtension(c)
                    _runOnes = True
                End If
            End Sub

            Protected Sub OpnIdAjxTxtB_UnconfirmedPositiveAssertion(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs)
                ' This is where we register extensions that we want to have available in javascript
                ' on the browser.
                OpnIdAjxTxtB.RegisterClientScriptExtension(Of ClaimsResponse)("sreg")
            End Sub

            Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
                Label1.Text = Label1.Text + 1
            End Sub
        End Class
    

this code just increments the number in the label. so by placing the openidajaxtextbox inside the updatepanel I am able to increment the label number just ones all other events seem not to be fired. but if the openidajaxtextbox is placed outside the updatepanel the code works as expected.

what is going on here Andrew? what am I missing :)

+2  A: 

Thanks for the bug report. It's fixed in the master branch as commit 0b69100. If you download the tomorrow's nightly build it should have the fix.

Andrew Arnott
thanks, i tested the build and it works perfect :) but I may have found another bug but I need to investigate it a little bit more to be sure. great job
Murre
You're welcome. If you find a bug, I'd encourage you to file a ticket on http://dotnetopenauth.net/ Questions are cool on stackoverflow, but it's not the best bug reporting or tracking mechanism.
Andrew Arnott