title: Unable to locate metadata for identity provider
body: <p>I'm trying to configure both Shibboleth service provider and identity provider on localhost for testing purposes.</p>
  
  <p>The problem is that I'm getting "unable to locate metadata for identity provider" error when trying to access a protected resource. </p>
  
  <p>I've already read all tutorials and discussions that are related to software configuration and this particular error fixing, but nothing works for me.</p>
  
  <p>shibboleth2.xml config for SP:</p>
  
  <pre><code>&lt;SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config"
  xmlns:conf="urn:mace:shibboleth:2.0:native:sp:config"
  xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
  xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"    
  xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
  clockSkew="180"&gt;
  
  &lt;InProcess logger="native.logger"&gt;
      &lt;ISAPI normalizeRequest="true" safeHeaderNames="true"&gt;
          &lt;Site id="1" name="localhost" /&gt;
      &lt;/ISAPI&gt;
  &lt;/InProcess&gt;
  
  &lt;TCPListener address="127.0.0.1" port="1600" acl="127.0.0.1" /&gt;
  
  &lt;StorageService type="Memory" id="mem" cleanupInterval="900" /&gt; 
  &lt;SessionCache type="StorageService" StorageService="mem" cacheAssertions="false" cacheAllowance="900" inprocTimeout="900" cleanupInterval="900" /&gt; 
  &lt;ReplayCache StorageService="mem" /&gt; 
  &lt;ArtifactMap artifactTTL="180" /&gt; 
  
  &lt;RequestMapper type="Native"&gt;
      &lt;RequestMap&gt;
          &lt;Host name="localhost"&gt;
              &lt;Path name="secure" authType="shibboleth" requireSession="true"/&gt;
          &lt;/Host&gt;
      &lt;/RequestMap&gt;
  &lt;/RequestMapper&gt;
  
  &lt;ApplicationDefaults  id="default" policyId="default"
      entityID="http://localhost/secure"
      homeURL="http://localhost/secure"
      signing="false" encryption="false"
      REMOTE_USER="eppn persistent-id targeted-id"&gt;
  
      &lt;Sessions lifetime="28800" timeout="3600" relayState="ss:mem" handlerURL="/Shibboleth.sso"
                checkAddress="false" handlerSSL="false" cookieProps="http"&gt;
          &lt;SSO entityID="https://bios-hp/idp/shibboleth"&gt;
            SAML2 SAML1
          &lt;/SSO&gt;
  
          &lt;Logout&gt;SAML2 Local&lt;/Logout&gt;
  
          &lt;Handler type="MetadataGenerator" Location="/Metadata" signing="false"/&gt;
          &lt;Handler type="Status" Location="/Status" acl="127.0.0.1 ::1"/&gt;
          &lt;Handler type="Session" Location="/Session" showAttributeValues="false"/&gt;
          &lt;Handler type="DiscoveryFeed" Location="/DiscoFeed"/&gt;
  
          &lt;md:AssertionConsumerService Location="/SAML2/POST" index="1"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/&gt;
          &lt;md:AssertionConsumerService Location="/SAML2/POST-SimpleSign" index="2"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"/&gt;
          &lt;md:AssertionConsumerService Location="/SAML2/Artifact" index="3"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/&gt;
          &lt;md:AssertionConsumerService Location="/SAML2/ECP" index="4"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"/&gt;
          &lt;md:AssertionConsumerService Location="/SAML/POST" index="5"
              Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"/&gt;
          &lt;md:AssertionConsumerService Location="/SAML/Artifact" index="6"
              Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"/&gt;
  
          &lt;LogoutInitiator type="Local" Location="/SLO/Logout"/&gt;
  
          &lt;md:SingleLogoutService Location="/SLO/SOAP"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/&gt;
          &lt;md:SingleLogoutService Location="/SLO/Redirect" conf:template="bindingTemplate.html"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/&gt;
          &lt;md:SingleLogoutService Location="/SLO/POST" conf:template="bindingTemplate.html"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/&gt;
          &lt;md:SingleLogoutService Location="/SLO/Artifact" conf:template="bindingTemplate.html"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/&gt;
  
          &lt;md:ManageNameIDService Location="/NIM/SOAP"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/&gt;
          &lt;md:ManageNameIDService Location="/NIM/Redirect" conf:template="bindingTemplate.html"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/&gt;
          &lt;md:ManageNameIDService Location="/NIM/POST" conf:template="bindingTemplate.html"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/&gt;
          &lt;md:ManageNameIDService Location="/NIM/Artifact" conf:template="bindingTemplate.html"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/&gt;
  
          &lt;md:ArtifactResolutionService Location="/Artifact/SOAP" index="1"
              Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/&gt;
      &lt;/Sessions&gt;
  
      &lt;Errors supportContact="root@localhost"
          helpLocation="/about.html"
          styleSheet="/shibboleth-sp/main.css"/&gt;
  
      &lt;MetadataProvider type="XML" file="C:/opt/shibboleth-sp/etc/shibboleth/idp.metadata.xml"/&gt;
  
      &lt;AttributeExtractor type="XML" validate="true" reloadChanges="false" path="attribute-map.xml"/&gt;
  
      &lt;AttributeResolver type="Query" subjectMatch="true"/&gt;
  
      &lt;AttributeFilter type="XML" validate="true" path="attribute-policy.xml"/&gt;
  
      &lt;CredentialResolver type="File" key="sp-key.pem" certificate="sp-cert.pem"/&gt;
  &lt;/ApplicationDefaults&gt;
  
  &lt;SecurityPolicyProvider type="XML" validate="true" path="security-policy.xml"/&gt;
  
  &lt;ProtocolProvider type="XML" validate="true" reloadChanges="false" path="protocols.xml"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>idp.metadata.xml references by SP config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://bios-hp/idp/shibboleth" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;IDPSSODescriptor protocolSupportEnumeration="urn:mace:shibboleth:1.0 urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol"&gt;&lt;Extensions&gt;&lt;shibmd:Scope regexp="false"/&gt;&lt;/Extensions&gt;&lt;KeyDescriptor&gt;&lt;ds:KeyInfo&gt;&lt;ds:X509Data&gt;&lt;ds:X509Certificate&gt;MIID...zY=&lt;/ds:X509Certificate&gt;&lt;/ds:X509Data&gt;&lt;/ds:KeyInfo&gt;&lt;/KeyDescriptor&gt;&lt;ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding" Location="https://bios-hp:8443/idp/profile/SAML1/SOAP/ArtifactResolution" index="1"/&gt;&lt;ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://bios-hp:8443/idp/profile/SAML2/SOAP/ArtifactResolution" index="2"/&gt;&lt;NameIDFormat&gt;urn:mace:shibboleth:1.0:nameIdentifier&lt;/NameIDFormat&gt;&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;&lt;SingleSignOnService Binding="urn:mace:shibboleth:1.0:profiles:AuthnRequest" Location="https://bios-hp/idp/profile/Shibboleth/SSO"/&gt;&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://bios-hp/idp/profile/SAML2/POST/SSO"/&gt;&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="https://bios-hp/idp/profile/SAML2/POST-SimpleSign/SSO"/&gt;&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://bios-hp/idp/profile/SAML2/Redirect/SSO"/&gt;&lt;/IDPSSODescriptor&gt;&lt;AttributeAuthorityDescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol"&gt;&lt;Extensions&gt;&lt;shibmd:Scope regexp="false"/&gt;&lt;/Extensions&gt;&lt;KeyDescriptor&gt;&lt;ds:KeyInfo&gt;&lt;ds:X509Data&gt;&lt;ds:X509Certificate&gt;MIID...SzY=&lt;/ds:X509Certificate&gt;&lt;/ds:X509Data&gt;&lt;/ds:KeyInfo&gt;&lt;/KeyDescriptor&gt;&lt;AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding" Location="https://bios-hp:8443/idp/profile/SAML1/SOAP/AttributeQuery"/&gt;&lt;AttributeService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://bios-hp:8443/idp/profile/SAML2/SOAP/AttributeQuery"/&gt;&lt;NameIDFormat&gt;urn:mace:shibboleth:1.0:nameIdentifier&lt;/NameIDFormat&gt;&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;&lt;/AttributeAuthorityDescriptor&gt;&lt;/EntityDescriptor&gt;
  </code></pre>
  
  <p>Note, that entityID in both files is equal as its the common reason for my error.</p>
  
  <p>The protected site is hosted on local IIS and is accessible via </p>
  
  <pre><code>http://bios-hp/secure 
  </code></pre>
  
  <p>URL where I get the error.</p>
  
  <p>All possible status URLs for both SP and IdP return successfull results.</p>
  
  <p>Any ideas?</p>