Asp.net和Kerberos身份验证

时间:2015-09-01 11:05:24

标签: asp.net asp.net-mvc windows-authentication kerberos

我尝试使用PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git C:\Users\Chandrasekar\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8-15530\bin\dnx.exe "C:\Users\Chandrasekar\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8-15530\bin\lib\Microsoft.DNX.PackageManager\Microsoft.DNX.PackageManager.dll" restore "C:\Users\Chandrasekar\Documents\Visual Studio 2015\Projects\DNX8\src\DNX8" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU" System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.DNX.PackageManager' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName) at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, FrameworkName targetFramework) at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, FrameworkName targetFramework) at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkName targetFramework) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 身份验证进行Asp.net MVC。 到目前为止,我还没有找到一个如何实现这个的好例子。

如何在ASP上使用Kerberos实现类似用户访问API服务器(我将在页面上显示信息,例如用户列表,文件列表等)的内容。净

我看到的许多网站都有退役内容或过时,就像这样 https://msdn.microsoft.com/en-us/library/ff649207.aspx

Kerberos也使用Windows帐户凭据,还是可以使用其他任何凭据?

现在我只有一个使用visual studio 2013创建的ASP.net MVC默认模板,(在创建项目时我勾选使用Windows身份验证) 当我运行页面时,我得到一个Hello,域\用户! )。

对不起,如果这似乎是一个愚蠢的问题,但我不知道从哪里开始。

1 个答案:

答案 0 :(得分:1)

Kerberos的东西不是通过MVC配置的,而是在IIS上处理的。 从IIS(身份验证),确保启用“Windows身份验证”(禁用匿名)和(选择“Windows身份验证”,单击“提供者”(右))“协商”,表示[尝试Kerberos,如果这不起作用,退回到NTLM]。

这是另一个S / O答案,讨论如何配置web.config以设置身份验证。 https://stackoverflow.com/a/4336423/283895

如果您需要帮助设置Kerberos,或者需要一些代码示例来获取经过身份验证的用户信息等.Microsoft在此页面上有一些很好的文档(步骤1-3)。 https://msdn.microsoft.com/en-us/library/ms998355.aspx