Web.config : Impossible de trouver les informations de schéma
Bonjour,
Je travaille à ce moment avec une application web où j'ai installé le package SAML2 (avec NuGet). Pour configurer ce package, j'ai ajouté dans mon Web.config les lignes:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| <?xml version="1.0" encoding="utf-8"?>
<!--
Pour plus d'informations sur la configuration de votre application ASP.NET, consultez
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="saml2" type="SAML2.Config.Saml2Section, SAML2" />
</configSections>
<!--
Pour obtenir une description des modifications de web.config, voir http://go.microsoft.com/fwlink/?LinkId=235367.
Les attributs suivants peuvent être définis dans la balise <httpRuntime>.
<system.Web>
<httpRuntime targetFramework="4.5.1" />
</system.Web>
-->
<system.web>
<compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.webServer>
<handlers>
<remove name="SAML2.Protocol.Saml20SignonHandler" />
<remove name="SAML2.Protocol.Saml20LogoutHandler" />
<remove name="SAML2.Protocol.Saml20MetadataHandler" />
<add name="SAML2.Protocol.Saml20SignonHandler" verb="*" path="Login.ashx" type="SAML2.Protocol.Saml20SignonHandler, SAML2" />
<add name="SAML2.Protocol.Saml20LogoutHandler" verb="*" path="Logout.ashx" type="SAML2.Protocol.Saml20LogoutHandler, SAML2" />
<add name="SAML2.Protocol.Saml20MetadataHandler" verb="*" path="Metadata.ashx" type="SAML2.Protocol.Saml20MetadataHandler, SAML2" />
</handlers>
</system.webServer>
<saml2>
<serviceProvider id="urn:SPName" server="http://localhost:9311">
<endpoints>
<endpoint localpath="Login.ashx" type="signon" redirectUrl="~/AuthenticatedHomePage" />
<endpoint localpath="Logout.ashx" type="logout" redirectUrl="~/HomePage" />
<endpoint localpath="Metadata.ashx" type="metadata" />
</endpoints>
</serviceProvider>
<identityProviders metadata="C:\Users\monUser\Desktop\IdPMetadata.xml"/>
</saml2>
<appSettings />
<connectionStrings />
</configuration> |
J'ai 2 soucis avec ce fichier :
- Dans Visual Studio, j'ai plusieurs messages du type : Impossible de trouver les informations de schéma pour l'élément 'saml2', où saml2 peut être saml2, serviceProvider, id, localpath, ... (tout ce qui j'ai dans mes balises <saml2>).
- Si j'exécute mon projet depuis Visual Studio, j'ai une page que s'affiche (http://localhost:9311), mais si j'essaye de rajouter un de mes "endpoints" (Login.ashx par exemple : http://localhost:9311/Login.ashx), j'ai un erreur que dit : Attribut 'localpath' non reconnu. Notez que les noms d'attributs respectent la casse.
Est-ce que ces deux soucis peuvent être liées ?
En sachant que j'ai pris cette configuration depuis le site du projet SAML2, est-ce que les configurations indiquées peuvent ne pas être bonnes ?
Je vous remercie d'avance pour votre aide,
Marc