2012-02-27 15 views
1

非常にシンプルなServiceStackサービスがパス/ api/Translate/....から実行されています。 TranslateResponseは私の他の健康なDTOさServiceStack:展開によりFileLoadExceptionが発生し、System.Runtime.Serializationをロードできません。

<TranslateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns=""> 
- <ResponseStatus> 
    <ErrorCode>FileLoadException</ErrorCode> 
    <Message>Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)</Message> 
    <StackTrace>at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit) at ServiceStack.WebHost.EndPoints.Utils.FilterAttributeCache.GetResponseFilterAttributes(Type responseDtoType) in C:\src\ServiceStack\src\ServiceStack\WebHost.EndPoints\Utils\FilterAttributeCache.cs:line 51 at ServiceStack.WebHost.Endpoints.EndpointHost.ApplyResponseFilters(IHttpRequest httpReq, IHttpResponse httpRes, Object responseDto) in C:\src\ServiceStack\src\ServiceStack\WebHost.EndPoints\EndpointHost.cs:line 205 at ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName) in C:\src\ServiceStack\src\ServiceStack\WebHost.EndPoints\RestHandler.cs:line 64</StackTrace> 
    </ResponseStatus> 
    </TranslateResponse> 

:私は、サービスを呼び出すと、実際の環境にプロジェクトを展開するとき、私は、しかしなどXML、JSON、

を表示することができます。 ResponseStatusは私のものではありません。私は.NETバージョンのターゲット設定をチェックして、 "Copy Local"にSystem.Runtime.Serialisationを設定し、手動でDLLを/ binフォルダに含めました。

しかし、それでも動作しません。どこが間違っていますか?

+0

は、あなたのライブ環境が中程度の信頼関係で動作していますか? – kmcc049

+0

IIS7、Full(内部)によると。 –

答えて

1

解決しました。

ポータブルクラスライブラリプロジェクトを使用して構築されたプロジェクトが含まれていました。そのことはあまりにも真実に見えました。削除しました(これは他の問題、主にMVVMの実装を解決します)とすべての作業。

関連する問題