.net 2.0 和 4.0 共用服务器存在问题!

ASP.NET版本切换与权限问题
本文介绍了解决ASP.NET应用程序版本切换时需要重启服务的问题,并提供了一种无需重启服务的方法。同时,针对部署ASP.NET Web应用时出现的服务器应用程序不可用错误,给出了通过调整IIS访问权限来解决的具体步骤。

Changing the Framework version requires a restart of the W3SVC service.

分类: Asp.Net 521人阅读 评论(0) 收藏 举报

Changing the Framework version requires a restart of the W3SVC service. Alternatively, you can change the Framework version without restarting the W3SVC service by running: aspnet_regiis.exe -norestart -s IIS-Viirtual-Path
Do you want to continue (this will change the Framework version and restart the W3SVC service)?

 

安装vs2010,iis的.asp.net的版本不能更改了.

 

解决:

 

进入C:/WINDOWS/system32/inetsrv 打开

 

MetaBase.xml

 

查找你的iis目录名。

 

我的是“默认网站” 得到

 

<IIsWebServer Location="/LM/W3SVC/1461632812" AuthFlags="0" ServerAutoStart="FALSE" ServerBindings=":8080:" ServerComment="默认网站" />

 

cmd 输入:C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/aspnet_regiis.exe -norestart -s W3SVC/1461632812/Root

 

重新启动 World Wide Web 服务

 

 

重新打开iis发现版本是2.0

------------------------------------------------------------------

 

今天在部署一个ASP.NET 4.0 Web应用程序时,遇到下面一个很棘手的问题,出现下面的错误:

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.

翻译成中文:

服务器应用程序不可用
您试图在此 Web 服务器上访问的 Web 应用程序当前不可用。请点击 Web 浏览器中的“刷新”按钮重试您的请求。

管理员注意事项: 详述此特定请求失败原因的错误信息可在 Web 服务器的系统事件日志中找到。请检查此日志项以查明导致该错误发生的原因。

搜索了网上的大量资料,有三,如下:
1.重新开一个应用程序池,然后为这个目录单独指定这个池
2.访问权限的设置问题
3.重新装iis,再装framework

我的问题是属于第二个,访问权限的问题。做如下设置即可解决该问题:

在该web sites的virtual directory下,将Permissions设置一下,里面应包含
ASP.NET
IIs_WPG
Internet来宾帐户
System

设置后,一切运行正常.。

----------------------------------------------------------------

 

 

转载于:https://www.cnblogs.com/xmyy/articles/2420429.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值