Connection Refused / Secure Connection Failed

Hello,
Is there any certificate configuration required for the provided examples ?
The cert files are there, and they seem to be set with an appropriate expiration date. (tried importing one to check)
Runing the MVC (or WebForm) examples do not load. The browser page indicates a connection failure.
It seems like some cert error is happening.
Am I missing a step somewhere ? Following the documentation to run the projects as is. No other errors seen in building or running.

Checked file permissions, running VS as administrator. Any other troubleshooting steps ?

Thanks

No additional steps are required. The examples should run in the Visual Studio debugger without any issues. VS doesn’t need to be run as administrator.

Are you running these under Visual Studio’s IIS Express? This is how the projects are setup.

Do both the ExampleIdentityProvider and ExampleServiceProvider projects load? Are they displayed in the browser?

When do you get the connection refused?

[quote]
ComponentSpace - 1/9/2024
No additional steps are required. The examples should run in the Visual Studio debugger without any issues. VS doesn't need to be run as administrator.

Are you running these under Visual Studio's IIS Express? This is how the projects are setup.

Do both the ExampleIdentityProvider and ExampleServiceProvider projects load? Are they displayed in the browser?

When do you get the connection refused?

[/quote]

Yes, project are setup for IIS Express.
I choose the two ExampleIdentityProvider and ExampleServiceProvider, as startup projects. Or the MVC versions.
After they build visual studio launches a browser. The page in the browser https://localhost:44386/
With the content saying SECURE CONNECTION FAILED Error code:PR_CONNECT_RESET_ERROR.
This is using Firefox

Same issue using Edge, but error message is a bit different

It sounds like there’s some issue with the IIS Express or associated localhost certificate setup if the page at https://localhost:44386 doesn’t even display.

If you create a simple web application from the VS template and run it from the VS debugger/IIS Express and access it via HTTPS do you see the same issue?

[quote]
ComponentSpace - 1/9/2024
It sounds like there's some issue with the IIS Express or associated localhost certificate setup if the page at https://localhost:44386 doesn't even display.

If you create a simple web application from the VS template and run it from the VS debugger/IIS Express and access it via HTTPS do you see the same issue?

[/quote]

Thats a good thought.
I created and MVC app from template and that does work.
It uses the "localhost" certificate.
I'm assuming IIS is being used but need to confirm.

Also the component space examples will NOT use the localhost cert correct ? It has its own certs defined

The HTTPS transport uses the localhost certificates created by IIS Express.

These are different from the certificates used for SAML (ie signing messages, encrypting assertions). The certificates in the certificates folder under the projects are for SAML only. The transport certificates are those created by IIS Express.

[quote]
ComponentSpace - 1/9/2024
The HTTPS transport uses the localhost certificates created by IIS Express.

These are different from the certificates used for SAML (ie signing messages, encrypting assertions). The certificates in the certificates folder under the projects are for SAML only. The transport certificates are those created by IIS Express.

[/quote]

OK.
i switched to the .net core version of the examples to see if that would help. My other apps that look to work were at .net 6. So using .net 6 with the examples.

Same issue however. One additional thing getting a build error though it might not be affecting the page load:
From VS:
SeverityCodeDescriptionProjectFileLineSuppression State
ErrorMSB4018The "GenerateStaticWebAsssetsPropsFile" task failed unexpectedly.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\XXX\source\repos\SAMLSuite-evaluation2\SAMLv20.Core-evaluation\SAML for .NET Core\Examples\NET-6.0\SSO\BlazorServerIdentityProvider\obj\Debug\net6.0\staticwebassets\msbuild.BlazorServerIdentityProvider.Microsoft.AspNetCore.StaticWebAssets.props'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalWriteAllBytes(String path, Byte[] bytes, Boolean checkHost)
at Microsoft.AspNetCore.Razor.Tasks.GenerateStaticWebAsssetsPropsFile.ExecuteCore()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()BlazorServerIdentityProviderC:\Program Files\dotnet\sdk\7.0.401\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.Pack.targets141


Checking that staticwebssets folder it is completely empty. Issue with the download ?

All the examples should build cleanly so I’m not sure what’s going on here.

You could ignore the Blazor examples and try running the ExampleIdentityProvider and ExampleServiceProvider projects in the Visual Studio debugger/IIS Express.

Just to confirm, do you have other projects running in the Visual Studio debugger and using IIS Express with HTTPS on this machine that don’t have issues?

If the SAML projects won’t even display the home page without getting a SECURE CONNECTION FAILED, it sounds like an issue with the IIS Express certificates.

If so, I wouldn’t expect any projects to run in IIS Express using HTTPS.

If other projects do run, that’s very strange.