2016-12-21 96 views
2

迷惑なUIでこのエラーが発生しました。私はこのエラーでほぼ3日間在庫があります。問題の原因を助けてください。SWAGGERエラー。サーバーで要求の処理中にエラーが発生しました

{ 
    "UserName": "Manila_user", 
    "JobID": 157, 
    "Site": "ATL", 
    "SiteID": 1, 
    "ClientName": "Manila Devs", 
    "ClientID": 14, 
    "ParentProductName": "Manila Parent Product", 
    "ProductID": 1519, 
    "JobStatus": "Received", 
    "JobStatusID": 1, 
    "UniqueID": 0, 
    "RecordAddedDate": "2016-12-12", 
    "ReceivedDate": "2016-12-12", 
    "ReleaseDate": "2016-12-12", 
    "RequiredMailDate": "2016-12-12", 
    "PrintedDate": "2016-12-12", 
    "MailedQuantity": 25, 
    "MailedDate": "2016-12-12", 
    "BillingQuantity": 0, 
    "InvoiceNumber": "11", 
    "InvoiceDate": "2016-12-12", 
    "RejectedQuantity": 0, 
    "RejectedReason": "test", 
    "ActiveRecord": 0, 
    "RecordLastChangedBy": "WCF", 
    "RecordLastChangedDate": "2016-12-12", 
    "SequenceNum": 0, 
    "StatusEventDate": "2016-12-12", 
    "StatusEventChangedBy": "WCF", 
    "Notes": "test", 
    "OnlineApproval": "2016-12-12", 
    "UserApproval": 0, 
    "FileID": 170, 
    "FileName": "test", 
    "ReceivedQuantity": 0, 
    "JobNumber": 0, 
    "GroupName": "Manila Group", 
    "Flex1": "string 1", 
    "Flex2": "string 2", 
    "Flex3": "string 3", 
    "TrackingID": 123, 
    "ImpressionCount": 0, 
    "GroupID": 5358 
} 
+0

考えてみてください。 – Athan

+0

デバッガで実行しましたか?例外ログを有効にしましたか? – SledgeHammer

+0

画像全体を見るためにトレースを設定してみてくださいhttps://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx –

答えて

0

私もSwaggerWCFでこのエラーを受け取った:私はここに私のサンプルJSONエントリの私の参照https://github.com/abelsilva/swaggerwcf

Swagger UI Error response

[OperationContract] 
    [WebInvoke(Method = "PUT", 
     UriTemplate = "UpdateJob/{UserName}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json)] 
    [SwaggerWcf.Attributes.SwaggerWcfPath("Update Job", "Update a job in Portal")] 
    PortalJob UpdateJob(
     [SwaggerWcfParameter(true, "This is the Username assigned to a company to allow service processing")] 
     String UserName, 
     [SwaggerWcfParameter(true, "This is the populated job object")] 
     PortalJob job); 

としてこれを使用しています。自分のアプリケーションでtracingを有効にして、問題がNewtonsoft.Jsonに依存しているかどうかを判断できました。ここに私が見つけたエラーがあった。

System.IO.FileLoadException:ファイルまたはアセンブリ 'Newtonsoft.Json、バージョン= 8.0.0.0、文化はニュートラル、PublicKeyToken = = 30ad4fe6b2a6aeed' またはその依存関係の1つをロードできませんでした。見つかったアセンブリのマニフェスト定義がアセンブリ参照と一致しません。 (HRESULTからの例外:0x80131040)

NuGetを通じてNewtonsoftを再インストールしたところ、問題が解決しました。

関連する問題