Click here to Skip to main content
15,668,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Dear i ave followed steps given in this Link

when I debug the application, I am getting Error
This site can’t be reached

What I have tried:

   <add key="ida:ADFSMetadata" value="https://***/adfs/ls/FederationMetadata/2007-06/FederationMetadata.xml" />
  <add key="ida:Wtrealm" value="https://***/testapp/" />

public partial class Startup
       public void Configuration(IAppBuilder app)

public partial class Startup
       private static string realm = ConfigurationManager.AppSettings["ida:Wtrealm"];
       private static string adfsMetadata = ConfigurationManager.AppSettings["ida:ADFSMetadata"];

       public void ConfigureAuth(IAppBuilder app)

           app.UseCookieAuthentication(new CookieAuthenticationOptions());

               new WsFederationAuthenticationOptions
                   Wtrealm = realm,
                   MetadataAddress = adfsMetadata
Updated 13-Feb-23 0:08am

1 solution

As per your link, a reference to ensuring the path is correct to your ADFS server -

The path to the ADFS XML metadata is always your ADFS server FQDN, followed by a path to the FederationMetadata XML document

To solve your problem, check spelling, exact path etc. If you can reach the ADFS server in your browser, then you are ready to configure an ASP.NET application to use ADFS for authentication.
Share this answer
$ultaNn 14-Feb-23 2:49am    
The path was wrong, and I have to install certificate to my localhost it worked fine after these steps

C:\Program Files (x86)\IIS Express>
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:***/ -UseSelfSigned

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900