积极答复者
WIN2003系统IIS6部署wcf问题,等待高手出现

问题
-
在Vista系统IIS系统下运行没有问题,但部署到WIN2003系统IIS6下后,访问.svc文件报如下错误,请问是什么原因:
错误信息开始=====>
错误类型:ArgumentNullException
错误信息:值不能为空。
参数名: key
错误堆栈:
在 System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
在 System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
在 System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
在 System.ServiceModel.Activation.MetabaseSettingsIis.GetTransportSettings(String virtualPath)
在 System.ServiceModel.Activation.MetabaseSettingsIis.GetAccessSslFlags(String virtualPath)
在 System.ServiceModel.Activation.MetabaseSettings.GetAllowSslOnly(String virtualPath)
在 System.ServiceModel.Activation.HttpHostedTransportConfiguration.GetBaseAddresses(String virtualPath)
在 System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetBaseAddresses(String virtualPath)
在 System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
在 System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
在 System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
这是部署WCF程序的IIS配置程序文件web.config:
<system.serviceModel>
<!-- SERVER -->
<services>
<!-- ErpAuthService -->
<service name="BLL.ErpOpenService.ErpAuthService" behaviorConfiguration="ErpAuthServiceBehaviorConfiguration">
<endpoint
address=""
binding="basicHttpBinding"
bindingConfiguration="ErpAuthServiceBinding"
contract="BLL.ErpOpenService.IErpAuthService"
name="ErpAuthServiceEndpoint"/>
</service></services>
<behaviors>
<serviceBehaviors>
<!-- ErpAuthService -->
<behavior name="ErpAuthServiceBehaviorConfiguration">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000"/>
</behavior></serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<!-- ErpAuthService -->
<binding name="ErpAuthServiceBinding" maxBufferSize="67108864"
maxReceivedMessageSize="67108864"
maxBufferPoolSize="67108864"
transferMode="Buffered"
closeTimeout="00:00:10"
openTimeout="00:00:10"
receiveTimeout="20:00:00"
sendTimeout="00:01:00">
</binding></basicHttpBinding>
</bindings>
</system.serviceModel>
演示代码:http://www.namipan.com/d/WcfService1.rar/62aeb0b585589f9a0cf3c3a12a43034af4cb934af9600000
直接运行没有问题,选择"发布网站"("允许更新此预编译站点"选择框的勾去掉),发部后的文件夹建虚拟目录(或应用程序),SVC文件就访问不了了
备注:目前问题确定如下,编译后直接拷贝编译后的文件部署到IIS6,SVC可以运行,显示正常;但选择"发布网站"("允许更新此预编译站点"选择框的勾去掉),发部后地文件夹部署后就出现以上描述的错误信息- 已编辑 滚地龙 2009年9月8日 2:43
答案
-
这个问题有补丁解决没有啊????
你gooogle一下英文资料,看看老外如何解决的。
这个问题我主要没环境测试,不是很熟悉。
一般老外都会遇到这样的问题,一个老外不是建议:
A better solution would be to use "~" instead of the virtual path. I've tested this and it works just fine. For the previous example, the .compile file would then have the following content:
<preserve resultType="5" virtualPath="/WCFTest/Services/Service.svc" hash="55fe3ce3" filehash="38d428ec94f6" flags="110001" customString="~/Services/Service.svc||ServiceImplementation.Service|System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b...
This can become a custom build step in TFS with a grep like utility that does the search & replace.
Frank Xu Lei--谦卑若愚,好学若饥
专注于.NET平台下分布式应用系统开发和企业应用系统集成
Focus on Distributed Applications Development and EAI based on .NET
欢迎访问老徐的中文技术博客:Welcome to My Chinese Technical Blog
欢迎访问微软WCF中文技术论坛:Welcome to Microsoft Chinese WCF Forum
欢迎访问微软WCF英文技术论坛:Welcome to Microsoft English WCF Forum- 已标记为答案 Allen Chen - MSFTModerator 2009年9月14日 9:38
全部回复
-
-
这个问题有补丁解决没有啊????
你gooogle一下英文资料,看看老外如何解决的。
这个问题我主要没环境测试,不是很熟悉。
一般老外都会遇到这样的问题,一个老外不是建议:
A better solution would be to use "~" instead of the virtual path. I've tested this and it works just fine. For the previous example, the .compile file would then have the following content:
<preserve resultType="5" virtualPath="/WCFTest/Services/Service.svc" hash="55fe3ce3" filehash="38d428ec94f6" flags="110001" customString="~/Services/Service.svc||ServiceImplementation.Service|System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b...
This can become a custom build step in TFS with a grep like utility that does the search & replace.
Frank Xu Lei--谦卑若愚,好学若饥
专注于.NET平台下分布式应用系统开发和企业应用系统集成
Focus on Distributed Applications Development and EAI based on .NET
欢迎访问老徐的中文技术博客:Welcome to My Chinese Technical Blog
欢迎访问微软WCF中文技术论坛:Welcome to Microsoft Chinese WCF Forum
欢迎访问微软WCF英文技术论坛:Welcome to Microsoft English WCF Forum- 已标记为答案 Allen Chen - MSFTModerator 2009年9月14日 9:38