Is it possible to expose two base address in IIShttp://forums.asp.net/t/1797349.aspx/1?Is+it+possible+to+expose+two+base+address+in+IISSat, 28 Apr 2012 10:57:48 -040017973494953156http://forums.asp.net/p/1797349/4953156.aspx/1?Is+it+possible+to+expose+two+base+address+in+IISIs it possible to expose two base address in IIS <p>I have a service , which has&nbsp;two base address.</p> <p>But , when I host in IIS.</p> <p>Am getting only methods which are in first base address.</p> <p>this is my config file..</p> <p>---------------------------</p> <pre class="prettyprint">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt; &lt;configuration&gt; &lt;connectionStrings&gt; &lt;add name=&quot;DataObjects.Properties.Settings.NSpotIntegrationConnectionString&quot; connectionString=&quot;Data Source=XXXXXXX;Initial Catalog=NSpotIntegration;User ID=sa;Password=sa@123&quot; providerName=&quot;System.Data.SqlClient&quot; /&gt; &lt;/connectionStrings&gt; &lt;system.serviceModel&gt; &lt;services&gt; &lt;!--*******************************Purchase Service ***************************--&gt; &lt;service behaviorConfiguration=&quot;NSpotSecuredBehaviour&quot; name=&quot;WcfSOALibrary.Services.Marketing.NSpotService&quot;&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress=&quot;https://localhost:80/NSpotService&quot; /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;endpoint address=&quot;&quot; binding=&quot;wsHttpBinding&quot; contract=&quot;WcfSOALibrary.Services.Marketing.INSpotService&quot; bindingConfiguration=&quot;SecureBinding&quot;&gt; &lt;identity&gt; &lt;dns value=&quot;localhost&quot;/&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address=&quot;mex&quot; binding=&quot;mexHttpsBinding&quot; contract=&quot;IMetadataExchange&quot; /&gt; &lt;/service&gt; &lt;service behaviorConfiguration=&quot;VssplSecuredBehaviour&quot; name=&quot;WcfSOALibrary.Services.Marketing.MiddleTierService&quot;&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress=&quot;https://localhost:9006/VasudhaikaService&quot; /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;endpoint address=&quot;&quot; binding=&quot;wsHttpBinding&quot; contract=&quot;WcfSOALibrary.Services.Marketing.IMiddleTierService&quot; bindingConfiguration=&quot;SecureBinding&quot;&gt; &lt;identity&gt; &lt;dns value=&quot;localhost&quot;/&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address=&quot;mex&quot; binding=&quot;mexHttpsBinding&quot; contract=&quot;IMetadataExchange&quot; /&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=&quot;NSpotSecuredBehaviour&quot;&gt; &lt;serviceMetadata httpsGetEnabled=&quot;true&quot; /&gt; &lt;serviceDebug includeExceptionDetailInFaults=&quot;true&quot; /&gt; &lt;serviceThrottling maxConcurrentCalls=&quot;16&quot; maxConcurrentInstances=&quot;2147483647&quot; maxConcurrentSessions=&quot;10&quot;/&gt; &lt;dataContractSerializer maxItemsInObjectGraph=&quot;2147483647&quot; /&gt; &lt;bufferedReceive maxPendingMessagesPerChannel=&quot;2147483647&quot; /&gt; &lt;serviceCredentials&gt; &lt;userNameAuthentication userNamePasswordValidationMode=&quot;Custom&quot; customUserNamePasswordValidatorType=&quot;WcfSOALibrary.Authorize.VasudhaikaAuthorize,WcfSOALibrary&quot;/&gt; &lt;/serviceCredentials&gt; &lt;/behavior&gt; &lt;behavior name=&quot;VssplSecuredBehaviour&quot;&gt; &lt;serviceMetadata httpsGetEnabled=&quot;true&quot; /&gt; &lt;serviceDebug includeExceptionDetailInFaults=&quot;true&quot; /&gt; &lt;serviceThrottling maxConcurrentCalls=&quot;16&quot; maxConcurrentInstances=&quot;2147483647&quot; maxConcurrentSessions=&quot;10&quot;/&gt; &lt;dataContractSerializer maxItemsInObjectGraph=&quot;2147483647&quot; /&gt; &lt;bufferedReceive maxPendingMessagesPerChannel=&quot;2147483647&quot; /&gt; &lt;serviceCredentials&gt; &lt;userNameAuthentication userNamePasswordValidationMode=&quot;Custom&quot; customUserNamePasswordValidatorType=&quot;WcfSOALibrary.Authorize.NSpotAuthentication,WcfSOALibrary&quot;/&gt; &lt;/serviceCredentials&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name=&quot;SecureBinding&quot; maxBufferPoolSize=&quot;2147483647&quot; maxReceivedMessageSize=&quot;2147483647&quot; closeTimeout=&quot;01:59:00&quot; openTimeout=&quot;01:59:00&quot; receiveTimeout=&quot;01:59:00&quot; sendTimeout=&quot;01:59:00&quot;&gt; &lt;readerQuotas maxDepth=&quot;2147483647&quot; maxStringContentLength=&quot;2147483647&quot; maxArrayLength=&quot;2147483647&quot; maxBytesPerRead=&quot;2147483647&quot; maxNameTableCharCount=&quot;2147483647&quot; /&gt; &lt;security mode=&quot;TransportWithMessageCredential&quot;&gt; &lt;message clientCredentialType=&quot;UserName&quot;/&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled=&quot;true&quot;/&gt; &lt;/system.serviceModel&gt; &lt;system.transactions&gt; &lt;defaultSettings timeout=&quot;01:59:00&quot; /&gt; &lt;/system.transactions&gt; &lt;/configuration&gt;</pre> <p><br> <br> </p> <p></p> 2012-04-26T14:39:11-04:004954307http://forums.asp.net/p/1797349/4954307.aspx/1?Re+Is+it+possible+to+expose+two+base+address+in+IISRe: Is it possible to expose two base address in IIS <p>Hi gopikrsna,</p> <p>From the configuraiton fragment you provided, you actually have two WCF services defined in it and each of them has specify a baseAddress (http scheme) on different port. This will work for self-host case(when you use console or windows forms app...)</p> <p>However, when hosting in IIS/ASP.NET web application, things are much different. For IIS host, we need to use a .svc file (with the certain ServiceHostFactory specify in it) so that the WCF runtime will activate the WCF service instance based on the .svc file.&nbsp; And in such case, the base address of the WCF service is also tightly coupled with the .svc file. So if you use HTTP, then the base address is just like:</p> <p><a href="http://[iis">http://[iis</a> server name]/[webapp name]/service.svc</p> <p>if you configure it to use https, then the base address will be:</p> <p><a href="https://[iis">https://[iis</a> server name]/[webapp name]/service.svc</p> <p>the same applies when you use non-http protocol (via WAS) for WCF service hosted in IIS.</p> <p>Therefore, if you want to host two WCF services on different HTTP port in IIS, you will need to deploy them under separate site since each IIS site need to have a certain HTTP port bound for its HTTP binding.</p> <p>You can also get more about the WCF Addressing for IIS hosting at the &quot;IIS Addressing Considerations &quot; within the following article:</p> <p>#WCF Addressing In Depth <br> <a href="http://msdn.microsoft.com/en-us/magazine/cc163412.aspx#S3">http://msdn.microsoft.com/en-us/magazine/cc163412.aspx#S3</a></p> 2012-04-27T07:17:29-04:004956128http://forums.asp.net/p/1797349/4956128.aspx/1?Re+Is+it+possible+to+expose+two+base+address+in+IISRe: Is it possible to expose two base address in IIS <p>Thanks!!</p> 2012-04-28T10:57:48-04:00