我在Windows Server 2003计算机上的单个Windows服务中托管了两个WCF服务.如果Windows服务需要访问任一WCF服务(例如发生定时事件时),它将使用公开的五个命名管道端点之一(不同的服务协定).该服务还为两个服务中的每一个公开HTTP MetadataExchange端点,并为服务器外部的使用者公开net.tcp端点.
通常情况下效果很好,但每隔一段时间我就会得到一条看起来像这样的错误信息:
System.ServiceModel.EndpointNotFoundException:没有端点侦听net.pipe:// localhost/IPDailyProcessing可以接受该消息.这通常是由错误的地址或SOAP操作引起的.有关更多详细信息,请参阅InnerException(如果存在).---> System.IO.PipeException:在本地计算机上找不到管道端点'net.pipe:// localhost/IPDailyProcessing'.---内部异常堆栈跟踪结束---服务器堆栈跟踪:System.ServiceModel.Channels.PipeConnectionInitiator.GetPipeName(Uri uri)at System.ServiceModel.Channels.NamedPipeConnectionPoolRegistry.NamedPipeConnectionPool.GetPoolKey(EndpointAddress address,Uri via)at在System.ServiceModel.Channels.ServiceMhannel的System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)的System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan超时)处的System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan超时). System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel频道,TimeSpan超时)在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)的OnOpen(TimeSpan超时) System.ServiceModel.Channels.ServiceChannel上的.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout,CallOnceManager cascade).System.ServiceModel.Channels.ServiceChannel.Call(String)中System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime操作,Object [] ins,Object [] outs,TimeSpan timeout)上的EnsureOpened(TimeSpan超时) System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)中的System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)中的action,Boolean oneway,ProxyOperationRuntime操作,Object [] ins,Object [] outs)
它不会可靠地发生,这是令人发狂的,因为我不能在我想要的时候重复它.在我的Windows服务中,我也有一些定时事件和一些文件监听器,但这些都是相当罕见的事件.有没有人有任何想法,为什么我可能会遇到一个问题?任何帮助将不胜感激.
我们有一个WCF服务作为BL服务.该服务处于混合传输模式,具有超过10个不同的端点,由BasicHttpBinding绑定,具有不同的合同和所有这些的相同地址.该服务在IIS-7上的应用程序池上运行.
问题是,服务工作正常,但是在第一次调用之后,即使获得WSDL,w3wp.exe的内存使用量也直接达到300兆,服务内存使用量不断增加,接管所有物理内存服务器(98 - 100%).我们没有内存异常,但是这种情况会降低其他应用程序和服务的速度,因此我们需要每隔几天手动刷新一次应用程序池.我已经尝试使用内存分析工具,但没有发现导致问题的原因.
有人遇到过这个问题吗?如果是的话,你做了什么?
附加信息:
配置文件
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="20000" requestLengthDiskThreshold="20000" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="AnonymousBehavior">
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="SecureBinding"
closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00"
sendTimeout="00:10:00" allowCookies="true"
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536000"
maxBufferPoolSize="524288000" maxReceivedMessageSize="65536000"
transferMode="Buffered">
<readerQuotas maxDepth="20000000"
maxStringContentLength="8192000"
maxArrayLength="16384000"
maxBytesPerRead="4096000"
maxNameTableCharCount="16384000" />
<security mode="None">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="BL.Services.MyService"
behaviorConfiguration="DefaultServiceBehavior">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="SecureBinding" …Run Code Online (Sandbox Code Playgroud)另一个NHibernate JOIN问题.
我试图通过不同的两个键从一个表连接两个不同的属性.但我无法得到第二个JOIN属性.
简化示例 -
我的课 -
namespace Domain
{
public class Message
{
#region private Members
private string _id;
private string _senderID;
private string _recipientID;
private string _recipientName;
private string _senderName;
#endregion
#region Public Properties
public virtual string ID
{
get { return _id; }
set { _id = value; }
}
public virtual string ID
{
get { return _id; }
set { _id = value; }
}
public virtual string SenderID
{
get { return _senderID; } …Run Code Online (Sandbox Code Playgroud) 我们有一个具有以下架构的客户端应用程序:一个管理器进程管理几个工作进程(读取器和写入器)并定期向服务器查询版本更新。如果版本更新可用,管理器将其下载到客户端计算机,关闭工作线程,启动更新程序进程来处理更新并退出。更新程序在启动时接收管理器 PID 和更新文件位置;然后等待管理器退出,备份管理器和工人的所有文件,重新创建他们的目录并将新版本文件传播到新目录。
当按照所述进行此过程时,第一次调用Directory.Move(string, string)(用于备份管理器目录)会抛出IOException. 奇怪的是,如果我让管理器关闭而不启动更新程序,然后自己启动更新程序可执行文件,则不会抛出异常。
用于管理工作线程的管理器代码:
public void Run()
{
_config = GetConfiguration();
Process reader, writer;
//Start reader and writer with appropriate arguments
//Keep reader and writer alive
reader.Kill();
writer.Kill();
reader.WaitForExit();
writer.WaitForExit();
reader.Dispose();
writer.Dispose();
}
Run Code Online (Sandbox Code Playgroud)
用于查询数据库的管理器代码:
EndpointAddress endpoint;
BasicHttpBinding httpBinding = new BasicHttpBinding();
httpBinding.MaxReceivedMessageSize = 2000000000;
ChannelFactory<IService> chanFactory = new ChannelFactory<IService>(httpBinding);
IService service;
try
{
endpoint = new EndpointAddress(ConfigurationManager.AppSettings["Service URL"]);
service = chanFactory.CreateChannel(endpoint);
UpdateInstructions instructions = service.GetUpdateInstructions(_config.SiteID, Assembly.GetExecutingAssembly().GetName().Version.ToString(), _config.Version);
HandleUpdateInstructions(instructions); //Downloads files and starts the …Run Code Online (Sandbox Code Playgroud) 我正在为C#解决方案设置安装程序项目,并且遇到依赖性问题:
在我的解决方案中,我有4个独立的项目输出 - 一个Windows服务和三个可执行文件,他们之间共享一些引用.
我需要安装程序才能安装所有这四个程序,以使解决方案正常工作.
我在"目标机器上的文件系统"对话框的"应用程序文件夹"下为每个项目输出设置了一个安装文件夹,在其文件夹中成功添加了Windows服务的项目输出.但是当我继续尝试在其文件夹中添加可执行文件的项目输出时,已经进入windows服务文件夹的程序集不会被带入可执行文件夹,并且在安装之后,可执行文件将不会运行,因为它们缺少依赖项.
我可以手动将缺少的程序集添加到可执行文件的文件夹中,但似乎这不是应该如何完成的,而是我缺少的东西.
有任何想法吗?
.net ×5
c# ×4
wcf ×3
web-services ×2
iis ×1
installer ×1
ioexception ×1
named-pipes ×1
nhibernate ×1
process ×1