2017-08-04 21 views
0

我已在我的本地系统IIS 10,Windows 10上启用了Windows身份验证的MVC 4应用程序。预期。但是,如果我将链接分享给组织http://inenanandv4l5c:8082/http://10.30.78.41:8082/中的其他人,则Windows身份验证不会成功,它会一直询问密码和用户名,并最终在尝试3次后失败。 我搜索了几乎所有相关的解决方案和谷歌搜索,但没有建议的设置工作。 我正在使用ApplicationPoolIdentity进行标识设置。托管在本地IIS 10(Windows 10)上的应用程序在其他系统上失败的Windows身份验证

任何想法?

编辑添加的Web配置

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <configSections> 
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 

    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> 
    </configSections> 
    <connectionStrings> 

    </connectionStrings> 
    <log4net> 
    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> 
     <layout type="log4net.Layout.PatternLayout"> 
     <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" /> 
     </layout> 
    </appender> 
    <appender name="RollingFile" type="log4net.Appender.RollingFileAppender"> 
     <file value="C:\Logging\" /> 
     <appendToFile value="true" /> 
     <rollingStyle value="Date" /> 
     <datePattern value="yyyyMMdd" /> 
     <layout type="log4net.Layout.PatternLayout"> 
     <conversionPattern value="%date %level %thread %logger - %message%newline" /> 
     </layout> 
    </appender> 
    <root> 
     <level value="DEBUG" /> 
     <!--<appender-ref ref="ConsoleAppender" />--> 
     <appender-ref ref="RollingFile" /> 
    </root> 
    </log4net> 
    <appSettings> 
    <add key="webpages:Version" value="3.0.0.0" /> 
    <add key="webpages:Enabled" value="false" /> 
    <add key="ClientValidationEnabled" value="true" /> 
    <add key="UnobtrusiveJavaScriptEnabled" value="true" /> 
    <add key="APPVERSION" value="V2.0" /> 
    </appSettings> 
    <system.web> 
    <authentication mode="Windows" /> 
    <compilation debug="true" targetFramework="4.5" /> 
    <httpRuntime targetFramework="4.5" /> 
    <identity impersonate="false" /> 
    <customErrors mode="On" /> 
    </system.web> 
    <system.webServer> 
    <modules> 
     <!--<remove name="FormsAuthentication" />--> 
    </modules> 
    <security> 
     <requestFiltering> 
     <requestLimits maxQueryString="327680" /> 
     </requestFiltering> 
    </security> 
    <httpErrors> 
     <remove statusCode="403" subStatusCode="-1"/> 
     <error statusCode="403" path="AccessDenied/Index" responseMode="ExecuteURL" /> 
    </httpErrors> 
    </system.webServer> 
    <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentAssembly> 
     <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> 
     <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
     </dependentAssembly> 
    </assemblyBinding> 
    </runtime> 
    <entityFramework> 
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> 
     <parameters> 
     <parameter value="mssqllocaldb" /> 
     </parameters> 
    </defaultConnectionFactory> 
    <providers> 
     <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> 
    </providers> 
    </entityFramework> 
    <system.codedom> 
    <compilers> 
     <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" /> 
     <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" /> 
    </compilers> 
    </system.codedom> 
</configuration> 

回答

0

1.Verify用户(IIS应用程序池\ MyApplicationPoolName)的“应用程序池”,其中应用程序正在运行的,有必要的权限应用所在的位置。 enter image description here enter image description here

2.Verify您的应用程序供应商在此为了让Windows身份验证设置: 1. NTLM 2.协商 enter image description here

变化身份冒充true

<system.web> 
<authentication mode="Windows" /> 
<compilation debug="true" targetFramework="4.5" /> 
<httpRuntime targetFramework="4.5" /> 
<identity impersonate="true" /> 
<customErrors mode="On" /> 

+0

你能解释一点吗?什么是(IIS AppPool \ MyApplicationPoolName)?我需要检查我的应用程序池名称是否是苹果? –

+0

我试过这个,但它没有工作 –

+0

你不能提供你的web.config的例子 – ThaNet

相关问题