我尝试按照这里的教程实现单点登录应用程序
http://geoffwebbercross.blogspot.com/2014/05/adding-azure-ad-single-sign-on-to.html我在azure中添加了一个活动目录,并为这个租户添加了一个用户。然后我在VS2013中构建了一个小应用程序。我使用组织账号,输入域名,登录并创建项目。在创建项目时,弹出一个对话框
资源"Application"的属性"identifieruri"的值无效
我关闭了它。我尝试在本地机器上运行该项目。它将包含如下信息:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module
IIS Web Core
Notification
Unknown
Handler
Not yet determined
Error Code
0x80070032
Config Error
The configuration section 'system.identityModel' cannot be read because it is missing a section declaration.
Config File
Requested URL
http:
Physical Path
Logon Method
Not yet determined
Logon User
Not yet determined
Request Tracing Directory
D:My DocumentsIISExpressTraceLogFiles
Config Source:
34: </system.web>
35: <system.identityModel>
36: <identityConfiguration>
More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file.
View more information »
有什么办法解决这个问题吗?
我不确定根本原因是什么(为什么你在创建项目时得到错误),但以下应该解决你在运行应用程序时看到的错误。
在web.config
的<configSections>
部分,您需要定义system.identityModel
部分。条目看起来应该像这样:
<configSections>
<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</configSections>