Is there any way to run Thinktecture.IdentityServer.v2 in debugging mode with Visual studio 2013?

StackOverflow https://stackoverflow.com/questions/22653106

I would like to customize the Thinktecture.IdentityServer.v2 ,when I was run and open the "http://xxxx.xxxx:17852/InitialConfiguration/Index",it always showed me the "HTTP Error 404.0 - Not Found". how can I make it work?

有帮助吗?

解决方案

This can be done via IIS Express. However, an HTTPS endpoint must be configured as IdentityServer will redirect to an HTTPS URL if it is not running on a secure connection.

  1. Open the IdentityServer solution in Visual Studio

  2. Select the WebSite project

  3. Press F4 to open the Properties panel

  4. Change the SSL Enabled property to True

    enter image description here

  5. The SSL URL property is set with an HTTPS URL running on a different port

    enter image description here

  6. Copy the SSL URL value

  7. Open the Properties of the project

    enter image description here

  8. On the Web tab, set the Server to IIS Express and the Project URL to the SSL URL value enter image description here

  9. Save the project and press F5 to debug

  10. On the first run you will get a browser error about the untrusted certificate, click Continue

  11. Update the Relying Party application with the SSL URL as the STS endpoint

其他提示

Personally I would switch to local IIS because it is easier to manage (for me at least). Then create https binding and assign a SSL certificate. You could use xca to create CA and SSL certificate or you can reuse IIS Express certificate.

iis bindings

iis express development certificate

I know that it is not trusted but for this example it will do. But when you start integrating with some Portal you should have trusted SSL certificate issued to DNS name of the server.

Set IdentityServer to use local IIS

local IIS

Then run F5. You will see this page:

enter image description here

Click the red continue and you will get to initial configuration page:

enter image description here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top