.net framework多个版本在IIS服务器上时应注意-重新注册IIS-错误Server Application Unavailable

时间:2023-03-10 06:29:07
.net framework多个版本在IIS服务器上时应注意-重新注册IIS-错误Server Application Unavailable

  今天客户一个附件上传的应用程序报错,服务器安装了.net 4.0 framework(还有1.0和2.0版本),因为有网站程序需要用到2.0,配置好站点后,附件程序是用的2.0,Mail程序选择版本为4.0,当访问Mail程序后再访问附件程序出错,错误代码如下

Server Application Unavailable

The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

经过测试,查找,终于解决了,

总结如下:

出现服务不可用错误,最常规的办法是

1.查看IIS中的.net版本选择是否选择正确

2.如果版本不同,需要单独为增加一个应用程序池,具体原因是IIS 应用程序隔离机制造成的,可以百度搜索下。(我的错误就是这个);

3.如果以上都不没有错误的话,看看站点文件夹是否增加了User用户组

常见就这几种情况,其他的要具体在分析了。(转)

再记录一下重新把framework注册到IIS命令:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i