title: WCF/SSL returning a blank page in IIS7
body: <p>I've been trying to resolve this for nearly 2 days and don't seem to be making much progress.  I have a WCF service set up (developed with VB in VWD2008).  When running this locally I am able to see the standard .svc help page with the link to the WSDL page.</p>
  
  <p>I moved this across to a server and retested in before trying to sercure it - still working OK.</p>
  
  <p>I then set up a self-signed certificate and this is where the problems seem to start.  I know the certificate authentication between my server and my PC works (Client certificate is set to required on IIS7) as I am able to hit a simple .aspx page when using https.  At this stage, when i try to browse to the .svc page 2 things are happening - in IE a blank page is being returned and in FF I am getting the following message on a yellow background</p>
  
  <pre><code>XML Parsing Error: no element found
  
  Location: https://www.database-direct.com/vs.svc
  
  Line Number 1, Column 1:
  </code></pre>
  
  <p>From what I've read, the difference is just due to FF handling blank pages differently.  </p>
  
  <p>I'm fairly sure that my web.config file is correct as it is almost a carbon copy of another service that is running successfully (albeit on a different server running IIS6 - would there be any differences in the config file?)</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  
  &lt;!--
      Note: As an alternative to hand editing this file you can use the 
      web admin tool to configure settings for your application. Use
      the Website-&gt;Asp.Net Configuration option in Visual Studio.
      A full list of settings and comments can be found in 
      machine.config.comments usually located in 
      \Windows\Microsoft.Net\Framework\v2.x\Config 
  --&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt;
        &lt;sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt;
          &lt;section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
          &lt;sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt;
            &lt;section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/&gt;
            &lt;section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
            &lt;section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
            &lt;section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
          &lt;/sectionGroup&gt;
        &lt;/sectionGroup&gt;
      &lt;/sectionGroup&gt;
    &lt;/configSections&gt;
    &lt;appSettings/&gt;
    &lt;connectionStrings /&gt;
    &lt;system.web&gt;
      &lt;!--
              Set compilation debug="true" to insert debugging 
              symbols into the compiled page. Because this 
              affects performance, set this value to true only 
              during development.
  
              Visual Basic options:
              Set strict="true" to disallow all data type conversions 
              where data loss can occur. 
              Set explicit="true" to force declaration of all variables.
          --&gt;
      &lt;compilation debug="true" strict="false" explicit="true"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
          &lt;add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;clear/&gt;
          &lt;add namespace="System"/&gt;
          &lt;add namespace="System.Collections"/&gt;
          &lt;add namespace="System.Collections.Specialized"/&gt;
          &lt;add namespace="System.Configuration"/&gt;
          &lt;add namespace="System.Text"/&gt;
          &lt;add namespace="System.Text.RegularExpressions"/&gt;
          &lt;add namespace="System.Linq"/&gt;
          &lt;add namespace="System.Web"/&gt;
          &lt;add namespace="System.Web.Caching"/&gt;
          &lt;add namespace="System.Web.SessionState"/&gt;
          &lt;add namespace="System.Web.Security"/&gt;
          &lt;add namespace="System.Web.Profile"/&gt;
          &lt;add namespace="System.Web.UI"/&gt;
          &lt;add namespace="System.Web.UI.WebControls"/&gt;
          &lt;add namespace="System.Web.UI.WebControls.WebParts"/&gt;
          &lt;add namespace="System.Web.UI.HtmlControls"/&gt;
        &lt;/namespaces&gt;
        &lt;controls&gt;
          &lt;add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;/controls&gt;
      &lt;/pages&gt;
      &lt;!--
              The &lt;authentication&gt; section enables configuration 
              of the security authentication mode used by 
              ASP.NET to identify an incoming user. 
          --&gt;
      &lt;authentication mode="Windows"/&gt;
      &lt;customErrors mode="Off"/&gt;
      &lt;!--
              The &lt;customErrors&gt; section enables configuration 
              of what to do if/when an unhandled error occurs 
              during the execution of a request. Specifically, 
              it enables developers to configure html error pages 
              to be displayed in place of a error stack trace.
  
          &lt;customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"&gt;
              &lt;error statusCode="403" redirect="NoAccess.htm" /&gt;
              &lt;error statusCode="404" redirect="FileNotFound.htm" /&gt;
          &lt;/customErrors&gt;
          --&gt;
      &lt;httpHandlers&gt;
        &lt;remove verb="*" path="*.asmx"/&gt;
        &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/&gt;
      &lt;/httpHandlers&gt;
      &lt;httpModules&gt;
        &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
      &lt;/httpModules&gt;
    &lt;/system.web&gt;
    &lt;system.codedom&gt;
      &lt;compilers&gt;
        &lt;compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;
          &lt;providerOption name="CompilerVersion" value="v3.5"/&gt;
          &lt;providerOption name="OptionInfer" value="true"/&gt;
          &lt;providerOption name="WarnAsError" value="false"/&gt;
        &lt;/compiler&gt;
      &lt;/compilers&gt;
    &lt;/system.codedom&gt;
    &lt;!--
          The system.webServer section is required for running ASP.NET AJAX under Internet
          Information Services 7.0.  It is not necessary for previous version of IIS.
      --&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false"/&gt;
      &lt;modules&gt;
        &lt;add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
      &lt;/modules&gt;
      &lt;handlers&gt;
        &lt;remove name="WebServiceHandlerFactory-Integrated"/&gt;
        &lt;add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;wsHttpBinding&gt;
          &lt;binding name="wsHttpEndpointBinding"&gt;
            &lt;security mode="Transport"&gt;
              &lt;transport clientCredentialType="Certificate"/&gt;
              &lt;message clientCredentialType="None"/&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="VSco.VSBehavior" name="VSco.VS"&gt;
          &lt;endpoint address="https://www.url.com/VS.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpointBinding" name="wsHttpEndPoint" contract="VSco.IVS"/&gt;
          &lt;endpoint address="mex" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpointBinding" name="mexEndpoint" contract="IMetadataExchange"/&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="VSco.VSBehavior"&gt;
            &lt;serviceCredentials&gt;
              &lt;serviceCertificate findValue="client" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName"/&gt;
            &lt;/serviceCredentials&gt;
            &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt;
            &lt;serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/&gt;
            &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>From what I have been seeing from looking into this, it would suggest some sort of IIS set up problem I think as the actual service seems to work OK.  the only other thing that I could think to check was the Handler Mappings but they check out OK - <code>svc-ISAPI-2.0-64</code> is mapped against <code>*.svc</code></p>
  
  <p>If anyone has any further suggestions as to how I can debug this (I have checked with Fiddler and am simply getting a status 200 on page load) or what may be causing it I would be very appreciative!</p>