开发者

WCF service working in iis 5.1 but not working in iis 6

开发者 https://www.devze.com 2023-02-05 01:09 出处:网络
I developed a WCF service and silverlight client, when I host this service in windows xp having iis 5.1, it is perfectly working as expected.

I developed a WCF service and silverlight client, when I host this service in windows xp having iis 5.1, it is perfectly working as expected.

When i host in windows server 2003 R2 having iis 6, it is working for initial couple of minutes (approximately 20 mins) after that it stops working..

i am getting HTTP 500 when i access service.

The setting I have used are

Anonymous access and integrated authentication both are checked.

my service config is as follows

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="false"/>
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<bindings>
  <customBinding>
    <binding name="SilverlightApplication1.Web.GetData.customBinding0">
      <binaryMessageEncoding/>
      <httpTransport/>
    </binding>
  </customBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
<services>
  <service name="SilverlightApplication1.Web.GetData">
    <endpoint address="" binding="customBinding" bindingConfiguration="SilverlightApplication1.Web.GetData.customBinding0" contract="SilverlightApplication1.Web.GetData"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>
</services>

my silverlight client config is

<client>
        <endpoint address="----/InternalBorrow/GetData.svc"
            binding="customBinding" bindingConfiguration="CustomBinding_GetData"
            contract="ServiceReference1.GetData" name="CustomBinding_GetData" />
    </client>

can any body help me to trouble shoot my problem?

the exception i am getting is

 System.ServiceModel.Activation.HostedAspNetEnvironment.ValidateHttpSettings(String virtualPath, Boolean isMetadataListener, Boolean usingDefaultSpnList, AuthenticationSchemes& supportedSchemes, ExtendedProtectionPolicy& extendedProtectionPolicy, String& realm)at System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(String virtualPath, Boolean isMetadataListener)

at System.ServiceModel.Activation.HostedAspNetEnvironment.ApplyHostedContext(TransportChannelListener listener, BindingContext context)

at System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener[TChannel](BindingContext context)

at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()

at System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener[TChannel](BindingContext context)

at System.ServiceModel.Channels.BinaryMessageEncodingBindingElement.BuildChannelListener[TChannel](BindingContext context)

at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()

at System.ServiceModel.Channels.Binding.BuildChannelListener[TChannel](Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters)

at System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession)

at System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result)

at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)

at System.ServiceModel.ServiceHostBase.In开发者_StackOverflow中文版itializeRuntime()

at System.ServiceModel.ServiceHostBase.OnBeginOpen()

at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open()

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)

--- End of inner exception stack trace ---

at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)


I experienced a similar issue when we were running a .NET 4.0 web application in the same app pool as web service configured to use a lower version of .NET. Make sure you are not mixing ASP .NET versions in the same application pool on the server.

Are there any errors or warnings showing up in the web server's event viewer logs that would provide you with more information about the issue?

0

精彩评论

暂无评论...
验证码 换一张
取 消