2011-12-09 5 views
0

2010年、xamlxワークフローサービスプロジェクトを指すサービス参照を右クリックして更新すると、それを述べる生のHTML):xamlx-workflowサービスリファレンスを更新すると、XamlObjectWriterExceptionがスローされました: '不明なタイプを作成できません[...]'

XamlObjectWriterException: '[...]未知のタイプを作成できません'

[...]私のプロジェクトのメッセージ変数を指摘。

私のワークフローはWorkflowServiceHostクラスでホストされているxamlxです。

SendResponseメッセージが原因であるようです。メッセージタイプは[DataContract][DataMember]を使用し、コンテンツのUIで[パラメータ]が選択されています。

私のメッセージタイプで何がうんざりしているのか分かりません。多分私のwkfプロジェクトのビルドプロパティに何か...

何か助けが大歓迎です。ここで

htmlが戻って送信されます。


There was an error downloading 'http://localhost:8008/WfDerogationCreation.xamlx'. 
There was an error downloading 'http://localhost:8008/WfDerogationCreation.xamlx'. 
The request failed with the error message: 
-- 
<html> 
    <head> 
     <title>'Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({clr-namespace:CompanyName.WorkflowSecurity.Derogation.Messages;assembly=CompanyName.WorkflowSecurity}DerogRequest)'.' Line number '4' and line position '8'.</title> 
     <style> 
     body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
     p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} 
     b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} 
     H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } 
     H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } 
     pre {font-family:"Lucida Console";font-size: .9em} 
     .marker {font-weight: bold; color: black;text-decoration: none;} 
     .version {color: gray;} 
     .error {margin-bottom: 10px;} 
     .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } 
     </style> 
    </head> 
<body bgcolor="white"> 
      <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> 
      <h4> <i>'Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({clr-namespace:CompanyName.WorkflowSecurity.Derogation.Messages;assembly=CompanyName.WorkflowSecurity}DerogRequest)'.' Line number '4' and line position '8'.</i> </h4></span> 
      <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> 
      <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
      <br><br> 
      <b> Exception Details: </b>System.Xaml.XamlObjectWriterException: 'Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({clr-namespace:CompanyName.WorkflowSecurity.Derogation.Messages;assembly=CompanyName.WorkflowSecurity}DerogRequest)'.' Line number '4' and line position '8'.<br><br> 
      <b>Source Error:</b> <br><br> 
      <table width=100% bgcolor="#ffffcc"> 
       <tr> 
        <td> 
         <code> 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code> 
        </td> 
       </tr> 
      </table> 
      <br> 
      <b>Stack Trace:</b> <br><br> 
      <table width=100% bgcolor="#ffffcc"> 
       <tr> 
        <td> 
         <code><pre> 
[XamlObjectWriterException: 'Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({clr-namespace:CompanyName.WorkflowSecurity.Derogation.Messages;assembly=CompanyName.WorkflowSecurity}DerogRequest)'.' Line number '4' and line position '8'.] 
    System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType) +1131129 
    System.Xaml.XamlWriter.WriteNode(XamlReader reader) +158 
    System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter) +106 
    System.Xaml.XamlServices.Load(XamlReader xamlReader) +56 
    System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +302 
    System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1461 
    System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +44 
    System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +651 

[ServiceActivationException: The service '/WfDerogationCreation.xamlx' cannot be activated due to an exception during compilation. The exception message is: 'Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({clr-namespace:CompanyName.WorkflowSecurity.Derogation.Messages;assembly=CompanyName.WorkflowSecurity}DerogRequest)'.' Line number '4' and line position '8'..] 
    System.Runtime.AsyncResult.End(IAsyncResult result) +688590 
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190 
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +234 
    System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +379 
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 
</pre></code> 
        </td> 
       </tr> 
      </table> 
      <br> 
      <hr width=100% size=1 color=silver> 
      <b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237 
      </font> 
    </body> 
</html> 
<!-- 
[XamlObjectWriterException]: 'Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({clr-namespace:CompanyName.WorkflowSecurity.Derogation.Messages;assembly=CompanyName.WorkflowSecurity}DerogRequest)'.' Line number '4' and line position '8'. 
    at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType) 
    at System.Xaml.XamlWriter.WriteNode(XamlReader reader) 
    at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter) 
    at System.Xaml.XamlServices.Load(XamlReader xamlReader) 
    at System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) 
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) 
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath) 
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) 
[ServiceActivationException]: The service '/WfDerogationCreation.xamlx' cannot be activated due to an exception during compilation. The exception message is: 'Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({clr-namespace:CompanyName.WorkflowSecurity.Derogation.Messages;assembly=CompanyName.WorkflowSecurity}DerogRequest)'.' Line number '4' and line position '8'.. 
    at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) 
    at System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) 
    at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
-->## Heading ## 
--. 
Metadata contains a reference that cannot be resolved: 'http://localhost:8008/WfDerogationCreation.xamlx'. 
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error. 
If the service is defined in the current solution, try building the solution and adding the service reference again. 
+0

[Fusion log viewer](http://msdn.microsoft.com/en-us/library/e74a18c4(v = VS.100).aspx)を使用してこれをデバッグすることをお勧めします。 adminとして実行し、ログをオンにして、デバッグを試みる前に再起動します。 CLRがアセンブリを探している場所とそのバージョンを表示し、そこから見つからない理由を判断します(インストールされていても)。 – Will

答えて

1

私は最終的にはこのような問題解決:ReceiveResponse/SendReply活動のカップルで

を。

1 /削除SendReply。 2/ReceiveResponseアクティビティを右クリックしてSendReplyを再作成し、削除されたもののようなプロパティをリセットします。

Xamlxサービス参照が、その後...非常によくエラーメッセージが生のHTMLに非常に不適切書かれていたことがわかっ

をアップロードし、私の画面は、それのすべてを読みに足りませんでした。とにかく、ありがとうございました。

0

をこれはそれがCompanyName.WorkflowSecurity.Derogation.Messagesについて知っていないことを伝えるのXAMLスタックの方法です。あなたがする必要があるのは、なぜこのタイプについて知らないのかを理解することです。

"CompanyName.WorkflowSecurity} DerogRequest"が '}'に気づいたにもかかわらず、アセンブリ名が不思議に見えますか?それはタイプミスですか?

行番号「4」とライン位置でXAMLXファイルをチェックし「8」

+0

こんにちは。実際には、私のXamlの問題の行は、自分の型への参照であり、型の実装ではありません。 DerogRequestはメッセージタイプの名前で、角括弧内の部分は名前空間です。 しかし私は最終的に私の問題を解決する方法を見つけました。 –

関連する問題