Windows Communication Foundation ForumWindows Communication Foundation is a set of .NET technologies for building and running connected systems. It is a new breed of communications infrastructure built around the Web services architecture.© 2009 Microsoft Corporation. All rights reserved.Wed, 25 Nov 2009 08:01:59 Z47a66177-42e0-4b00-b472-86d8640fea62http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/866d57c8-bdaf-4de0-9bb0-dd27b4c0f16dhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/866d57c8-bdaf-4de0-9bb0-dd27b4c0f16dEdenZahttp://social.msdn.microsoft.com/Profile/en-US/?user=EdenZaMSMQ + WCF not working for some reason,Hi All<br/><br/>I Have a windows service on machine A , this service connects to a MSMQ that is located also on machine A, everything is perfect on machine A.<br/>But, when i've installed my window service on machine B and tried to connect to the MSMQ on machine A , i get faulted.<br/><br/>here is part of the window service configuration on machine B:<br/><br/>      &lt;service name=&quot;PaymentSystem.Business.DepositManagerAgent.Services.ManualHandlingService&quot;&gt;<br/>        &lt;endpoint name=&quot;ManualHandlingEP&quot;<br/>          address=&quot;net.msmq://machinaA_IP/private/DepositManualHandlingQueue&quot;<br/>          binding=&quot;netMsmqBinding&quot;<br/>          contract=&quot;PaymentSystem.Common.DepositManagerContracts.IManualHandlingService&quot;<br/>          /&gt;<br/>      &lt;/service&gt;<br/><br/>nothing i tried didnt work the service keep getting into the faulted event.<br/><br/>Thanks for any help.Tue, 24 Nov 2009 16:15:50 Z2009-11-25T08:01:59Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8504732b-08ff-4c44-bf48-a29a9e9ae0b0http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8504732b-08ff-4c44-bf48-a29a9e9ae0b0Dr.Fixhttp://social.msdn.microsoft.com/Profile/en-US/?user=Dr.FixWCF Service out of IIS: 405 Method Not Allowed ExceptionHi,<br/> we implemented a WCF Service running in windows service context (not IIS!).<br/> <br/> Calling the service from browser and retrieving wsdl work fine, but connecting from a client and recalling a method we get a:<br/> <strong>405 Method Not Allowed Exception</strong> <br/> <br/> Windows Service Configuration:<br/> <pre lang=x-xml> &lt;system.serviceModel&gt;<br/> &lt;behaviors&gt;<br/> &lt;serviceBehaviors&gt;<br/> &lt;behavior name=&quot;TwoTi.Projects.Oxygen.Service.Client.Services.RemoteSyncServiceBehavior&quot;&gt;<br/> &lt;serviceMetadata httpGetEnabled=&quot;true&quot; /&gt;<br/> &lt;serviceDebug includeExceptionDetailInFaults=&quot;true&quot; /&gt;<br/> &lt;serviceCredentials&gt;<br/> &lt;secureConversationAuthentication/&gt;<br/> <br/> <br/> &lt;/serviceCredentials&gt;<br/> <br/> &lt;/behavior&gt;<br/> &lt;/serviceBehaviors&gt;<br/> &lt;/behaviors&gt;<br/> &lt;bindings&gt;<br/> &lt;basicHttpBinding&gt;<br/> &lt;binding name=&quot;basicHttpbinding&quot; messageEncoding=&quot;Text&quot; maxBufferSize=&quot;999999999&quot;<br/> maxReceivedMessageSize=&quot;999999999&quot; maxBufferPoolSize=&quot;999999999&quot;<br/> closeTimeout=&quot;01:00:00&quot; openTimeout=&quot;01:00:00&quot; receiveTimeout=&quot;01:00:00&quot;<br/> sendTimeout=&quot;01:00:00&quot; transferMode=&quot;Streamed&quot; &gt;<br/> &lt;security mode=&quot;None&quot;&gt;<br/> &lt;transport proxyCredentialType=&quot;None&quot; clientCredentialType=&quot;None&quot; /&gt;<br/> &lt;/security&gt;<br/> &lt;/binding&gt;<br/> &lt;/basicHttpBinding&gt;<br/> &lt;/bindings&gt;<br/> &lt;services&gt;<br/> &lt;service behaviorConfiguration=&quot;TwoTi.Projects.Oxygen.Service.Client.Services.RemoteSyncServiceBehavior&quot; name=&quot;TwoTi.Projects.Oxygen.Service.Client.Services.RemoteSyncService&quot;&gt;<br/> &lt;endpoint address=&quot;&quot; binding=&quot;basicHttpBinding&quot; contract=&quot;TwoTi.Projects.Oxygen.Service.Client.Services.IRemoteSyncService&quot;&gt;<br/> &lt;identity&gt;<br/> &lt;dns value=&quot;192.168.0.47&quot; /&gt;<br/> &lt;/identity&gt;<br/> &lt;/endpoint&gt;<br/> &lt;endpoint address=&quot;mex&quot; binding=&quot;mexHttpBinding&quot; contract=&quot;IMetadataExchange&quot; /&gt;<br/> &lt;host&gt;<br/> &lt;baseAddresses&gt;<br/> &lt;add baseAddress=&quot;http://192.168.0.47:8888/RemoteSyncService/&quot; /&gt;<br/> &lt;/baseAddresses&gt;<br/> &lt;/host&gt;<br/> &lt;/service&gt;<br/> &lt;/services&gt;<br/> &lt;/system.serviceModel&gt;</pre> <br/> Client configuration:<br/> <pre lang=x-xml> &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name=&quot;BasicHttpBinding_IRemoteSyncService&quot; closeTimeout=&quot;00:01:00&quot; openTimeout=&quot;00:01:00&quot; receiveTimeout=&quot;00:10:00&quot; sendTimeout=&quot;00:01:00&quot; allowCookies=&quot;false&quot; bypassProxyOnLocal=&quot;false&quot; hostNameComparisonMode=&quot;StrongWildcard&quot; maxBufferSize=&quot;65536&quot; maxBufferPoolSize=&quot;524288&quot; maxReceivedMessageSize=&quot;65536&quot; messageEncoding=&quot;Text&quot; textEncoding=&quot;utf-8&quot; transferMode=&quot;Buffered&quot; useDefaultWebProxy=&quot;true&quot;&gt; &lt;readerQuotas maxDepth=&quot;32&quot; maxStringContentLength=&quot;8192&quot; maxArrayLength=&quot;16384&quot; maxBytesPerRead=&quot;4096&quot; maxNameTableCharCount=&quot;16384&quot; /&gt; &lt;security mode=&quot;None&quot;&gt; &lt;transport clientCredentialType=&quot;None&quot; proxyCredentialType=&quot;None&quot; realm=&quot;&quot; /&gt; &lt;message clientCredentialType=&quot;UserName&quot; algorithmSuite=&quot;Default&quot; /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address=&quot;http://192.168.0.47:8888/RemoteSyncService/&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IRemoteSyncService&quot; contract=&quot;RemoteSyncServiceReference.IRemoteSyncService&quot; name=&quot;RemoteSyncService&quot; /&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; </pre> <br/> Client and server work on different machine in the same subnet.<br/> <br/> any idea?<br/> Thanx a lot<br/> <br/>Fri, 20 Nov 2009 15:32:16 Z2009-11-25T07:38:31Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/14af5045-05b0-4d97-9bb0-88178dae044fhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/14af5045-05b0-4d97-9bb0-88178dae044fVanshVijaySagarhttp://social.msdn.microsoft.com/Profile/en-US/?user=VanshVijaySagarAn existing connection was forcibly closed by the remote host <p>Hi All,<br/> I have create a WCF project. I have use a class ProductInfo(define as Data contract). It contain a a property productData which get or set Dataset.<br/>I also craete a Operation Contarct GetProductProperties which generic list , which is getting the clsProductInfo as Parameter. I have also some more properties in this class which has string type.<br/>I m this WCF servcie in my application project (web).When I m using the string type of property it is returning properly. When I m trying to get the data from Dataset type property it raise an exception.<br/><br/><span></span><span style="font-family:Arial, Helvetica, Geneva, SunSans-Regular, sans-serif"><strong>Description: </strong>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br/><br/><strong>Exception Details: </strong>System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host<br/><br/><strong>Source Error:</strong> <br/><br/> <table border=0 width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> <pre>Line 256: Line 257: public System.Collections.Generic.List&lt;testService.ProductInfo&gt; GetProductsProperties(string CatalogName, string ProductName) { <span style="color:red">Line 258: return base.Channel.GetProductsProperties(CatalogName, ProductName); </span>Line 259: } Line 260: </pre> </td> </tr> </tbody> </table> <br/><strong>Source File: </strong>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\testweb\e90ab0af\649dafac\App_WebReferences.z0-orccm.0.cs<strong>    Line: </strong>258 <br/><br/><strong>Stack Trace:</strong> <br/><br/> <table border=0 width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> <pre>[SocketException (0x2746): An existing connection was forcibly closed by the remote host] System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +73 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +131 [IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.] System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +294 System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) +26 System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) +297 [WebException: The underlying connection was closed: An unexpected error occurred on a receive.] System.Net.HttpWebRequest.GetResponse() +5314029 System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +54 [CommunicationException: An error occurred while receiving the HTTP response to http://commerce/WcfTest/Service1.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.] System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +7596735 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type) +275 testService.IService1.GetProductsProperties(String CatalogName, String ProductName) +0 testService.Service1Client.GetProductsProperties(String CatalogName, String ProductName) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\testweb\e90ab0af\649dafac\App_WebReferences.z0-orccm.0.cs:258 productdetail.Page_Load(Object sender, EventArgs e) in d:\Testweb\productdetail.aspx.cs:44 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 </pre> </td> </tr> </tbody> </table> </span>  </p> <h2><em>An existing connection was forcibly closed by the remote host</em></h2> <p> </p><hr class="sig">Vijay SagarFri, 20 Nov 2009 05:39:32 Z2009-11-25T07:18:32Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8ea74f50-cf34-4d15-b0ed-37d49ce662ddhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8ea74f50-cf34-4d15-b0ed-37d49ce662ddstoeenhttp://social.msdn.microsoft.com/Profile/en-US/?user=stoeenDistributed transactions in WCF and 2-phase commit using NHibernate and Unit Of WorkI have a problem with my distributed transaction implementation. I am trying to implement transactional services which can take part in a larger distributed transaction using the &quot;standard&quot; transactionflow approach in WCF with TransactionScope and voting for completion.  <div><br/></div> <div>My services are implementing a Unit Of Work pattern using NHibernate, and I have to call something like MyService.MyUnitOfWork.Commit() on the serverside when the client does &quot;Commit&quot; on the distributed transaction using TransactionScope.Complete(). </div> <div><br/></div> <div>My UnitOfWork implementation is not automatically enlisted in the MSDTC, so I am having problems figuring out how to solve this. I have no idea when the client calls commit/rollback on my distributed transaction.</div> <div><br/></div> <div>I am thinking of a way to hook on to the second phase of the 2PC protocol to know when to commit or rollback.</div> <div><br/></div> <div>I have read lots of articles on this, but I have not find any appropriate solution.</div> <div><br/></div> <div>Any help would be deeply appriciated.</div>Wed, 18 Nov 2009 14:41:08 Z2009-11-25T07:16:50Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/2958ea8c-6759-4549-983f-c4c2d1f93279http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/2958ea8c-6759-4549-983f-c4c2d1f93279Craig Campbellhttp://social.msdn.microsoft.com/Profile/en-US/?user=Craig%20CampbellWCF 403.1 Execute access is denied, after successful post...I have a WCF service that accepts data, however, after the initial post I receive a 403.1 error.  If I add a user to the application's directory, the next post will work successfully, but any subsequent posts fail.  Restarting IIS will cause the same behavior (initial post after restart succeeds, subsequent post fails).  I know there is something I am missing, but can't seem to put my finger on it.  Any help would be most appreciated.<br/><br/>IIS 6.0<br/>Separate AppPool (Identity: Network Service)<br/>Application directory is located under Inetpub<br/>Network Service, and ASPNET both have write access<br/><br/>Thanks,<br/>Craig<hr class="sig">Craig CampbellWed, 25 Nov 2009 07:11:19 Z2009-11-25T07:11:19Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/59c3c34a-4bac-4384-987c-7e1fc1d28e8bhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/59c3c34a-4bac-4384-987c-7e1fc1d28e8bYst Yanghttp://social.msdn.microsoft.com/Profile/en-US/?user=Yst%20YangHow to Serialize System.Workflow.Component.DependencyObject in WCFHi folks,<br/> <br/>         I met a problem on serializing dependencyobject in wcf, please see description below:<br/> <br/> I have a dependencyobject based class called Parameter, just like <br/> <br/> <pre lang="x-c#">[DataContract] public class Parameter:DependencyObject //A Class { [DataMember] public string Name { get { return (string)GetValue(NameProperty); } set { SetValue(NameProperty, value); } } <br/> .......//Register static Dependency Property<br/> }</pre> But, it throw exceptions when I try to establish the service, It seems Workflow DependencyObject doesn't support WCF serialization, Is there any way to solved it?<br/> <br/> ThanksThu, 12 Nov 2009 15:38:28 Z2009-11-25T07:07:03Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/1d229631-e9c9-4271-ad22-5d7d87cbfe2ehttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/1d229631-e9c9-4271-ad22-5d7d87cbfe2eJacob Russellhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jacob%20RussellSecurity settings for this service require 'Basic' Authentication IIS7 Local DebuggingI'm attempting to use basic authentication with IIS7 using local debugging and custom validation, but I can't get it to work. I'm currently stuck at this error:<br/> <br/> <h2><em><em>Security settings for this service require 'Basic' Authentication but it is not enabled for the IIS application that hosts this service.</em> </em></h2> I've looked up the issue and haven't found a solution yet. My local IIS has basic authentication enabled (no other).<br/> <br/> This is my current web.config:<br/> <br/> <pre lang=x-xml>&lt;?xml version=&quot;1.0&quot;?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;sectionGroup name=&quot;system.web.extensions&quot; type=&quot;System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;&gt; &lt;sectionGroup name=&quot;scripting&quot; type=&quot;System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;&gt; &lt;section name=&quot;scriptResourceHandler&quot; type=&quot;System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt; &lt;sectionGroup name=&quot;webServices&quot; type=&quot;System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;&gt; &lt;section name=&quot;jsonSerialization&quot; type=&quot;System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;Everywhere&quot;/&gt; &lt;section name=&quot;profileService&quot; type=&quot;System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt; &lt;section name=&quot;authenticationService&quot; type=&quot;System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt; &lt;section name=&quot;roleService&quot; type=&quot;System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt; &lt;/sectionGroup&gt; &lt;/sectionGroup&gt; &lt;/sectionGroup&gt; &lt;/configSections&gt; &lt;appSettings/&gt; &lt;connectionStrings&gt; &lt;add name=&quot;CT&quot; connectionString=&quot;&quot; /&gt; &lt;/connectionStrings&gt; &lt;system.web&gt; &lt;customErrors mode=&quot;Off&quot; /&gt; &lt;compilation debug=&quot;true&quot;&gt; &lt;assemblies&gt; &lt;add assembly=&quot;System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&quot;/&gt; &lt;add assembly=&quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;/assemblies&gt; &lt;/compilation&gt; &lt;authentication mode=&quot;None&quot;/&gt; &lt;pages&gt; &lt;controls&gt; &lt;add tagPrefix=&quot;asp&quot; namespace=&quot;System.Web.UI&quot; assembly=&quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;/controls&gt; &lt;/pages&gt; &lt;httpHandlers&gt; &lt;remove verb=&quot;*&quot; path=&quot;*.asmx&quot;/&gt; &lt;add verb=&quot;*&quot; path=&quot;*.asmx&quot; validate=&quot;false&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;add verb=&quot;*&quot; path=&quot;*_AppService.axd&quot; validate=&quot;false&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;add verb=&quot;GET,HEAD&quot; path=&quot;ScriptResource.axd&quot; type=&quot;System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; validate=&quot;false&quot;/&gt; &lt;/httpHandlers&gt; &lt;httpModules&gt; &lt;add name=&quot;ScriptModule&quot; type=&quot;System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;/httpModules&gt; &lt;/system.web&gt; &lt;system.codedom&gt; &lt;compilers&gt; &lt;compiler language=&quot;c#;cs;csharp&quot; extension=&quot;.cs&quot; warningLevel=&quot;4&quot; type=&quot;Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot;&gt; &lt;providerOption name=&quot;CompilerVersion&quot; value=&quot;v3.5&quot;/&gt; &lt;providerOption name=&quot;WarnAsError&quot; value=&quot;false&quot;/&gt; &lt;/compiler&gt; &lt;/compilers&gt; &lt;/system.codedom&gt; &lt;system.webServer&gt; &lt;validation validateIntegratedModeConfiguration=&quot;false&quot;/&gt; &lt;modules&gt; &lt;add name=&quot;ScriptModule&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;/modules&gt; &lt;handlers&gt; &lt;remove name=&quot;WebServiceHandlerFactory-Integrated&quot;/&gt; &lt;add name=&quot;ScriptHandlerFactory&quot; verb=&quot;*&quot; path=&quot;*.asmx&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;add name=&quot;ScriptHandlerFactoryAppServices&quot; verb=&quot;*&quot; path=&quot;*_AppService.axd&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;add name=&quot;ScriptResource&quot; preCondition=&quot;integratedMode&quot; verb=&quot;GET,HEAD&quot; path=&quot;ScriptResource.axd&quot; type=&quot;System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt; &lt;/handlers&gt; &lt;/system.webServer&gt; &lt;system.serviceModel&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled=&quot;true&quot; /&gt; &lt;services&gt; &lt;service behaviorConfiguration=&quot;CTWCF.WCFServiceBehavior&quot; name=&quot;CTWCF.WCFService&quot;&gt; &lt;endpoint address=&quot;&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;CustomAuthentication&quot; contract=&quot;CTWCF.IWCFService&quot; /&gt; &lt;/service&gt; &lt;/services&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name=&quot;CustomAuthentication&quot;&gt; &lt;security mode=&quot;TransportCredentialOnly&quot;&gt; &lt;transport clientCredentialType=&quot;Basic&quot; /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;client /&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=&quot;CTWCF.WCFServiceBehavior&quot;&gt; &lt;serviceCredentials&gt; &lt;userNameAuthentication userNamePasswordValidationMode=&quot;Custom&quot; customUserNamePasswordValidatorType=&quot;CTWCF.MyCustomValidator, CTWCF&quot;/&gt; &lt;/serviceCredentials&gt; &lt;serviceMetadata httpGetEnabled=&quot;true&quot; /&gt; &lt;serviceDebug includeExceptionDetailInFaults=&quot;false&quot; /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </pre>Wed, 25 Nov 2009 06:52:09 Z2009-11-25T06:52:11Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4b65f667-e113-4a72-b987-c93abdbc37adhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4b65f667-e113-4a72-b987-c93abdbc37adAndrie Schoombeehttp://social.msdn.microsoft.com/Profile/en-US/?user=Andrie%20SchoombeeHow to use Windows Authentication from WCF to SQL Server<p>Dear WCF experts,<br/><br/>I have a WCF service hosted in IIS. My problem is simple: I want to use Integrated Authentication to connect to a SQL Server instance on the same machine. But the identity of the WCF service host process is IIS APPPOOL\DefaultAppPool, which I cannot add as a login in SQL Server.<br/><br/>What is the best way to connect to SQL Server? I don't want to switch to mixed mode. Is it a good idea to change the identity of the app pool?<br/><br/>Thank you!</p>Tue, 24 Nov 2009 13:27:44 Z2009-11-25T06:35:48Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/dc618de1-9e56-487a-9e0b-7789fef60ee7http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/dc618de1-9e56-487a-9e0b-7789fef60ee7TeeOhDeeDeehttp://social.msdn.microsoft.com/Profile/en-US/?user=TeeOhDeeDeebasicHttpBinding Service Calling a netMsmqBinding Service - The token provider cannot get tokens for targetI have 2 WCF services.  The first service needs to call the second service.  <br/> <br/> Service1 is hosted in IIS and is set up for basicHttpBinding, while Service2 is hosted in a Windows Service and is set up for netMsmqBinding.  Both services are set up with Windows Authentication.<br/> <br/> A successful client application call is made to Service1 and then Service1 attempts to call Service2 with the exception &quot;The token provider cannot get tokens for target 'net.msmq://localhost/private/&lt;nameOfMyQueueHere&gt;'.&quot;<br/> <br/> Both services can be successfully invoked directly from a client application call and the call to Service2 places a message in the queue, but if Service1 calls Service2 the above exception occurs.  <br/> <br/> The queue has been set up with group &quot;Everyone&quot; having full control.  Everything is running on the same Windows XP SP2 machine with IIS v5.1<br/> <br/> <span style="text-decoration:underline">Service1 Details</span> <br/> &lt;service behaviorConfiguration=&quot;MyBehavior&quot; name=&quot;AddressBookSvc&quot;&gt;<br/>     &lt;endpoint<br/>         address=&quot;basicHttp&quot;<br/>         binding=&quot;basicHttpBinding&quot;<br/>         bindingConfiguration=&quot;AddressBookSvc_basicHttpBinding&quot;<br/>         name=&quot;AddressBookSvc_basicHttp&quot;<br/>         contract=&quot;IAddressBookSvc&quot;&gt;<br/>         &lt;identity&gt;<br/>             &lt;dns value=&quot;localhost&quot; /&gt;<br/>         &lt;/identity&gt;<br/>     &lt;/endpoint&gt;<br/> &lt;/service&gt;<br/> <br/> &lt;client&gt;<br/>     &lt;endpoint address=&quot;http://localhost/Enterprise/Services/AddressBookSvc.svc/basicHttp&quot;<br/>         binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;AddressBookSvc_basicHttpBinding&quot;<br/>         contract=&quot;PROXIES.AddressBookService&quot;<br/>         name=&quot;AddressBookSvc_basicHttp&quot; /&gt;<br/> &lt;/client&gt;<br/> <br/> &lt;basicHttpBinding&gt;<br/>     &lt;binding name=&quot;AddressBookSvc_basicHttpBinding&quot;&gt;<br/>         &lt;security mode=&quot;TransportCredentialOnly&quot;&gt;<br/>             &lt;transport clientCredentialType=&quot;Windows&quot; /&gt;<br/>         &lt;/security&gt;<br/>     &lt;/binding&gt;<br/> &lt;/basicHttpBinding&gt;<br/> <br/> <span style="text-decoration:underline">Service2 Details</span> <br/> &lt;service name=&quot;AddressBookQueuedSvc&quot;  behaviorConfiguration=&quot;MyBehavior&quot;&gt;<br/>     &lt;endpoint<br/>         address=&quot;net.msmq://localhost/private/&lt;nameOfMyQueueHere&gt;&quot;<br/>         binding=&quot;netMsmqBinding&quot;<br/>         bindingConfiguration=&quot;AddressBookQueueSvcBinding&quot;<br/>         contract=&quot;IAddressBookQueuedSvc&quot; /&gt;<br/>     &lt;host&gt;<br/>         &lt;baseAddresses&gt;<br/>             &lt;add baseAddress=&quot;http://localhost:8000/AddressBookQueuedSvc&quot;/&gt;<br/>         &lt;/baseAddresses&gt;<br/>     &lt;/host&gt;<br/> &lt;/service&gt;<br/> <br/> &lt;client&gt;<br/>     &lt;endpoint address=&quot;net.msmq://localhost/private/&lt;nameOfMyQueueHere&gt;&quot;<br/>         binding=&quot;netMsmqBinding&quot; bindingConfiguration=&quot;AddressBookQueueSvcBinding&quot;<br/>         contract=&quot;PROXIES.AddressBookQueuedService&quot; name=&quot;AddressBookQueuedSvc&quot;&gt;<br/>         &lt;identity&gt;<br/>             &lt;servicePrincipalName value=&quot;host/&lt;myMachineNameHere&gt;&quot; /&gt;<br/>         &lt;/identity&gt;<br/>     &lt;/endpoint&gt;<br/> &lt;/client&gt;<br/> <br/> &lt;netMsmqBinding&gt;<br/>     &lt;binding name=&quot;AddressBookQueueSvcBinding&quot; useActiveDirectory=&quot;false&quot; maxReceivedMessageSize=&quot;3000001&quot;&gt;<br/>         &lt;readerQuotas maxArrayLength=&quot;200000&quot;/&gt;<br/>         &lt;security mode=&quot;Message&quot;&gt;<br/>             &lt;message clientCredentialType=&quot;Windows&quot;/&gt;<br/>         &lt;/security&gt;<br/>     &lt;/binding&gt;<br/> &lt;/netMsmqBinding&gt;<br/> <br/> <span style="text-decoration:underline">Behavior</span> <br/> &lt;serviceBehaviors&gt;<br/>     &lt;behavior name=&quot;MyBehavior&quot;&gt;<br/>         &lt;serviceMetadata httpGetEnabled=&quot;true&quot; httpsGetEnabled=&quot;false&quot;/&gt;<br/>         &lt;serviceCredentials&gt;<br/>             &lt;userNameAuthentication userNamePasswordValidationMode=&quot;Windows&quot;/&gt;<br/>         &lt;/serviceCredentials&gt;<br/>         &lt;serviceDebug includeExceptionDetailInFaults=&quot;true&quot;/&gt;<br/>     &lt;/behavior&gt;<br/> &lt;/serviceBehaviors&gt;<br/> <br/> <br/> <span style="text-decoration:underline">Client VB code calling Service1</span> <br/> Using wcfProxy As New Proxies.AddressBookServiceClient(&quot;AddressBookSvc_basicHttpBinding&quot;)<br/>     wcfProxy.UpdateAddressQueued(tClientAddressInput)<br/> End Using<br/> (Above call works from an ASP.NET client)<br/> <br/> <br/> <span style="text-decoration:underline">Service1 (called from above client) VB code calling Service2</span> <br/> Dim wcfProxy As Proxies.AddressBookQueuedServiceClient(&quot;AddressBookQueuedSvc&quot;)<br/> wcfProxy = New Proxies.AddressBookQueuedServiceClient<br/> wcfProxy.UpdateAddress(tServiceClientAddressInput)<br/> (This call works if called directly from an ASP.NET client and message is placed in queue, but fails within Service1 call)<br/> <br/> Is there something more I need to do in Service1 to ensure Service2 can be called?<br/> <br/> Any help would be greatly appreciated,<br/> ToddFri, 20 Nov 2009 19:06:27 Z2009-11-25T06:24:09Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/279a6c8d-c1b3-4587-959d-a7c5ff0ea73fhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/279a6c8d-c1b3-4587-959d-a7c5ff0ea73fBriainpickerhttp://social.msdn.microsoft.com/Profile/en-US/?user=BriainpickerNetTcpPortSharing how would you know who put it in my system? It does corrupt my configurations, firewall stops working. With Windows Vista I'm getting "This will come out when there's an error in your page. And those can be any page you open in my laptopLocation can't be detected in your harddrive or in the Network. Just noticed this in my Windows Task Manager. Please alert me for a solution how to get this thing out of here. I really think my wife got to do with this...Thu, 19 Nov 2009 16:30:26 Z2009-11-25T05:57:50Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/e68c13a3-8303-42ae-ae48-3cd42e6e93fbhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/e68c13a3-8303-42ae-ae48-3cd42e6e93fbpramodhhttp://social.msdn.microsoft.com/Profile/en-US/?user=pramodhWCF Performance issue<p>We are conducting the performance testing of WCF Services . The following throttling configuration has been set <br/>InstanceContext.PerCall and ConCurrencyMode.Multiple</p> <p>and throttling behaviour is set as follows</p> <p>MaxConcurrentCalls = 100<br/>maxConcurrentInstances=&quot;100&quot; <br/>maxConcurrentSessions=&quot;100</p> <p>It has been observed that , as the number of users increases ,after some point time ,throughput starts saturating.Also Response time start increasing .</p> <p>We have enabled the WCF Performance counters and the following parameters start increating after some point of time</p> <p>Calls Outstanding<br/>Instances<br/>Number of Instances</p> <p><br/>Can anybody help on this ?<br/><br/>thanks</p><hr class="sig">cFri, 20 Nov 2009 15:06:31 Z2009-11-25T05:55:12Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/3568e17e-9418-415b-812f-de17aa238312http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/3568e17e-9418-415b-812f-de17aa238312DotNet_charmhttp://social.msdn.microsoft.com/Profile/en-US/?user=DotNet_charm.Net 3.5 WCF WSFedrationBinding with .Net 2.0 <p>I have developed the WCF services in .Net 3.5 ,  One WCF  services authenticate user  using WSFedrationBiding &amp; STS, which eventually issue the token after sucessfull  matching user &amp; pwd .  Now the problem start facing, that authentication services now needs to communicate with .Net 2.0 client as well , And .net 2.0 Does't have such kind of  mechanism. <span style="font-size:small;font-family:Times New Roman"> </span><br/><br/>   Looking for solution in WCF which can  also work with .Net 2.0 . I can't use basicHttpBiddig because does't have any security mode. <br/><br/>   I can't  replace  .Net 3.0 where .net 2.0 is installed. Without changing the client environment we have to acheive.... <br/>   <br/>Quick help needed <br/><br/><br/><br/></p>Fri, 20 Nov 2009 08:50:27 Z2009-11-25T05:37:32Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/53e6af75-09a3-40d1-8757-69b87e38dea7http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/53e6af75-09a3-40d1-8757-69b87e38dea7lifegamehttp://social.msdn.microsoft.com/Profile/en-US/?user=lifegameHow to enable the ServiceHost to generate the web page for the web service?If I use the following traditional way of seting up a web service, a web page can be shown when I navigate the URI in the browser.<br/> <br/> <pre lang="x-c#"> ServiceHost host = new ServiceHost(typeof(MyService), new Uri(&quot;http://temp.org&quot;)); host.Open(); </pre> <pre lang=x-xml> &lt;system.serviceModel&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=&quot;metadataBehavior&quot;&gt; &lt;serviceMetadata httpGetEnabled=&quot;true&quot;/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service behaviorConfiguration =&quot;metadataBehavior&quot; name=&quot;MyNamespace.MyService&quot;&gt; &lt;endpoint binding=&quot;basicHttpBinding&quot; contract=&quot;MyNamespace.IMyService&quot;/&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt;</pre> However, when I cutomized the ServiceHost in order to load WCF configuration from another file (as the following ConfigurableServiceHost), and I open the cutomized host and navigate the URI, the web page is not shown in the browser. It shows the WSDL instead. <br/> <br/> <pre lang="x-c#"> public class ConfigurableServiceHost : ServiceHost { private string _configurationPath; public ConfigurableServiceHost(string configurationPath, Type serviceType, params Uri[] baseAddresses) { _configurationPath = configurationPath; base.InitializeDescription(serviceType, new UriSchemeKeyedCollection(baseAddresses)); } protected override void ApplyConfiguration() { ExeConfigurationFileMap filemap = new ExeConfigurationFileMap(); filemap.ExeConfigFilename = _configurationPath; Configuration config = ConfigurationManager.OpenMappedExeConfiguration(filemap, ConfigurationUserLevel.None); ServiceModelSectionGroup serviceModel = ServiceModelSectionGroup.GetSectionGroup(config); foreach (ServiceElement se in serviceModel.Services.Services) { if (se.Name == this.Description.ConfigurationName) { base.LoadConfigurationSection(se); } } } }</pre> <br/> I use the same configuration as the one I used the ServiceHost case before, and I use the following code to open the ConfigurableServiceHost. <br/> <br/> <pre lang="x-c#"> ConfigurableServiceHosthost = new ConfigurableServiceHost(&quot;MyConfigFile.xml&quot;, typeof(MyService), new Uri(&quot;http://temp.org&quot;)); host.Open();</pre> <br/> The ConfigurableServiceHost works well, except not generating the web page. Does anyone here can explain why? Thanks a lot.<br/> <br/>Fri, 20 Nov 2009 07:47:16 Z2009-11-25T04:56:59Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a2d890e8-03ff-4d21-8f72-e411c454a1cbhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a2d890e8-03ff-4d21-8f72-e411c454a1cbgattaca88077http://social.msdn.microsoft.com/Profile/en-US/?user=gattaca88077HttpWebRequest call a BasicHttpBinding WCF service<p>When I create a WcfServiceLibrary in VS2008sp1 and try it at Wcf Text Client Window.<br/>I copy the xml from Wcf Text Client Window, then use HttpWebRequest to post the xml in a winform.<br/>But I got a exception (400) Bed Request.<br/>Here is the code.<br/><br/><br/>string requestXml = @&quot;&lt;s:Envelope xmlns:a=&quot;&quot;<a href="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing</a>&quot;&quot; xmlns:s=&quot;&quot;<a href="http://www.w3.org/2003/05/soap-envelope">http://www.w3.org/2003/05/soap-envelope</a>&quot;&quot;&gt;<br/>                    &lt;s:Header&gt;<br/>                        &lt;a:Action s:mustUnderstand=&quot;&quot;1&quot;&quot;&gt;http://tempuri.org/IService1/GetData&lt;/a:Action&gt;<br/>                        &lt;a:MessageID&gt;urn:uuid:fc75427f-4aed-413b-bb3e-03711ab758fa&lt;/a:MessageID&gt;<br/>                        &lt;a:ReplyTo&gt;<br/>                        &lt;a:Address&gt;http://www.w3.org/2005/08/addressing/anonymous&lt;/a:Address&gt;<br/>                        &lt;/a:ReplyTo&gt;<br/>                    &lt;/s:Header&gt;<br/>                    &lt;s:Body&gt;<br/>                        &lt;GetData xmlns=&quot;&quot;<a href="http://tempuri.org/">http://tempuri.org/</a>&quot;&quot;&gt;<br/>                        &lt;value&gt;1234&lt;/value&gt;<br/>                        &lt;/GetData&gt;<br/>                    &lt;/s:Body&gt;<br/>                    &lt;/s:Envelope&gt;&quot;;</p> <p>HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(baseAddress);<br/>request.Method = &quot;POST&quot;;<br/>request.Credentials = CredentialCache.DefaultCredentials;<br/>request.ContentType = &quot;text/xml; charset=utf-8&quot;;<br/>request.ContentLength = requestXml.Length;<br/>System.IO.StreamWriter streamWriter = new System.IO.StreamWriter(request.GetRequestStream());<br/>streamWriter.Write(requestXml); streamWriter.Close();<br/>HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // &lt;= Get a error<br/><br/><br/>I put the project file on SkyDrive <a href="http://cid-451fba1ca2a146a7.skydrive.live.com/self.aspx/Public/HttpWebRequest-WCF.zip">http://cid-451fba1ca2a146a7.skydrive.live.com/self.aspx/Public/HttpWebRequest-WCF.zip</a><br/><br/>Could someone tell me the correct way to call WCF by HttpWebRequest ?</p>Wed, 25 Nov 2009 04:32:26 Z2009-11-25T04:32:26Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/e0e67597-7c6b-4758-a5a0-c3fade0e6bb5http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/e0e67597-7c6b-4758-a5a0-c3fade0e6bb5sfun28http://social.msdn.microsoft.com/Profile/en-US/?user=sfun28trouble with Self-Host example<p align=left><font face=Arial size=2>Hello folks - Looking to impliment WCF.  I've tried for hours to get the self-host example to work.  The service is running as a console app.  When I run &quot;netstat -a&quot; I see that the machine is listening on port 8000 and the code doesn't throw any exceptions.  However, when I navigate to the following the page isn't found.  <br><a href="http://localhost:8000/ServiceModelSamples/service" rel=nofollow><font color="#777777">http://localhost:8000/ServiceModelSa<wbr>mples/serv<wbr>ice</font></a><br>Also, the sample client throws an exception saying that it couldn't establish the connection<br><br>I don't have any firewalls running.  Has anyone run into this issue?  I'm pretty much stuck if I can't get a simple service to selfhost.  How can I start to debug this issue?</font></p>Tue, 06 May 2008 02:22:49 Z2009-11-25T04:23:05Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/7dd4fe53-2615-45a5-bead-35874d40ab5chttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/7dd4fe53-2615-45a5-bead-35874d40ab5cSpdrManhttp://social.msdn.microsoft.com/Profile/en-US/?user=SpdrManBinding the same WCF implementation to basicHttpBinding and netNamedPipeBindingHi All,<br/>   I'm learning WCF and I'm having a bit of trouble.  I'm creating a Windows Service that will publish to 2 endpoints.  One is basicHttpBinding for communication across nodes, the other is a namedPipe for communcation across processes on the same machine.  Ultimately I'll be changing the http to tcp, but for now I want to use http as it's easier for me to interact with during the creation of the program.  I have the following config, in my .config file for my app.<br/> <br/> <pre lang=x-xml>&lt;services&gt; &lt;service behaviorConfiguration=&quot;SchedulerMetaBehavior&quot; name=&quot;SpidertracksScheduledTaskRunner.Services.WcfSchedulerExporter&quot;&gt; &lt;endpoint address=&quot;&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;httpBinding&quot; name=&quot;httpEndpoint&quot; contract=&quot;SpidertracksScheduledTaskRunner.Services.IWcfScheduler&quot; /&gt; &lt;endpoint address=&quot;mex&quot; binding=&quot;mexHttpBinding&quot; name=&quot;mexMetadataEndpoint&quot; contract=&quot;IMetadataExchange&quot; /&gt; &lt;endpoint address=&quot;&quot; binding=&quot;netNamedPipeBinding&quot; bindingConfiguration=&quot;netPipeBinding&quot; name=&quot;netPipeEndpoint&quot; contract=&quot;SpidertracksScheduledTaskRunner.Services.IWcfScheduler&quot; /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress=&quot;http://127.0.0.1:20000/ScheduledTaskRunner&quot; /&gt; &lt;add baseAddress=&quot;net.pipe://localhost/ScheduledTaskRunner&quot;/&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt;</pre> Here is the declaration of my interface and my impl<br/> <br/> Interface:<br/> <br/> <pre lang="x-c#"> /// &lt;summary&gt; /// Copy of the &lt;see cref=&quot;IScheduler&quot;/&gt; interface with some modifications to allow WCF remoting. Removes some functionality that should not/can not be controlled by a client /// &lt;author&gt;Todd&lt;/author&gt; /// &lt;/summary&gt; [ServiceContract(Namespace = &quot;testservice.com/scheduledtaskrunner&quot;)] public interface IWcfScheduler { ... }</pre> Impl:<br/> <pre lang="x-c#"> /// &lt;summary&gt; /// A that uses the WCF framework as a replacement for the legacy &lt;see cref=&quot;RemotingSchedulerExporter&quot;/&gt; /// &lt;author&gt;Todd Nine&lt;/author&gt; /// &lt;/summary&gt; /// only ever want a single instance running since we wire it. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] public class WcfSchedulerExporter : IWcfSchedulerService { /// &lt;summary&gt; /// Our instance of the remote scheduler /// &lt;/summary&gt; private IScheduler scheduler; public IScheduler{ set{ scheduler = value;}} ... } </pre> <br/> In my code I create the service in the following way.<br/> <br/> <pre lang="x-c#">schedulerFactory = CreateSchedulerFactory(); scheduler = GetScheduler(); //set the factory to pull objects from the IoC Servicelocator container scheduler.JobFactory = new ServiceLocatorJobFactory(); IWcfSchedulerService wcfSchedulerService = new WcfSchedulerExporter(); wcfSchedulerService.Scheduler = scheduler; service = new ServiceHost(wcfSchedulerService); logger.Info(&quot;Wiring the scheduler in to the service&quot;); ... scheduler.Start(); while(!scheduler.IsStarted) { Thread.Sleep(100); } logger.Info(&quot;Scheduler started successfully&quot;); logger.Info(&quot;Starting the WCF service&quot;); // Open the host and start listening for incoming messages. service.Open(); logger.Info(&quot;WCF service started&quot;);</pre> <br/> Now, I want to allow clients to both call the service via the pipe and http, as well as receive the service metadata.  Using the WCF test client tool, I'm able to retreive metadata for both services from http://127.0.0.1:20000/ScheduledTaskRunner, but I'm unable to get metadata from net.pipe://localhost/SpidertracksTaskRunner.  I always receive this error.  <br/> <br/> Metadata contains a reference that cannot be resolved: 'net.pipe://localhost/SpidertracksTaskRunner'.    There was no endpoint listening at net.pipe://localhost/SpidertracksTaskRunner that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.    The pipe endpoint 'net.pipe://localhost/SpidertracksTaskRunner' could not be found on your local machine. <br/> <br/> Cearly I've incorrectly defined my endpoints, but I'm not sure how to implement 2 different protocols with the same underlying singlton instance.  Any help would be greatly appreciated.<br/> <br/> Thanks,<br/> Todd<br/>Wed, 25 Nov 2009 04:15:24 Z2009-11-25T04:15:24Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a1f7ecfc-92dc-4249-86f8-6053e84f5e04http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a1f7ecfc-92dc-4249-86f8-6053e84f5e04Rohan Fernandohttp://social.msdn.microsoft.com/Profile/en-US/?user=Rohan%20Fernandodoes wsDuallHttpBinding supports Internet applicationsI need an application where a WCF Service is hosted in a web server and windows client installed on my home pc can access it using an internet connection with wsDuallHttpbinding (my service is a call back service) . is it possible via internet.<hr class="sig">Rohan FernandoTue, 24 Nov 2009 09:58:47 Z2009-11-25T03:34:43Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a9b8fe64-ab3a-4e8b-ae30-84233f7d7129http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a9b8fe64-ab3a-4e8b-ae30-84233f7d7129AustinAjithttp://social.msdn.microsoft.com/Profile/en-US/?user=AustinAjitThe target principal name is incorrect - After providing spn/upn as part of identifySo far the service was running fine when called with spn identify. Now started getting &quot;The target principal name is incorrect&quot; error. It goes away only when I remove spn from identify... what am i missing?  <div><br/></div> <div><br/> <div><strong><br/></strong></div> <div><strong>Client Config:</strong></div> <div> <div>            &lt;wsHttpBinding&gt;</div> <div>                &lt;binding name=&quot;svcEndpoint&quot; closeTimeout=&quot;00:01:00&quot;</div> <div>                    openTimeout=&quot;00:01:00&quot; receiveTimeout=&quot;00:10:00&quot; sendTimeout=&quot;00:01:00&quot;</div> <div>                    allowCookies=&quot;false&quot;&gt;</div> <div>                    &lt;readerQuotas maxDepth=&quot;32&quot; maxStringContentLength=&quot;8192&quot; maxArrayLength=&quot;16384&quot;</div> <div>                        maxBytesPerRead=&quot;4096&quot; maxNameTableCharCount=&quot;16384&quot; /&gt;</div> <div>                    &lt;reliableSession ordered=&quot;true&quot; inactivityTimeout=&quot;00:10:00&quot;</div> <div>                        enabled=&quot;false&quot; /&gt;</div> <div>                    &lt;security mode=&quot;Transport&quot;&gt;</div> <div>                        &lt;transport clientCredentialType=&quot;Windows&quot; proxyCredentialType=&quot;None&quot;</div> <div>                            realm=&quot;&quot;&gt;</div> <div>                            &lt;extendedProtectionPolicy policyEnforcement=&quot;Never&quot; /&gt;</div> <div>                        &lt;/transport&gt;</div> <div>                        &lt;message clientCredentialType=&quot;Windows&quot; negotiateServiceCredential=&quot;true&quot;</div> <div>                            establishSecurityContext=&quot;true&quot; /&gt;</div> <div>                    &lt;/security&gt;</div> <div>                &lt;/binding&gt;</div> <div>            &lt;/wsHttpBinding&gt;</div> <div><br/></div> <div> <div>            &lt;endpoint address=&quot;https://servername/wcfservice/service.svc&quot;</div> <div>                binding=&quot;wsHttpBinding&quot; bindingConfiguration=&quot;svcEndpoint&quot;</div> <div>                contract=&quot;ServiceReference1.INGIMServiceGateway&quot; name=&quot;svcEndPoint&quot;&gt;</div> <div>                &lt;identity&gt;</div> <div>                    &lt;!--&lt;userPrincipalName value=&quot;&quot; /&gt;--&gt;</div> <div>                 <strong> &lt;servicePrincipalName value=&quot;acct1@domain.com&quot;/&gt; &lt;-- if this is removed it works fine. </strong></div> <div>                &lt;/identity&gt;</div> <div>            &lt;/endpoint&gt;</div> <div><br/></div> <div><strong>Server Config:</strong></div> <div><br/></div> <div> <div><span style="white-space:pre"> </span>&lt;services&gt;</div> <div><span style="white-space:pre"> </span>&lt;service name=&quot;MyService&quot; behaviorConfiguration=&quot;NewBehavior&quot;&gt;</div> <div><span style="white-space:pre"> </span>&lt;clear /&gt;</div> <div><br/></div> <div><span style="white-space:pre"> </span>&lt;endpoint address=&quot;https://localhost/wcfservice/service.svc&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;svcwsHTTPBinding&quot;</div> <div><span style="white-space:pre"> </span> name=&quot;myendpoint&quot; contract=&quot;IContract&quot; /&gt;</div> <div><br/></div> <div><span style="white-space:pre"> </span>&lt;/service&gt;</div> <div><span style="white-space:pre"> </span>&lt;/services&gt;</div> <div><br/></div> </div> <div> <div><span style="white-space:pre"> </span>&lt;binding name=&quot;svcwsHttpBinding&quot; maxBufferPoolSize=&quot;524288&quot; maxReceivedMessageSize=&quot;2147483647&quot; closeTimeout=&quot;00:03:00&quot; openTimeout=&quot;00:03:00&quot; receiveTimeout=&quot;00:10:00&quot; sendTimeout=&quot;00:01:00&quot; &gt;</div> <div><span style="white-space:pre"> </span>&lt;readerQuotas maxStringContentLength=&quot;2147483647&quot; maxDepth=&quot;2147483647&quot;</div> <div><span style="white-space:pre"> </span>  maxArrayLength=&quot;2147483647&quot;</div> <div><span style="white-space:pre"> </span>  maxBytesPerRead=&quot;2147483647&quot;</div> <div><span style="white-space:pre"> </span>  maxNameTableCharCount=&quot;2147483647&quot; /&gt;</div> <div><span style="white-space:pre"> </span>&lt;security mode=&quot;Transport&quot;&gt;</div> <div><span style="white-space:pre"> </span>&lt;transport clientCredentialType=&quot;Windows&quot; /&gt;</div> <div><span style="white-space:pre"> </span>&lt;message clientCredentialType=&quot;Windows&quot; negotiateServiceCredential=&quot;true&quot;  establishSecurityContext=&quot;false&quot; /&gt;</div> <div><span style="white-space:pre"> </span>&lt;/security&gt;<span style="white-space:pre"> </span></div> <div><span style="white-space:pre"> </span>&lt;/binding&gt;</div> </div> </div> </div> </div>Fri, 20 Nov 2009 02:54:49 Z2009-11-25T03:30:56Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a54d2c7d-40af-44ac-82fb-ac80fad69ac8http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a54d2c7d-40af-44ac-82fb-ac80fad69ac8HuaMin Chenhttp://social.msdn.microsoft.com/Profile/en-US/?user=HuaMin%20ChenTo remotely access another serverHi,<br/>Is there any tools like the terminal service, by which we can connect to another machine out of our company network? That server can be one that runs in Linux.<hr class="sig">Many Thanks &amp; Best Regards, HuaMin ChenWed, 25 Nov 2009 03:19:43 Z2009-11-25T03:19:44Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/97aaee21-ad72-4dc1-a1d1-5c552f18622fhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/97aaee21-ad72-4dc1-a1d1-5c552f18622framz_ghttp://social.msdn.microsoft.com/Profile/en-US/?user=ramz_gReturning stream from a WCF Service to the clientHi,<br/> <br/> I am developing an application that calls a WCF service which connects to a remote server and downloads a file. The remote server returns a Stream object for each download request. Is it possible (or perhaps advisable) to return the stream from the WCF service to the client? Pls advice.<br/> <br/> Thanks,<br/> ramz_gTue, 17 Nov 2009 11:26:30 Z2009-11-25T02:54:41Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c5c5b641-8903-4773-b5ff-68eb97d672d2http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c5c5b641-8903-4773-b5ff-68eb97d672d2Jean-Pierre Fouchehttp://social.msdn.microsoft.com/Profile/en-US/?user=Jean-Pierre%20FoucheThe server needs to authenticate your request. Your credentials will be sent to the server in clear text. Do you want to continue?<span class=Apple-style-span style="text-transform:none;text-indent:0px;border-collapse:separate;font:16px 'Times New Roman';white-space:normal;letter-spacing:normal;color:#000000;word-spacing:0px"><span class=Apple-style-span style="font-family:monospace;white-space:pre-wrap;font-size:13px">The Service 'https://localhost/WCFTestService/login.aspx' requires a username and password. <br/><br/>I have a WCF Service configured according to the following MSDN Guideline: How to: Use Username Authentication with Transport Security in WCF Calling from Windows Forms (http://msdn.microsoft.com/en-us/library/cc949025.aspx) <br/>I cannot add a service reference, because I continually get the above dialog ('The server needs to authenticate your request etc.'). <br/><br/>When I step through the authentication code, I see that my user/password combination is correctly authenticated, and the context is correctly set. HOwever, the dialog persists. Any way to fix this? <br/><br/>Web.config looks like this: <br/>=========================== <br/><br/><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">connectionStrings</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MyLocalSQLServer</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">connectionString</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Data Source=MTS-JPF;Initial Catalog=TTAFPortalSecurity;Integrated Security=True</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">connectionStrings</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">system.web</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">membership</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">defaultProvider</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MySqlMembershipProvider</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">providers</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">clear</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MySqlMembershipProvider</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">connectionStringName</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MyLocalSQLServer</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">applicationName</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MyAppName</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">type</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">System.Web.Security.SqlMembershipProvider</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">providers</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">membership</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">roleManager</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">enabled</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">true</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">defaultProvider</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MySqlRoleProvider</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">providers</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">clear</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">connectionStringName</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MyLocalSQLServer</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">applicationName</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MyAppName</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MySqlRoleProvider</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">type</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">System.Web.Security.SqlRoleProvider</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">providers</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>...<br/>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">roleManager</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;</span></span></p> <span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">httpModules</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<br/></span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&lt;</span></span><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">BasicAuthenticationModule</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">type</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Module.UserNameAuthenticator,UserAuthenticator</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">httpModules</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">system.web</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">system.codedom</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p> </p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p> </p> <p><span style="color:#0000ff;font-size:x-small"></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">system.webServer</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">validation</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">validateIntegratedModeConfiguration</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">false</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">modules</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&lt;/</span></span><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">modules</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">handlers</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">remove</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">WebServiceHandlerFactory-Integrated</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ScriptHandlerFactory</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">verb</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">*</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">path</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">*.asmx</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">preCondition</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">integratedMode</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">type</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ScriptHandlerFactoryAppServices</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">verb</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">*</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">path</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">*_AppService.axd</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">preCondition</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">integratedMode</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">type</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ScriptResource</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">preCondition</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">integratedMode</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">verb</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">GET,HEAD</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">path</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ScriptResource.axd</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">type</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">handlers</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">system.webServer</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">system.serviceModel</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">serviceHostingEnvironment</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">aspNetCompatibilityEnabled</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">true</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">bindings</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">basicHttpBinding</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">binding</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">BasicBindingConfiguration</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">security</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">mode</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Transport</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">transport</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">clientCredentialType</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">None</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">security</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">binding</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">basicHttpBinding</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">bindings</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">services</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">service</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">behaviorConfiguration</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ServiceBehavior</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Service</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">endpoint</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">address</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">binding</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">basicHttpBinding</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">bindingConfiguration</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">BasicBindingConfiguration</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">basicEndpoint</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">contract</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">IService</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">identity</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">dns</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">value</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> = </span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">localhost</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> /&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">identity</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">endpoint</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">endpoint</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">address</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">mex</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">binding</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">mexHttpsBinding</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">bindingConfiguration</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">mexEndpoint</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">contract</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">IMetadataExchange</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">service</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">services</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">behaviors</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">serviceBehaviors</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">behavior</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">name</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ServiceBehavior</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">serviceMetadata</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">httpsGetEnabled</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">true</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">serviceDebug</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">includeExceptionDetailInFaults</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">false</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">serviceAuthorization</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">principalPermissionMode</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">UseAspNetRoles</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">roleProviderName</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">MySqlRoleProvider</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">authorizationPolicies</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">add</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> </span></span><span style="color:#ff0000;font-size:x-small"><span style="color:#ff0000;font-size:x-small">policyType</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">=</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">AuthorizationPolicy.HttpContextPrincipalPolicy, AuthorizationPolicy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</span></span><span style="font-size:x-small">&quot;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">/&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">authorizationPolicies</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">serviceAuthorization</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">behavior</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">serviceBehaviors</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">behaviors</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">system.serviceModel</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;<font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;/</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">configuration</span></span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">&gt;</span></span></p> <br/><br/><br/><br/></span></span>Tue, 24 Nov 2009 10:51:09 Z2009-11-25T02:02:24Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4c50a7a7-5960-4ee7-8487-d80cfd5bc09bhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4c50a7a7-5960-4ee7-8487-d80cfd5bc09bVisualCSharphttp://social.msdn.microsoft.com/Profile/en-US/?user=VisualCSharpException when getting service metadata on singleton service with multiple concurrencyI have written a simple WCF service whose service implementation is defined like this:<br/> <br/> [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]<br/> public class LoggerService : ILoggerService<br/> {<br/>   ...<br/> }<br/> <br/> The service has the standard HTTP metadata behavior defined in Web.config. When I attempt to get metadata for the service, it works fine:<br/> <br/> http://localhost:81/Logger/Logger.svc?wsdl<br/> <br/> The browser displays the correct WSDL.<br/> <br/> However, in order to make my service act as a singleton and introduce better message processing performance (as described at http://www.wintellect.com/CS/blogs/jsmith/archive/2006/05/16/instancecontextmode-and-concurrencymode.aspx and several other web pages), I changed the ServiceBehavior attribute like so:<br/> <br/> [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]<br/> <br/> Now when I try and retrieve the WSDL, I get the following exception:<br/> <br/> <div> <p class=heading1>Service</p> <br/> <p class=intro>The service encountered an error.</p> <pre>An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:<br/> System.InvalidCastException: Unable to cast object of type 'X.LoggerService' to type 'IHttpGetMetadata'.<br/> at SyncInvokeGet(Object , Object[] , Object[] )<br/> at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)<br/> at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)<br/> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)<br/> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc)<br/> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp; rpc)<br/> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc)<br/> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc)<br/> at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</pre> </div> <br/> This exception is preventing this product from going to production because we need the message performance of a singleton with multiple concurrency, but we must be able to accept HTTP GET requests for WSDL and HTTP POST requests to execute actual service methods.Tue, 24 Nov 2009 21:19:35 Z2009-11-25T01:50:27Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/bbd003bb-134b-43af-aa06-fc980013df5dhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/bbd003bb-134b-43af-aa06-fc980013df5dB. Clay Shannonhttp://social.msdn.microsoft.com/Profile/en-US/?user=B.%20Clay%20ShannonMy service is hiding behind a tree, or what?<p>When I try to add a service reference to my app by right-clicking References, selecting &quot;Add Service Reference&quot; and then selecting Discover | Services in Solution, I get &quot;<em>No services found in the solution</em>&quot; although I do have one, namely: <br/><br/><strong>ServiceHost selfHost; <br/>Uri baseAddress = new Uri(&quot;http://10.172.2.93:8000/APEMCs&quot;); <br/>. . . <br/><br/>    [ServiceContract(Namespace = &quot;</strong><a href="http://APEMCs"><strong>http://APEMCs</strong></a><strong>&quot;)]<br/>    public interface ISendMessagesToProctor<br/>    {<br/>      [OperationContract]<br/>      void SendMsgToProctor( string ATesterID, string AMsg, DateTime AMsgTime );<br/>    }</strong></p> <p><strong>    public class SendMessagesToProctorService : ISendMessagesToProctor<br/>    {<br/>      public void SendMsgToProctor( string ATesterID, string AMsg, DateTime AMsgTime )<br/>      {<br/>        string sMsg = string.Format(&quot;From {0} at {1:G}: {2}.&quot;, ATesterID, AMsgTime, AMsg);<br/>        LogMsgToFile(sMsg);<br/>      }</strong></p> <p><strong>      private void LogMsgToFile( string sMsg )<br/>      {<br/>        string sTodaysFileName =<br/>          string.Format(&quot;{0}{1}{2}Messages.txt&quot;, DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);<br/>        System.IO.StreamWriter sw = System.IO.File.AppendText(sTodaysFileName);<br/>        try<br/>        {<br/>          sw.WriteLine(sMsg);<br/>        }<br/>        finally<br/>        {<br/>          sw.Close();<br/>        }<br/>      }<br/>    }</strong><br/><br/>...Why is &quot;SendMessagesToProctorService&quot; invisible?</p><hr class="sig">Writer / Photographer: www.lulu.com/blackbirdcraven, www.bclayshannon.photoshop.comTue, 24 Nov 2009 22:28:44 Z2009-11-25T01:29:49Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/59f9533c-bf60-4f34-a233-0af121380593http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/59f9533c-bf60-4f34-a233-0af121380593timbmchttp://social.msdn.microsoft.com/Profile/en-US/?user=timbmcClient problem "but expected 'text/xml'" after calling an Axis2 web service<p><span>My C# sample client ASP.NET program sucessfully runs a call in my Axis2 server but the client does not seem to like the response.  I'm following the quick start instructions for testing a C# client in an ASP.NET page but I am instead pointing at the WSDL from my test server.  This is my first C# program so I'm depending on things working well the first time (very close to that goal so far!)<br/><br/>I get:<br/><br/>Client found response content type of 'multipart/related; boundary=MIMEBoundaryurn_uuid_38D413ACFC9D56F28E1258666845186; type=&quot;application/xop+xml&quot;; start=&quot;&lt;0.urn:uuid:38D413ACFC9D56F28E1258666845187@apache.org&gt;&quot;; start-info=&quot;text/xml&quot;', but expected 'text/xml'.<br/><br/>There are &quot;related topics&quot; under &quot;consuming Java MTOM web services using WSE3&quot; but I am advised that WSE3 is no longer to be used. There is another posting at &quot;<span>WCF client to Java MTOM File Upload service</span><a rel=nofollow href="http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/00d82a0c-5d30-439e-bc82-d0279f87edad?outputAs=rss"><img class="icon rss" src="http://i1.social.microsoft.com/Forums/resources/images/trans.gif?cver=2.6.0028.01" alt=""></a>&quot; but I don't see what file the &lt;system.serviceModel&gt; text would go into.<br/><br/>I'm guessin I need to enable MTOM somehow, but what file?  What tag or setting and inside where?  Or something else?<br/><br/></span></p>Thu, 19 Nov 2009 22:06:47 Z2009-11-25T01:17:55Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8c238db7-141c-4ac8-9a7d-8a57447a9e09http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8c238db7-141c-4ac8-9a7d-8a57447a9e09Ehsan Khhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ehsan%20Khproblem with wcf Hi<br/> Im using microsoft visual studio 2008 to developing a wcf project<br/> One of my wcf service operations has a binary (byte[]) parameter &amp; when I want to call it I get this error :<br/> <br/> The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:OAS_LtrContent. The InnerException message was 'There was an error deserializing the object of type System.Byte[]. The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 26986.'.  Please see InnerException for more details.<br/> <br/> I saw some forums about this problem, they all says that I should increase MaxArrayLength property for both server &amp; client . I did that but my problem doesn't solved. Then I though it may related to visual studio, so I published my project at IIS7, but problem still exists !<br/> <br/> can anybody help me ?<br/> Its really emergency !<br/> <br/> thanks<br/>Mon, 23 Nov 2009 05:27:45 Z2009-11-25T01:12:36Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/698e583a-0397-4518-9b40-64ef69f2a5e6http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/698e583a-0397-4518-9b40-64ef69f2a5e6Titan2782http://social.msdn.microsoft.com/Profile/en-US/?user=Titan2782WCF Queuing + mutual certificate authenticationI am developing a mobile application (Windows Mobile 6.5) that needs to connect to a WCF service that I am also building. The requirements are that the device has to authenticate via mutual certiciate authentication. <br/><br/>Is it possible to do message queuing with the WCF proxy on .netcf? Is it possible to use the netMsmqBinding as a mobile endpoint and will netMsmqBinding work with mutual certificate authentication?<hr class="sig">Programmers-Unlimited.comMon, 23 Nov 2009 23:32:13 Z2009-11-25T00:36:02Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c099d719-c610-4414-9d2f-bb1c6b5e348chttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c099d719-c610-4414-9d2f-bb1c6b5e348cSean McLellanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sean%20McLellanReturning appropriate fault information in a custom UserNamePasswordValidator<P>&nbsp;</P> <P>I'm looking at the WCF samples for creating a custom UserNamePasswordValidator (WCFSamples\TechnologySamples\Extensibility\Security\UserNamePasswordValidator\CS\service).</P> <P>The sample's CustomUserNamePasswordValidator implementation demonstrates&nbsp;that if a username/password combination is not valid, to throw a SecurityTokenException. </P> <P>However, since the exception occurs during the authentication stage of the pipeline, prior to the message being authenticated, the exception thrown by the&nbsp;client is not a SecurityTokenException, but is always a MessageSecurityException that indicates that: {"An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail."} The inner exception does not contain the SecurityTokenException either, but is a FaultException indicates that {"An error occurred when processing the security tokens in the message."}</P> <P>&nbsp;This makes sense since we're using message-based security&nbsp;-- the service can't authenticate and issue a token, so the client can't authenticate the fault message coming back from the service. (or something like that ;)</P> <P>&nbsp;</P> <P>So my question is, it appropriate to catch a MessageSecurityException, say, to indicate to the client user that the provided credentials are invalid, and to re-enter their credentials, or is there another way of flowing the SecurityTokenException as thrown in the custom UserNamePasswordValidator, or another fault message (maybe trace diags?) back to the client?</P>Mon, 24 Jul 2006 03:26:44 Z2009-11-24T23:36:34Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a4d75229-ef39-4095-9d7d-bd35ffa12543http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a4d75229-ef39-4095-9d7d-bd35ffa12543CoolFool007http://social.msdn.microsoft.com/Profile/en-US/?user=CoolFool007How do I disable anonymous access in IIS and have my WCF services respect client certificate mappings setup in IIS?<p>So here are my requirements:<br/>- have an ASP.NET website that hosts both a httphandler (for generic webservices) and a few WCF endpoints<br/>- use SSL<br/>- use client certificates to do authentication (1-to-many mappings)<br/>- disable anonymous access in IIS<br/><br/>I am able to make this work just fine for the httphandler, I just disabled anonymous access in IIS and setup the client certificate mappings and everything worked.  This doesn't seem to work, however, with the WCF services.  I get the following error:<br/><span style="font-size:xx-small"><br/>The service '/xxx/xxx.svc' cannot be activated due to an exception during compilation. The exception message is: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.<br/><br/>I found that I can enable anonymous access on the individual endpoint files and the exception goes away, but that doesn't seem right.<br/><br/>I also tried enabling anonymous access and having anonymous requests map to one account (UserA) and then have the client certificate mappings map to another account (UserB) and then only give security access to the virtual directory to UserB, but that doesn't seem to work either.<br/><br/>What I really want is for WCF to let IIS deal with the authentication itself, and assume that if execution runs then the request has been authenticated.  Is that possible?<br/><br/>Or is there a more secure way that this could be setup? Any help would be greatly appreciated.  Please let me know if you need any additional information.</span></p>Thu, 19 Nov 2009 22:28:08 Z2009-11-25T06:34:10Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/5cfae578-c3a5-4961-a174-68fb08ebe582http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/5cfae578-c3a5-4961-a174-68fb08ebe582GarF1eldhttp://social.msdn.microsoft.com/Profile/en-US/?user=GarF1eldClientBaseAddress<div>Hello, </div> <div><br/></div> <div>I have an application which uses WsDualHttpBinding. </div> <div>When i try to connect to the service i get an AddressAlreadyInUseException &quot;HTTP could not register URL http://+:80/Temporary_Listen_Addresses/b72266da-c3d9-4000-93b9-c0ad7070a300/ because TCP port 80 is being used by another application.&quot;.</div> <div><br/></div> <div>I know that i have to specify clientBaseAddress, but if i'm filling it with http://localhost:12345/client it fails with timeout exception. I think it is because i should type my outer ip instead of localhost, but i'm using ADSL and have dynamic ip.</div> <div><br/></div> <div>How can the problem be solved?</div>Tue, 24 Nov 2009 21:35:36 Z2009-11-24T23:23:45Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/7e762893-0269-440a-a56e-72764ffc9540http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/7e762893-0269-440a-a56e-72764ffc9540G.Mavritsakishttp://social.msdn.microsoft.com/Profile/en-US/?user=G.MavritsakisWCF Hungs when calling initial service from callback - System.InvalidOperationExceptionDear all,<br/> i have some experience with WCF but currently i am facing the following problem:<br/> I have a <strong>publish/subscribe</strong> design pattern where there is a service, the <strong>ISubscriber</strong> and a callback of this  the <strong>IPublisher</strong> .<br/> Both of them are declared as <strong>ConcurrencyMode = ConcurrencyMode.Multiple and UseSynchronizationContext = false</strong> .<br/> The IPublisher is declared as the callback of ISubscriber.<br/> A client subscribes to the server and the server stores the callback and call it regularly to update the client with events.<br/> <br/> The problem start when, <strong>from within a callback event the client tries to call again the ISubscriber</strong> where the system throws an exception with the message <br/> <br/> <em>&quot;</em> <strong><em>System.InvalidOperationException: This operation would deadlock because the<br/> reply cannot be received until the current Message completes processing. If<br/> you want to allow out-of-order message processing, specify ConcurrencyMode of<br/> Reentrant or Multiple on CallbackBehaviorAttribute.&quot;<br/> </em> <br/> </strong> I cannot figure out why this message pops up as all my CallbackBehaviors and ServiceBehavior contracts and behaviors are declared as multithreaded without any automatic synchronization.<br/> <br/> I need help!!!<br/> Thank you in advance!<br/>Mon, 23 Nov 2009 08:42:30 Z2009-11-24T21:39:53Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f4644318-c9c6-4110-9656-419cf5e92e63http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f4644318-c9c6-4110-9656-419cf5e92e63Datafeedhttp://social.msdn.microsoft.com/Profile/en-US/?user=DatafeedSmooth migration from Sockets to WCFI have a stand-alone desktop application which exposes its API through sockets and currently only the basic functionality is exposed through API. The future version of application is going to be client/server and much more of the functionality is going to be exposed through API, which makes it difficult to stick with sockets, so I decided to go for WCF. However, there is a recuirement to keep supporting socket clients forever - some third parties write clients for our application and they want to stick with socket clients and to send ASCII strings through the sockets (it's OK if they only get subset of functionality through the sockets rather than everything available to WCF clients). Please give me some advise how to approach this task, or even better - some sample of WCF server with both WCF and socket client, if it's possible at all.Tue, 24 Nov 2009 04:19:59 Z2009-11-24T21:37:47Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d58ee1c6-032b-40f3-b734-6628f3991bb2http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d58ee1c6-032b-40f3-b734-6628f3991bb2René Titulaerhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ren%u00e9%20TitulaerWCF service timeout when not closing the client properly<span style="font-size:x-small"><span style="font-size:x-small"> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:8pt;color:black;font-family:Verdana">Hello,<br/><br/>I have a WCF service hosted in IIS. I know you need to close the client after calling the service. But I use the service as a web service and I don't know if clients will close the service. When they don't close the client the service will get a timeout after 10 calls.<br/><br/>I set the following on the service:<br/></span><span style="font-size:10pt;color:black;font-family:Verdana">[</span><span style="font-size:10pt;color:#2b91af;font-family:Verdana">ServiceContract</span><span style="font-size:10pt;color:black;font-family:Verdana">(SessionMode = </span><span style="font-size:10pt;color:#2b91af;font-family:Verdana">SessionMode</span><span style="font-size:10pt;color:black;font-family:Verdana">.NotAllowed)]<br/><br/>When I use performance monitor I see the number of instances stays 0. When I don't use SessionMode = </span><span style="font-size:10pt;color:#2b91af;font-family:Verdana">SessionMode</span><span style="font-size:10pt;color:black;font-family:Verdana">.NotAllowed an instance is added for each call. I thought I solved it. bad luck: still I get a timeout after 10 calls.<br/><br/>Next I added this to the class implementing the service:<br/>[</span><span style="font-size:10pt;color:#2b91af;font-family:Verdana">ServiceBehavior</span><span style="font-size:10pt;color:black;font-family:Verdana">(InstanceContextMode=</span><span style="font-size:10pt;color:#2b91af;font-family:Verdana">InstanceContextMode</span><span style="font-size:10pt;color:black;font-family:Verdana">.PerCall)]<br/><br/>Still I get a timeout after 10 calls.<br/><br/>How can I make the service robust so it doesn’t gives a timeout when clients don't close the service properly?<br/><br/>Thanks,<br/>René</span></p> </span></span><hr class="sig">rtMon, 16 Nov 2009 11:05:32 Z2009-11-24T21:31:28Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/3a773dd9-b95e-4d47-a2e9-b339579805c6http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/3a773dd9-b95e-4d47-a2e9-b339579805c6Masodihttp://social.msdn.microsoft.com/Profile/en-US/?user=MasodiGetting Tcp error code 10061 while unit testing WCF service Hi,<br /> <br /> I am trying for two days now to run test for wcf service that i created.<br /> <br /> The test goes like this:<br /> <br /> InstanceContext context = new InstanceContext(new CallbackCreator()):<br /> WsDualHttpBinding = new WsDualHttpBinding();<br /> binding.ClientBaseAddress = new Uri(&quot;http://localhost:8010/Tempuri&quot;);<br /> MyClient client = new MyClient(context, binding,new EndpointAddress(&quot;http://localhost:8080&quot;/Temp));<br /> client.DoSomething(SomeObject);<br /> <br /> <br /> And the error i get looks like this:<br /> <br /> System.ServiceModel.EndPointNotFoundException: Could not connect to http://localhost:8010/Tempuri. TCP error code 10061: <br /> No Connection could be made because the target machine actively refused it 127.0.0.1:8010. ---&gt; WebException: Unable to connect to rempte server...<br /> <br /> <br /> Thanks,<br /> Dan.<hr class="sig">masodiMon, 12 Oct 2009 15:15:36 Z2009-11-24T21:07:13Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/74b87825-8a5f-4010-b308-20ea3f089a3fhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/74b87825-8a5f-4010-b308-20ea3f089a3fGarF1eldhttp://social.msdn.microsoft.com/Profile/en-US/?user=GarF1eldCannot add service referenceHello, i have extrasimple WCF service that uses basichttpbinding. When i host it on my developers machine with base adress http://localhost:888/EssentialWCF and then try to add reference from VS2008 it works great, but when i upload it on a server with ip 1.2.3.4 and use base adress http://1.2.3.4:888/EssentialWCF it fails with TimeoutException. <div><br/></div> <div><strong>What can cause the problem?</strong></div> <div>My administrator says that http port 888 is opened on the server.</div> <div><br/></div> <div>PS When i try to add reference from the server using svcutil i get an error <div>The remote server returned an unexpected response: (407) Proxy Authentication Required ( ISA Server</div> <div> <pre lang="x-c#">namespace EssentialWCF { [ServiceContract] public interface IStockService { [OperationContract] double GetPrice(string ticker); } public class StockService : IStockService { public double GetPrice(string ticker) { return 94.85; } } }</pre> <pre>&lt;configuration&gt; &lt;system.serviceModel&gt; &lt;services&gt; &lt;service name=&quot;EssentialWCF.StockService&quot; behaviorConfiguration=&quot;myServiceBehavior&quot;&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress=&quot;http://1.2.3.4:888/EssentialWCF&quot;/&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;endpoint address=&quot;&quot; binding=&quot;basicHttpBinding&quot; contract=&quot;EssentialWCF.IStockService&quot; /&gt; &lt;endpoint address=&quot;mex&quot; binding=&quot;mexHttpBinding&quot; contract=&quot;IMetadataExchange&quot; /&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=&quot;myServiceBehavior&quot;&gt; &lt;serviceMetadata httpGetEnabled=&quot;True&quot;/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt;</pre> <br/></div> </div>Mon, 23 Nov 2009 00:41:03 Z2009-11-24T20:10:31Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f005889f-8e78-4833-9675-b430ba06c33ahttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f005889f-8e78-4833-9675-b430ba06c33aKpbutthttp://social.msdn.microsoft.com/Profile/en-US/?user=Kpbuttcalling Windows Service from WCF serviceHi,<br />here is my scenario:<br /><br />windows service which will check the FTP location every n minutes and parse any files posted in to a generic stream which can be written to DB.&nbsp; i also have a WCF service which also need to write the same type of generic stream to DB, obtained from another source (DB or Service).&nbsp; <br /><br />Can i call the windows service method which writes to DB from WCF service?&nbsp; <br /><br />Your help is always appreciated.&nbsp; Thanks, <hr class="sig" /> kashifTue, 06 Oct 2009 20:15:40 Z2009-11-24T19:24:16Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/ea81dccc-2dd8-41a7-aadc-82bfdce75e57http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/ea81dccc-2dd8-41a7-aadc-82bfdce75e57osocurioushttp://social.msdn.microsoft.com/Profile/en-US/?user=osocuriousMSMQ object count limitation?We have a WCF service using msmq binding and reading from a private queue. It works fine until the number of objects in the queue exceeds about 7000 (we have bursts of data being migrated). Then the service seems to still be running, but it stops reading from the queue. Stopping and starting the service makes it read a few more before it stops. If we do this a couple times until the count gets below about  7000, (not sure if thats the exact threshold), then it starts humming along and finishes all of them no problem. <div><br/></div> <div>The messages are fairly small, nowhere near the 4MB limit, more like 50 to 80K if that, just a lot of them. Has anyone seen this? Is it an MSMQ or WCF setting I can tweek?</div> <div>Thanks,</div> <div>Ken</div>Tue, 24 Nov 2009 18:59:51 Z2009-11-24T18:59:52Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/88c2b1f1-c1a1-4b64-af78-1cb44e5a1d6bhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/88c2b1f1-c1a1-4b64-af78-1cb44e5a1d6bEchilonhttp://social.msdn.microsoft.com/Profile/en-US/?user=EchilonService invalid?I'm trying to get WCF working with Silverlight. I'm a total beginner to WCF but have written asmx services in the past. For some reason when I uncomment more than one method in my service Silverlight refuses to let me use it, saying it is invalid. My code is below if anyone could help. I'm using the Entity Framework if that makes a difference.<br/> <br/> <pre lang="x-c#">[ServiceContract(Namespace = &quot;http://dummy&quot;)] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class MessageService { /// &lt;summary&gt; /// Sends a new message. /// &lt;/summary&gt; /// &lt;param name=&quot;recipientUsername&quot;&gt;The recipient username.&lt;/param&gt; /// &lt;param name=&quot;subject&quot;&gt;The subject.&lt;/param&gt; /// &lt;param name=&quot;messageBody&quot;&gt;The message body.&lt;/param&gt; [OperationContract] public void SendMessageByDetails(string recipientUsername, string subject, string messageBody) { MessageDAL.SendMessage(recipientUsername, subject, messageBody); } /// &lt;summary&gt; /// Sends a new message. /// &lt;/summary&gt; /// &lt;param name=&quot;msg&quot;&gt;The message to send.&lt;/param&gt; [OperationContract] public void SendMessage(Message msg) { MessageDAL.SendMessage(msg); } }</pre> <br/> <br/> The cryptic error I receive is:<br/> Custom tool error: Failed to generate code for the service reference 'MessageService'. Please check other error and warning messages for details. C:\Users\Echilon\Documents\Coding\MessageCentre\MessageCentre\Service References\MessageService\Reference.svcmapTue, 24 Nov 2009 15:16:56 Z2009-11-24T18:05:36Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/ac8eb797-4dfc-413c-8be4-8b94eb0d4b36http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/ac8eb797-4dfc-413c-8be4-8b94eb0d4b36mkeimhttp://social.msdn.microsoft.com/Profile/en-US/?user=mkeimHow to control SOAP address header and/or "mustUnderstand"-attribute in WCF clientHello all,<br/> <br/> using the following configuration, I'm trying to build a WCF-client for a non-WCF service that requires a SecurityContextToken for authentication.<br/> <br/> <pre lang=x-xml>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;customBinding&gt; &lt;binding name=&quot;TicketServiceBinding&quot;&gt; &lt;security includeTimestamp=&quot;false&quot; keyEntropyMode=&quot;ServerEntropy&quot; authenticationMode=&quot;SecureConversation&quot; messageSecurityVersion=&quot;WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11&quot;&gt; &lt;secureConversationBootstrap authenticationMode=&quot;UserNameOverTransport&quot; includeTimestamp=&quot;false&quot;&gt; &lt;issuedTokenParameters tokenType=&quot;http://schemas.xmlsoap.org/ws/2005/02/sc/sct&quot;&gt; &lt;issuer address=&quot;https://www.acme.com/services/STSWeak&quot;&gt; &lt;/issuer&gt; &lt;/issuedTokenParameters&gt; &lt;/secureConversationBootstrap&gt; &lt;/security&gt; &lt;textMessageEncoding maxReadPoolSize=&quot;64&quot; maxWritePoolSize=&quot;16&quot; messageVersion=&quot;Soap11WSAddressingAugust2004&quot; writeEncoding=&quot;utf-8&quot;&gt; &lt;readerQuotas maxDepth=&quot;32&quot; maxStringContentLength=&quot;8192&quot; maxArrayLength=&quot;16384&quot; maxBytesPerRead=&quot;4096&quot; maxNameTableCharCount=&quot;16384&quot; /&gt; &lt;/textMessageEncoding&gt; &lt;httpsTransport manualAddressing=&quot;false&quot; maxBufferPoolSize=&quot;524288&quot; maxReceivedMessageSize=&quot;65536&quot; allowCookies=&quot;false&quot; authenticationScheme=&quot;Anonymous&quot; bypassProxyOnLocal=&quot;false&quot; hostNameComparisonMode=&quot;StrongWildcard&quot; keepAliveEnabled=&quot;true&quot; maxBufferSize=&quot;65536&quot; proxyAuthenticationScheme=&quot;Anonymous&quot; realm=&quot;&quot; transferMode=&quot;Buffered&quot; unsafeConnectionNtlmAuthentication=&quot;false&quot; useDefaultWebProxy=&quot;true&quot; requireClientCertificate=&quot;false&quot;/&gt; &lt;/binding&gt; &lt;/customBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address=&quot;https://www.acme.com/services/TicketService&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;TicketServiceBinding&quot; contract=&quot;TicketServicePortType&quot; name=&quot;TicketService&quot;&gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt;</pre> <br/> The client actually (well, kind of) generates a RST to request the SCT before a service call:<br/> <br/> <pre lang=x-xml>&lt;s:Envelope xmlns:s=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:a=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot; xmlns:u=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;&gt; &lt;s:Header&gt; &lt;a:MessageID&gt;urn:uuid:0a64049f-39f6-44c0-84d8-cd405fd20f7b&lt;/a:MessageID&gt; &lt;a:Action s:mustUnderstand=&quot;1&quot;&gt;http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT&lt;/a:Action&gt; &lt;a:ReplyTo&gt; &lt;a:Address&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous&lt;/a:Address&gt; &lt;/a:ReplyTo&gt; &lt;a:To s:mustUnderstand=&quot;1&quot;&gt;https://www.acme.com/services/TicketService&lt;/a:To&gt; &lt;o:Security s:mustUnderstand=&quot;1&quot; xmlns:o=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;&gt; &lt;o:UsernameToken u:Id=&quot;uuid-ade5dd9a-3056-4ae0-bccc-7107d6ce414e-1&quot;&gt; &lt;o:Username&gt; &lt;!-- Removed--&gt; &lt;/o:Username&gt; &lt;o:Password&gt; &lt;!-- Removed--&gt; &lt;/o:Password&gt; &lt;/o:UsernameToken&gt; &lt;/o:Security&gt; &lt;/s:Header&gt; &lt;s:Body&gt; &lt;t:RequestSecurityToken xmlns:t=&quot;http://schemas.xmlsoap.org/ws/2005/02/trust&quot;&gt;&lt;br/&gt; &lt;t:TokenType&gt;http://schemas.xmlsoap.org/ws/2005/02/sc/sct&lt;/t:TokenType&gt; &lt;t:RequestType&gt;http://schemas.xmlsoap.org/ws/2005/02/trust/Issue&lt;/t:RequestType&gt; &lt;t:KeySize&gt;256&lt;/t:KeySize&gt; &lt;/t:RequestSecurityToken&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt;</pre> <br/> One problem with this request seems to be the SOAP address header (&lt;a:Action&gt;, &lt;a:To&gt;) and/or the &quot;mustUnderstand&quot;-attribute.<br/> The service responds with an error:<br/> <br/> <pre>Did not understand &quot;MustUnderstand&quot; header(s):</pre> <br/> Is there any way to control (remove) SOAP address header and/or to set the &quot;mustUnderstand&quot; attribute for those headers?<br/> <br/> <br/> <br/> Thanks &amp; Ciao,<br/> <br/> Markus<br/> <br/> <br/>Tue, 24 Nov 2009 17:48:27 Z2009-11-24T17:48:30Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/08f32522-846f-4045-b71c-763d04425eadhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/08f32522-846f-4045-b71c-763d04425eadPhillip Williamshttp://social.msdn.microsoft.com/Profile/en-US/?user=Phillip%20Williamswsdl:fault message value used by Java to create a FaultMessage per method using a long name instead of one Faultmessage name for all methods<p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman">I have a WCF where more than one method throws a FaultExpetion of a certain type (e.g. InvalidParameterInfo).<span>  </span></span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';font-size:10pt">[<span style="color:#2b91af">OperationContract</span>(Name = <span style="color:#a31515">&quot;Search&quot;</span>)]</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span>[<span style="color:#2b91af">FaultContract</span>(<span style="color:blue">typeof</span>(<span style="color:#2b91af">InvalidParameterInfo</span>), Name = <span style="color:#a31515">&quot;InvalidParameterFault&quot;</span>)]</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span><span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">AccountSummary</span>&gt; ListOfAccounts(<span style="color:blue">string</span> NTAccountName);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span>[<span style="color:#2b91af">OperationContract</span>(Name = <span style="color:#a31515">&quot;SearchByRecordRange&quot;</span>)]</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span>[<span style="color:#2b91af">FaultContract</span>(<span style="color:blue">typeof</span>(<span style="color:#2b91af">InvalidParameterInfo</span>), Name = <span style="color:#a31515">&quot;InvalidParameterFault&quot;</span>)]</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';font-size:10pt"><span>        </span><span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">AccountSummary</span>&gt; ListOfAccounts(<span style="color:blue">string</span> NTAccountName, <span style="color:blue">int</span> RangeStart, <span style="color:blue">int</span> RangeEnd);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman">The resulting wsdl contains 2 messages; one for each method; to define that FaultException. Each message has a name that is composed from the interface name, the method name and the type of the FaultException plus the suffix FaultMessage, e.g. IAccountService_Search_InvalidParameterFault_FaultMessage and IAccountService_SearchByRecordRange_InvalidParameterFault_FaultMessage</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman">When a proxy class is generated from this WSDL using Java, I get two classes with two different long names for the exception, e.g. IAccountServiceSearchInvalidParameterFaultFaultMessage and </span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman">IAccountServiceSearchByRecordRangeInvalidParameterFaultFaultMessage</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman">On the other hand a client written in .Net Framework does not generate those long names for the FaultExceptions because it uses the generic FaultException&lt; InvalidParameterFault&gt; to catch the exception from both methods.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small">How can I reach to a similar outcome in Java?<span>  </span>Do I need to change the way that WSDL was produced or do I need to do things differently in Java Beans when automatically creating the proxy classes?</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small">Here is a snippet of the generated WSDL</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:message</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">name</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">IAccountService_Search_InvalidParameterFault_FaultMessage</span>&quot;<span style="color:blue">&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:part</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">name</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">detail</span>&quot;<span style="color:blue"> </span><span style="color:red">element</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:InvalidParameterFault</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>  </span>&lt;/</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:message</span><span style="font-family:'Courier New';color:blue;font-size:10pt">&gt;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:message</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">name</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">IAccountService_SearchByRecordRange_InvalidParameterFault_FaultMessage</span>&quot;<span style="color:blue">&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:part</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">name</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">detail</span>&quot;<span style="color:blue"> </span><span style="color:red">element</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:InvalidParameterFault</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>  </span>&lt;/</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:message</span><span style="font-family:'Courier New';color:blue;font-size:10pt">&gt;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:portType</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">msc:usingSession</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">false</span>&quot;<span style="color:blue"> </span><span style="color:red">name</span><span style="color:blue">=</span>&quot;<span style="color:blue">IAccountService</span>&quot;<span style="color:blue">&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:operation</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">name</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">Search</span>&quot;<span style="color:blue">&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>      </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:input</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">wsaw:Action</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">urn:wsc.company.com/IAccountService/Search</span>&quot;<span style="color:blue"> </span><span style="color:red">message</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:IAccountService_Search_InputMessage</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>      </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:output</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">wsaw:Action</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">urn:wsc.company.com/IAccountService/SearchResponse</span>&quot;<span style="color:blue"> </span><span style="color:red">message</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:IAccountService_Search_OutputMessage</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>      </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:fault</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">wsaw:Action</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">urn:wsc.canaccord.com/IAccountService/SearchInvalidParameterFault</span>&quot;<span style="color:blue"> </span><span style="color:red">name</span><span style="color:blue">=</span>&quot;<span style="color:blue">InvalidParameterFault</span>&quot;<span style="color:blue"> </span><span style="color:red">message</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:IAccountService_Search_InvalidParameterFault_FaultMessage</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>&lt;/</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:operation</span><span style="font-family:'Courier New';color:blue;font-size:10pt">&gt;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:operation</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">name</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">SearchByRecordRange</span>&quot;<span style="color:blue">&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>      </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:input</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">wsaw:Action</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">urn:wsc.company.com/IAccountService/SearchByRecordRange</span>&quot;<span style="color:blue"> </span><span style="color:red">message</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:IAccountService_SearchByRecordRange_InputMessage</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>      </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:output</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">wsaw:Action</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">urn:wsc.company.com/ IAccountService/SearchByRecordRangeResponse</span>&quot;<span style="color:blue"> </span><span style="color:red">message</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:IAccountService_SearchByRecordRange_OutputMessage</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>      </span>&lt;</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:fault</span><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span><span style="font-family:'Courier New';color:red;font-size:10pt">wsaw:Action</span><span style="font-family:'Courier New';color:blue;font-size:10pt">=</span><span style="font-family:'Courier New';font-size:10pt">&quot;<span style="color:blue">urn:wsc.company.com/IAccountService/SearchByRecordRangeInvalidParameterFault</span>&quot;<span style="color:blue"> </span><span style="color:red">name</span><span style="color:blue">=</span>&quot;<span style="color:blue">InvalidParameterFault</span>&quot;<span style="color:blue"> </span><span style="color:red">message</span><span style="color:blue">=</span>&quot;<span style="color:blue">tns:IAccountService_SearchByRecordRange_InvalidParameterFault_FaultMessage</span>&quot;<span style="color:blue"> /&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>&lt;/</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:operation</span><span style="font-family:'Courier New';color:blue;font-size:10pt">&gt;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">&lt;/</span><span style="font-family:'Courier New';color:#a31515;font-size:10pt">wsdl:portType</span><span style="font-family:'Courier New';color:blue;font-size:10pt">&gt;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:Times New Roman;font-size:small">Here is a snippet of the generated java proxy class definition</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">@WebFault(name = &quot;InvalidParameterFault&quot;, targetNamespace = &quot;urn:wsc.company.com/&quot;)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">public class IAccountServiceSearchInvalidParameterFaultFaultMessage</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>extends Exception</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">{……}</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">@WebFault(name = &quot;InvalidParameterFault&quot;, targetNamespace = &quot;urn:wsc.company.com/&quot;)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">public class IAccountServiceSearchByRecordRangeInvalidParameterFaultFaultMessage</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt"><span>    </span>extends Exception</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-family:'Courier New';color:blue;font-size:10pt">{……}</span></p>Tue, 24 Nov 2009 17:07:56 Z2009-11-24T17:07:57Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/46ce43bf-4ce7-4ffb-9905-236ad0fdcb86http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/46ce43bf-4ce7-4ffb-9905-236ad0fdcb86malcolmxuhttp://social.msdn.microsoft.com/Profile/en-US/?user=malcolmxuIIS hosts WCF Service never work HI<br><br>maybe I need do some settings for my IIS, since all codes are generated by VS<br>what I did is<br><br>Create a new WCF Service Application project in VS build it , working<br><br>go to properties of this project, in tab Web, check Use IIS Web Server, click Create Virtual Directory, successful<br><br>then start to run this project, I got error in IE<br><br> <h2>HTTP Error 500.19 - Internal Server Error</h2> <h3>The requested page cannot be accessed because the related configuration data for the page is invalid.</h3> <p> <table cellspacing=0 cellpadding=0 border=0> <tbody> <tr class=alt> <th>Module</th> <td>IIS Web Core</td></tr> <tr> <th>Notification</th> <td>BeginRequest</td></tr> <tr class=alt> <th>Handler</th> <td>Not yet determined</td></tr> <tr> <th>Error Code</th> <td>0x800700b7</td></tr> <tr class=alt> <th>Config Error</th> <td>Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ScriptHandlerFactory' </td></tr> <tr> <th>Config File</th> <td>\\?\C:\Dev\WCF Test\WcfService3\web.config</td></tr></tbody></table></p> <div id=details-right> <table cellspacing=0 cellpadding=0 border=0> <tbody> <tr class=alt> <th>Requested URL</th> <td>http://localhost:80/WcfService3/</td></tr> <tr> <th>Physical Path</th> <td>C:\Dev\WCF Test\WcfService3\</td></tr> <tr class=alt> <th>Logon Method</th> <td>Not yet determined</td></tr> <tr> <th>Logon User</th> <td>Not yet determined</td></tr></tbody></table></div><br><br>in web.config<br><br><b><font size=2>119: &lt;remove name=&quot;WebServiceHandlerFactory-Integrated&quot;/&gt;<br><span class=highlight-code><i><font color="#cc0000">  120: &lt;add name=&quot;ScriptHandlerFactory&quot; verb=&quot;*&quot; path=&quot;*.asmx&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;</font></i></span><br>  121: &lt;add name=&quot;ScriptHandlerFactoryAppServices&quot; verb=&quot;*&quot; path=&quot;*_AppService.axd&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;<br></font></b><br><br>if I comment out all these in &lt;system.webserver&gt;, I can open the directory, but I can never add service reference, always get the error<br><br>There was an error downloading metadata from the address. please verify that you have entered a valid address<br><br>any suggestions?<br><br>thanksWed, 05 Nov 2008 21:49:21 Z2009-11-24T16:43:41Z