DotNetOpenAuth:Web表单,入门 [英] DotNetOpenAuth: Webforms, Getting Started

查看:148
本文介绍了DotNetOpenAuth:Web表单,入门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出如何让DotNetOpenAuth( http://www.dotnetopenauth.net/ )在我的web表单应用程序的工作。

I am trying to figure out how to get DotNetOpenAuth(http://www.dotnetopenauth.net/) working in my webforms app

我不明白的地方开始。我有我的Login.aspx的OpenIDSelector,让您选择谷歌或雅虎。你可以选择一个,那么弹出来了,并让您登录。一旦你登录的程序挂起,因为它试图做一些事情以数据库 ???

I don't understand where to begin. I have an OpenIDSelector on my Login.aspx that lets you choose google or Yahoo. You can choose one, then a popup comes up, and lets you login. Once you login the program hangs because it is trying to do something with a database???

我不能只是使用一些控制(如OpenIDSelector),并取回用户通过身份验证,得到他们的ClaimedID和处理剩下的自己?

Can't I just use some control(like the OpenIDSelector) and get back that the user was authenticated, get their ClaimedID and handle the rest myself?

编辑:试图开始使用的OpenID在Web表单?去这里...

<一个href=\"https://github.com/DotNetOpenAuth/DotNetOpenAuth/wiki/Creating-an-openid-relying-party-%28programatically%29\" rel=\"nofollow\">https://github.com/DotNetOpenAuth/DotNetOpenAuth/wiki/Creating-an-openid-relying-party-%28programatically%29

推荐答案

您不需要使用项目模板。您可以删除OpenIDSelector控制到任何web应用程序,它会在简约的只是工作给我的用户名的方式开箱即用。有没有SQL依赖任何的在DotNetOpenAuth库。刚刚办理 OpenIdSelector.LoggedIn 事件,你会得到你想要的用户名。

You don't need to use the project template. You can drop the OpenIDSelector control into any web app and it will Just Work in the minimalist "give me the username" way out of the box. There's no SQL dependencies whatsoever in the DotNetOpenAuth library. Just handle the OpenIdSelector.LoggedIn event and you'll get the username you want.

项目模板,臃肿的,因为它可能在你看来,假设你确实有用户数据的存储,并且要提供合理的日志和帐户管理经验。它也可以在Web群和云托管环境。如果你是从头开始,这是上手的好方法,但自然,它附带了一些code将适用于比别人少,这就是为什么你有源 - 所以你可以改变它

The project template, bloated as it may seem to you, assumes you actually have user data to store, and that you want to provide a reasonable log in and account management experience. It also works in web farms and cloud hosted environments. If you're starting from scratch this is a great way to get started, although naturally some code that it comes with will apply less than others, which is why you have the source -- so you can change it.

是,该项目模板包含数据库的依赖。它使用LINQ到实体,以便与实体提供商的任何数据库的工作 - 不仅仅是SQL Server中。它带有的模式该数据库建成,只是setup.aspx运行,它应该创建数据库为您在本地SQLEx preSS安装。

Yes, the project template includes a dependency on a database. It uses Linq-to-Entities so any database with an Entities provider works -- not just SQL Server. And it comes with the schema for that database built in. Just run setup.aspx and it should create the database for you in your local SQLExpress install.

这篇关于DotNetOpenAuth:Web表单,入门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆