I downloaded the Visual Studio 2010 template associated with http://www.dotnetopenauth.net/ . I can make it work as advertised. I do not start the project from scratch, and I do not want to invest a lot of time in integrating all web.config, handlers, etc. In my application to get OpenID to work for me. The document says that I should be able to make a single line implementation using a button and a user control. I believe I did this and I get an error.
Here is what I did.
- Create an empty asp.net web project
- Add DotNetOpenAuth.dll to bin and reference it
- Add user registration to the top of the page
- Create a button on the page that invokes user control.
When I run it and press the button, I get:
"Condition not met: this.Identifier! = Null Identifier not set.
I know that it should be more than that, but I just don’t understand. Can someone explain further what I need to do?
Thank,
<%@ Page Language="C#" %>
<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty" TagPrefix="rp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void LoginId_Click(object sender, EventArgs e)
{
OpenIdTextBox1.LogOn();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="LoginId" runat="server" Text="Button" onclick="LoginId_Click" />
<rp:OpenIdTextBox ID="OpenIdTextBox1" runat="server" />
</div>
</form>
</body>
</html>
source
share