Where are tutorials for DotNetOpenAuth and how to solve compile error in its samples

[亡魂溺海] 提交于 2019-12-20 18:36:20

问题


I know stackoverflow uses OpenID authentication. I want to try and use this as well. I am using asp.net mvc 2.0 with C#.

I found this

http://www.dotnetopenauth.net/

and I am wondering if this is what was used for stackoverflow.

Also any tutorials would be nice as well.

Edit

I am trying to load up some sample projects but when I build it in VS2010 I get

Error   6   'System.Diagnostics.Contracts.ContractInvariantMethodAttribute' is inaccessible due to its protection level C:\Users\chobo2\Downloads\DotNetOpenAuth-3.4.6.10357\DotNetOpenAuth-3.4.6.10357\Samples\OpenIdOfflineProvider\TextBoxTextWriter.cs  73  4   OpenIdOfflineProvider
Error   7   The type or namespace name 'ContractInvariantMethod' could not be found (are you missing a using directive or an assembly reference?)   C:\Users\chobo2\Downloads\DotNetOpenAuth-3.4.6.10357\DotNetOpenAuth-3.4.6.10357\Samples\OpenIdOfflineProvider\TextBoxTextWriter.cs  73  4   OpenIdOfflineProvider

回答1:


Yes, it is the library SO uses. See this blog post from Jeff:

we have an excellent dialog with Andrew Arnott, the primary author of the open source DotNetOpenAuth library we use.

The download includes samples.




回答2:


I have just found this tutorial which is useful.

Edit: This one also looks worth a read.

And I also found this example useful.




回答3:


Far too many things to comment, as suggested by Alex Angas. Best to just install the dependency, it's not included by default with .NET.

Code Contracts: http://research.microsoft.com/en-us/projects/contracts/




回答4:


DotNetOpenAuth is a trustworthy choice.

To fix the build errors, comment out all references to Contract(...) in the code. They're only there to help the developers ensure code correctness and don't provide any functionality.



来源:https://stackoverflow.com/questions/4671367/where-are-tutorials-for-dotnetopenauth-and-how-to-solve-compile-error-in-its-sam

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!