asp.net配置IIS后"服务器应用程序不可用"的解决办法 服务器应用程序不可用 您试图在此Web服务器上访问的Web应用程序当前不可用

本文介绍了当遇到服务器上的Web应用程序无法访问时的三种解决方法,包括重新注册.NET 2.0、新建应用连接池以及修改网站目录文件夹的访问权限。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

错误:服务器应用程序不可用  您试图在此Web服务器上访问的Web应用程序当前不可用。
请点击Web浏览器中的“刷新”按钮重试您的请求。管理员注意事项:详述此特定请求失败原因的错误消息可在Web服务器的系统事件日志中找到。请检查此日志项以明确该错误发生的原因。

方法一:重新注册.Net 2.0
原因大概是先安装了 .Net Framework后安装的IIS导致.Net没有在IIS注册
从.net命令行工具里运行aspnet_regIIS /u 卸载,再aspnet_regIIS /i 安装,然后重启IIS,删除“默认应用程序”,然后将站点重新创建为应用程序。
方法二:新建应用连接池
新建应用连接池的步骤
1. 单击“开始”,指向“程序”,然后单击“控制面板”。
2.双击“管理工具”,然后双击“Int.Net”信息服务(IIS)。
3.右击“应用程序池”,指向“新建”,然后单击“应用程序池”。
4.在“应用程序池ID”文本框中键入 AppPool1。
5.单击”确定“。
将应用程序分配到应用程序池
1.开始-->程序-->控制面板-->管理工具-->Inte.Net 信息服务(IIS)。
2.Web-->默认Web站点-->右击"DebugApp1",-->属性。
3.主目录-->应用程序池-->AppPoo1-->确定。


方法三:修改网站目录所在文件夹的访问权限
找到当前网站目录-->右键-->属性-->安全-->添加-->高级-->立即查找-->选择Users用户(或Everyone)->确定

【如果没有“安全”选项,可如下解决:
资源管理器-->工具-->文件夹选项-->查看-->去掉“使用简单文件共享(推荐)”前面的对勾-->确定】

 

我通过第一种方法解决了

<?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <!-- 有关如何配置 ASP.NET 应用程序的详细信息,访问 https://go.microsoft.com/fwlink/?LinkId=301879 --> <configuration> <appSettings> <add key=&quot;webpages:Version&quot; value=&quot;3.0.0.0&quot; /> <add key=&quot;webpages:Enabled&quot; value=&quot;false&quot; /> <add key=&quot;ClientValidationEnabled&quot; value=&quot;true&quot; /> <add key=&quot;UnobtrusiveJavaScriptEnabled&quot; value=&quot;true&quot; /> <add key=&quot;PostUserID&quot; value=&quot;Allgo&quot; /> <add key=&quot;PostPassword&quot; value=&quot;Allgo2024&quot; /> <!-- Allgo Database Connection Configuration --> <add key=&quot;SeverIP&quot; value=&quot;47.250.46.2,1433&quot; /> <add key=&quot;Database&quot; value=&quot;VMSDB&quot; /> <add key=&quot;UserId&quot; value=&quot;sa&quot; /> <add key=&quot;PWD&quot; value=&quot;Allgo@2020&quot; /> <!-- Common Parameters Configuration --> <add key=&quot;TimeOutValue&quot; value=&quot;10&quot; /> <add key=&quot;DateFormat&quot; value=&quot;M/d/yyyy&quot; /> <add key=&quot;DateTimeFormat&quot; value=&quot;M/d/yyyy HH:mm:ss.fff&quot; /> <add key=&quot;TimeFormat&quot; value=&quot;HH:mm:ss&quot; /> </appSettings> <system.web> <compilation targetFramework=&quot;4.7.2&quot; /> <httpRuntime targetFramework=&quot;4.7.2&quot; /> </system.web> <system.webServer> <handlers> <remove name=&quot;ExtensionlessUrlHandler-Integrated-4.0&quot; /> <remove name=&quot;OPTIONSVerbHandler&quot; /> <remove name=&quot;TRACEVerbHandler&quot; /> <add name=&quot;ExtensionlessUrlHandler-Integrated-4.0&quot; path=&quot;*.&quot; verb=&quot;*&quot; type=&quot;System.Web.Handlers.TransferRequestHandler&quot; preCondition=&quot;integratedMode,runtimeVersionv4.0&quot; /> </handlers> </system.webServer> <runtime> <assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;> <dependentAssembly> <assemblyIdentity name=&quot;Antlr3.Runtime&quot; publicKeyToken=&quot;eb42632606e9261f&quot; /> <bindingRedirect oldVersion=&quot;0.0.0.0-3.5.0.2&quot; newVersion=&quot;3.5.0.2&quot; /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=&quot;Newtonsoft.Json&quot; culture=&quot;neutral&quot; publicKeyToken=&quot;30ad4fe6b2a6aeed&quot; /> <bindingRedirect oldVersion=&quot;0.0.0.0-13.0.0.0&quot; newVersion=&quot;13.0.0.0&quot; /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=&quot;System.Web.Optimization&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /> <bindingRedirect oldVersion=&quot;1.0.0.0-1.1.0.0&quot; newVersion=&quot;1.1.0.0&quot; /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=&quot;Microsoft.Web.Infrastructure&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /> <bindingRedirect oldVersion=&quot;0.0.0.0-2.0.0.0&quot; newVersion=&quot;2.0.0.0&quot; /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=&quot;WebGrease&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /> <bindingRedirect oldVersion=&quot;1.0.0.0-1.6.5135.21930&quot; newVersion=&quot;1.6.5135.21930&quot; /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=&quot;System.Web.Helpers&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /> <bindingRedirect oldVersion=&quot;1.0.0.0-3.0.0.0&quot; newVersion=&quot;3.0.0.0&quot; /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=&quot;System.Web.WebPages&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /> <bindingRedirect oldVersion=&quot;1.0.0.0-3.0.0.0&quot; newVersion=&quot;3.0.0.0&quot; /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=&quot;System.Web.Mvc&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /> <bindingRedirect oldVersion=&quot;1.0.0.0-5.2.9.0&quot; newVersion=&quot;5.2.9.0&quot; /> </dependentAssembly> </assemblyBinding> </runtime> <system.codedom> <compilers> <compiler language=&quot;c#;cs;csharp&quot; extension=&quot;.cs&quot; type=&quot;Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot; warningLevel=&quot;4&quot; compilerOptions=&quot;/langversion:default /nowarn:1659;1699;1701&quot; /> <compiler language=&quot;vb;vbs;visualbasic;vbscript&quot; extension=&quot;.vb&quot; type=&quot;Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot; warningLevel=&quot;4&quot; compilerOptions=&quot;/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+&quot; /> </compilers> </system.codedom> </configuration> <!--ProjectGuid: 75F8D488-D85A-488A-AFEB-2E93D5646800-->
最新发布
06-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值