2013-07-26 132 views
2

ServiceStack的OpenID AuthProviders問題是的OpenID身份驗證提供者沒有的Ubuntu 12.04下工作nginx的/ 1.1.19,單聲道JIT編譯器版本3.1.1,FastCGI的,單server4.exe 2.10.0.0單聲道

的ServiceStack引用被通過的NuGet全部拔掉在3.9.55.0版本,其中包括連接到DotNetOpenAuth 4.3.0.0

該項目是基於ServiceStack模板CustomPath40和所有的項目都建ServiceStack.Authentication.OpenId在.NET 4下與Win7x64上的VS2012一起使用。

每個auth在IIS8/IIS8 Express下工作得都很好。我在AppHost中配置了authproviders,模擬了SocialBootstrapApi。 Twitter和Facebook授權在單聲道上運行得很好,一旦運行:

mozroots --import --ask-remove 

相信典型的mozilla證書。

OpenId提供商會抱怨缺少log4net DLL(再次,只在單聲道),但提供一個適當的log4net DLL會導致該錯誤。現在的OpenID提供(谷歌和雅虎)都拋出一個異常:

Method not found: 'System.Security.Cryptography.HashAlgorithm.Dispose'. 

[Auth: 07/26/2013 04:21:13]: 
[REQUEST: {provider:GoogleOpenId}] System.MissingMethodException: Method not found: 'System.Security.Cryptography.HashAlgorithm.Dispose'. at 
DotNetOpenAuth.OpenId.HmacShaAssociation/HmacSha.CreateHasher (byte[]) <0x00017> at 
DotNetOpenAuth.OpenId.HmacShaAssociation.CreateHasher() <0x0001b> at 
DotNetOpenAuth.OpenId.Association.Sign (byte[]) <0x00034> at 
DotNetOpenAuth.OpenId.ChannelElements.SigningBindingElement.GetSignature (DotNetOpenAuth.OpenId.ChannelElements.ITamperResistantOpenIdMessage,DotNetOpenAuth.OpenId.Association) <0x001f3> at 
DotNetOpenAuth.OpenId.ChannelElements.SigningBindingElement.ProcessIncomingMessage (DotNetOpenAuth.Messaging.IProtocolMessage) <0x00133> at 
DotNetOpenAuth.Messaging.Channel.ProcessIncomingMessage (DotNetOpenAuth.Messaging.IProtocolMessage) <0x001b1> at 
DotNetOpenAuth.OpenId.ChannelElements.OpenIdChannel.ProcessIncomingMessage (DotNetOpenAuth.Messaging.IProtocolMessage) <0x000f3> at 
DotNetOpenAuth.Messaging.Channel.ReadFromRequest (System.Web.HttpRequestBase) <0x00359> at 
DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.GetResponse (System.Web.HttpRequestBase) <0x00053> at 
DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.GetResponse() <0x0006f> at 
ServiceStack.Authentication.OpenId.OpenIdOAuthProvider.Authenticate (ServiceStack.ServiceInterface.IServiceBase,ServiceStack.ServiceInterface.Auth.IAuthSession,ServiceStack.ServiceInterface.Auth.Auth) <0x00693> at 
ServiceStack.ServiceInterface.Auth.AuthService.Authenticate (ServiceStack.ServiceInterface.Auth.Auth,string,ServiceStack.ServiceInterface.Auth.IAuthSession,ServiceStack.ServiceInterface.Auth.IAuthProvider) <0x0004f> at 
ServiceStack.ServiceInterface.Auth.AuthService.Post (ServiceStack.ServiceInterface.Auth.Auth) <0x00247> at 
ServiceStack.ServiceInterface.Auth.AuthService.Get (ServiceStack.ServiceInterface.Auth.Auth) <0x00013> at 
(wrapper dynamic-method) object.lambda_method (System.Runtime.CompilerServices.Closure,object,object) <0x0004f> at 
ServiceStack.ServiceHost.ServiceRunner`1<ServiceStack.ServiceInterface.Auth.Auth>.Execute (ServiceStack.ServiceHost.IRequestContext,object,ServiceStack.ServiceInterface.Auth.Auth) <0x001de> 

明顯的問題將是一個這裏詳述:https://bugzilla.xamarin.com/show_bug.cgi?id=3375,但被標記爲2.10.x解決在一年前,當我上週從標記源創建了這個3.1.1。

我該如何糾正這個異常,並讓OpenId Auth提供者在Mono上工作?

+0

看起來像斷了單裝,你是怎麼安裝單聲道3.x? – knocte

+0

@knocte下面是我寫的腳本:http://pastebin.com/7KjLeinc從一些博客文章中提取 – user01

+0

您並未將xsp安裝到腳本中的/ usr/local中,因此您將xsp與2個單聲道,這是變得矛盾的版本,請閱讀http://www.mono-project.com/Parallel_Mono_Environments – knocte

回答

0

您聲稱已經安裝了Mono 3.1.1,但未使用安裝此新版本Mono的腳本安裝xsp。

這意味着,當你從軟件包安裝xsp時,你將Mono 2.x作爲它的依賴。所以你認爲你已經從軟件包中卸載了mono,並且安裝了一個新的Mono,但你實際上同時擁有2個Mono版本。

從包中運行xsp時,運行位於/ usr的二進制文件,這意味着它使用的是舊單聲道(而不是您安裝在/ usr/local中的新文件)。

即使你正在運行mono-fastcgi-server4代替XSP服務器,這兩臺服務器的代碼庫是很常見:在XSP回購,你需要安裝旁邊單:http://github.com/xsp