cloud, codes, AI

14 September 2026

Federated Identity Issues when use self-signed certificate

Last week, we delivered a federated development workshop with Visual Studio 2015 and Active Directory. During the workshop exercises, we found that the self-signed certificate will make the Visual Studio project. One of our researcher, Sonny shows us the solution below.

Problem

You create a web application that use federated identity such as Active directory. However, during the development we faced an error because it used self-signed certification.

Cause

It might be because the compatibility issues on Visual Studio and Self-Signed Certification

Solution

  • Add this codes on Global.asax.cs (Source)

    ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

  • Web config error. (Source)

    for 4.5 and C#5 –

    type=”Microsoft.CSharp.CSharpCodeProvider…

    for 4.6 and C#6 –

    type=”Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″


Discussion

Leave a Reply

Discover more from ridilabs

Subscribe now to keep reading and get access to the full archive.

Continue reading