jjzjj

ServiceModel

全部标签

c# - Web.Config,system.serviceModel 的外部文件

使用VS2010我的web.config中有以下内容(已删除详细信息)。我想使用与appSettings相同的属性configSource从另一个配置文件中获取这些元素的详细信息。我已尝试将configSource属性应用于system.serviceModel或每个子节点。但是,我收到无效的蓝色波浪线:The'configSource'attributeisnotallowed我引用了这个问题中的第二个答案(TomBrothers的回答),它证明了我想要什么。Canaweb.configreadfromanexternalxmlfile?额外这是该帖子的配置。具有无效的蓝色波浪线。在

c# - WCF - 无法解析 [WebGet] 符号 - 我做错了什么?

我正在开发一个RESTWCF项目,当我实现以下代码时,它会提示无法解析WebGet类?我错过了什么?我尝试导入System.ServiceModel.Web命名空间,但即使我引用了它也找不到它。当我在代码顶部的using语句中注册时,System.ServiceModel.Web中的“Web”没有注册。基本上,我需要什么来实现诸如WebGet、WebInvoke、UriTemplate等WCFREST概念?更新:经过一些反馈并进一步思考我所做的事情后,似乎DLL(System.ServiceModel和System.ServiceModel.Web)并没有通过当我去添加项目引用时的“添

c# - WCF - 无法解析 [WebGet] 符号 - 我做错了什么?

我正在开发一个RESTWCF项目,当我实现以下代码时,它会提示无法解析WebGet类?我错过了什么?我尝试导入System.ServiceModel.Web命名空间,但即使我引用了它也找不到它。当我在代码顶部的using语句中注册时,System.ServiceModel.Web中的“Web”没有注册。基本上,我需要什么来实现诸如WebGet、WebInvoke、UriTemplate等WCFREST概念?更新:经过一些反馈并进一步思考我所做的事情后,似乎DLL(System.ServiceModel和System.ServiceModel.Web)并没有通过当我去添加项目引用时的“添

c# - 缺少 System.ServiceModel

我在Win7(64位)上使用VS2010express,我正在尝试使用System.ServiceModel但我收到一个错误,指出没有ServiceModelSystem命名空间:Thetypeornamespacename'ServiceModel'doesnotexistinthenamespace'System'(areyoumissinganassemblyreference?)我查看了\Windows\Microsoft.NET\Framework\v4.0.30319并且有一些ServiceModel___.dll文件,但我不知道我是否缺少某些东西或它们是否已损坏。有什么建

c# - 缺少 System.ServiceModel

我在Win7(64位)上使用VS2010express,我正在尝试使用System.ServiceModel但我收到一个错误,指出没有ServiceModelSystem命名空间:Thetypeornamespacename'ServiceModel'doesnotexistinthenamespace'System'(areyoumissinganassemblyreference?)我查看了\Windows\Microsoft.NET\Framework\v4.0.30319并且有一些ServiceModel___.dll文件,但我不知道我是否缺少某些东西或它们是否已损坏。有什么建

c# - 使用 ConfigurationManager 加载 System.ServiceModel 配置部分

使用C#.NET3.5和WCF,我试图在客户端应用程序中写出一些WCF配置(客户端连接到的服务器的名称)。显而易见的方法是使用ConfigurationManager加载配置部分并写出我需要的数据。varserviceModelSection=ConfigurationManager.GetSection("system.serviceModel");似乎总是返回null。varserviceModelSection=ConfigurationManager.GetSection("appSettings");完美运行。配置部分出现在App.config中,但由于某种原因Configu

c# - 使用 ConfigurationManager 加载 System.ServiceModel 配置部分

使用C#.NET3.5和WCF,我试图在客户端应用程序中写出一些WCF配置(客户端连接到的服务器的名称)。显而易见的方法是使用ConfigurationManager加载配置部分并写出我需要的数据。varserviceModelSection=ConfigurationManager.GetSection("system.serviceModel");似乎总是返回null。varserviceModelSection=ConfigurationManager.GetSection("appSettings");完美运行。配置部分出现在App.config中,但由于某种原因Configu

c# - 错误 5 : Access Denied when starting windows service

当我尝试启动我在C#中创建的Windows服务时出现此错误:到目前为止我的代码:privateServiceHosthost=null;publicRightAccessHost(){InitializeComponent();}protectedoverridevoidOnStart(string[]args){host=newServiceHost(typeof(RightAccessWcf));host.Open();}protectedoverridevoidOnStop(){if(host!=null)host.Close();host=null;}更新#1我通过向帐户NET

c# - 错误 5 : Access Denied when starting windows service

当我尝试启动我在C#中创建的Windows服务时出现此错误:到目前为止我的代码:privateServiceHosthost=null;publicRightAccessHost(){InitializeComponent();}protectedoverridevoidOnStart(string[]args){host=newServiceHost(typeof(RightAccessWcf));host.Open();}protectedoverridevoidOnStop(){if(host!=null)host.Close();host=null;}更新#1我通过向帐户NET

windows - 通信对象 System.ServiceModel.Channels.ServiceChannel 不能用于通信,因为它处于 Faulted 状态

Thecommunicationobject,System.ServiceModel.Channels.ServiceChannel,cannotbeusedforcommunicationbecauseitisintheFaultedstate.当Windows应用程序尝试通过wsDualHttpBinding与作为Windows服务托管的WCF通信时,我收到此错误。WCF用于通过串行端口与设备通信。Windows应用程序过去经常通过WCF窗口服务发送命令。这是堆栈跟踪:stacktrace:atSystem.ServiceModel.Channels.CommunicationOb