首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DevForce ServerConsole -没有终点监听

DevForce ServerConsole -没有终点监听
EN

Stack Overflow用户
提问于 2014-08-26 00:13:15
回答 1查看 175关注 0票数 0

我有一个使用免费Windows许可证的基本Windows应用程序。

在作为Web项目运行时,我能够成功地执行查询。

但是,当使用ServerConsole.exe托管时,我会得到以下异常:

没有侦听http://localhost:63191/EntityService.svc/winrt的端点可以接受来自此应用程序的调用。如果在Visual中运行,请确保为web项目中的所有CopyLocal=true程序集引用设置IdeaBlade,以确保将这些程序集复制到bin文件夹。还要检查global.asax是否包含注册DevForce VirtualPathProvider的代码,或者是否存在EntityService.svc和EntityServer.svc文件。 若要检查服务是否正在运行,请打开internet浏览器并导航到http://localhost:63191/EntityService.svc。如果服务页显示错误,这些错误将有助于诊断服务的问题。如果服务正在运行,那么还要确保客户端和服务器之间的端点绑定匹配,并且服务器的ClientApplicationType对于此客户端是“All”或正确的。有关更多信息,请查看服务器的调试日志文件。

解决方案中有三个项目,App1 (Windows )、DomainModel (NET4.5)和App1.Web ()。ServiceConsole.exe被复制到DomainModel的输出目录中。

ServerConsole正确地报告:

代码语言:javascript
复制
Trying programmatic configuration of EntityService using
ideablade.configuration  section EntityService listening on
http://localhost:63191/EntityService/winrt EntityService listening on
http://localhost:63191/EntityService/wp Press <Enter> to exit server.

导航到

代码语言:javascript
复制
`http://localhost:63191/EntityService.svc` shows `404 Not Found`.

`http://localhost:63191/EntityService` shows the standard Web Service info page.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-26 16:47:15

这是由于DevForce中的“异常性”所致。对于移动客户端,默认假设EntityService将由IIS托管,并自动附加WCF所需的.svc扩展。

要解决此问题,可以添加DevForce ServiceProxyEvents类的自定义实现,以去掉扩展并替换URI。

代码语言:javascript
复制
class ClientProxy : IdeaBlade.EntityModel.ServiceProxyEvents
{

    public override void OnEndpointCreated(System.ServiceModel.Description.ServiceEndpoint endpoint)
    {
        var olduri = endpoint.Address.Uri;
        var newuri = new Uri(olduri.AbsoluteUri.Replace(".svc", string.Empty));
        endpoint.Address = new System.ServiceModel.EndpointAddress(newuri);
        base.OnEndpointCreated(endpoint);
    }
}

将类放置在客户端程序集中,由DevForce“探测”。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25496153

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档