【发布时间】:2011-05-06 00:00:47
【问题描述】:
你好:
我有一个端口号为 99 的 SSL 网站。在我的 web.config 中,为了通过这个 SSL 端口,我必须进行哪些更改以及在哪里进行更改?
这是我的 Web.Config 文件:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Test.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
</connectionStrings>
<system.web>
<compilation debug="false" targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="Default.aspx" timeout="2880" />
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
</system.web>
<system.webServer>
<security>
<access sslFlags="Ssl"/>
</security>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
网站向我显示了这个错误:
页面无法显示 您尝试执行 CGI, ISAPI 或其他可执行程序 来自不允许的目录
要执行的程序。
请尝试以下方法: •联系 网站管理员,如果您 相信这个目录应该允许 执行访问。 HTTP 错误 403.1 - 禁止:执行访问被拒绝。
互联网信息服务 (IIS)
这是我的 IIS 6.0 设置的样子:
不知道这里应该做什么?有人对此有任何想法吗?谢谢!
【问题讨论】:
-
这看起来像是 IIS 配置问题。您能否找到有关您托管网站的基础架构的更多信息(IIS6 与 IIS7/7.5 等)。 http/https 端口也是在 IIS 中配置的,这就是为什么在 Web.Config 中找不到配置项
-
这是一个 IIS 配置错误。您需要授予 Web 应用程序的执行权限。正如@Tr1stan 所说,您如何做到这一点取决于您运行的 IIS 版本。
标签: c# asp.net web-config web-deployment