工作流服务主机未发布元数据

发布于 2024-09-02 11:10:48 字数 587 浏览 13 评论 0原文

仍在对 IIS 外部托管的 WF 服务进行极端持久的攻击。我的 WF 服务发布元数据现在遇到问题。有人可以看一下我的代码并看看我缺少哪一步吗?我偶然发现的一些针对我的场景的教程使它看起来很简单,而且我知道确实如此。我只是错过了一些非常简单的事情。这是我当前的试用代码:

const string serviceUri = "http://localhost:9009/Subscribe";
WorkflowServiceHost host = new WorkflowServiceHost( new Subscribe(), new  Uri(serviceUri) );

host.AddDefaultEndpoints( );
host.Open();

Subscribe() 是一个在 xaml 文件中编码的活动,包含简单的接收和发送回复活动,用于测试我的托管工作流服务。它不是 xamlx(WF 服务)文件。看起来这应该足够简单,可以工作,但是当我启动应用程序并且服务启动时,导航到 URI 时我会在浏览器中收到此消息:

“此服务的元数据发布当前已禁用。”

添加默认端点是否应该提供足够的元数据和描述来满足服务初始化,然后进入其等待消息状态?

Still hacking away with extreme persistence at WF services hosted outside of IIS. I'm now having issues with my WF service publishing metadata. Can someone take a look at my code and see what step I'm missing? The few tutorials that I've stumbled across for my scenario make it look so easy, and I know it is. I'm just missing something ridiculously simple. Here's my current trial code:

const string serviceUri = "http://localhost:9009/Subscribe";
WorkflowServiceHost host = new WorkflowServiceHost( new Subscribe(), new  Uri(serviceUri) );

host.AddDefaultEndpoints( );
host.Open();

Subscribe() is an activity that is coded in an xaml file and contains simple receive and sendreply activities to test out my hosted workflow service. It is NOT a xamlx (WF service) file. Seems like this should be simple enough to work but when I start the application and the service fires I get this message in my browser when navigating to the URI:

"Metadata publishing for this service is currently disabled."

Shouldn't adding the default endpoints provide enough metadata and description to satisfy the service init and then go into its wait for message state?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心欲静而疯不止 2024-09-09 11:10:48

对于任何未来的新手,这也可能是由于 app.config 设置不正确造成的。
将以下内容添加到您的 app.config 中,然后在浏览器中打开您的服务位置:

  <system.serviceModel>
    <bindings />
    <client />
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceDebug includeExceptionDetailInFaults="True"
                        httpHelpPageEnabled="True"/>
          <serviceMetadata httpGetEnabled="True"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

For any future newbies, this also can be caused by not having your app.config setup correctly.
Add the below to your app.config and then open your service location in your browser:

  <system.serviceModel>
    <bindings />
    <client />
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceDebug includeExceptionDetailInFaults="True"
                        httpHelpPageEnabled="True"/>
          <serviceMetadata httpGetEnabled="True"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
说谎友 2024-09-09 11:10:48

看来调试实例进程挂在我的机器上。我只是使用任务管理器找到可执行文件并终止僵尸进程。

Well it appears that the debug instance process hung on my machine. I just used task manager to locate the executable and terminate the zombie process.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文