注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

水滴石穿

破浪是阵风!

 
 
 

日志

 
 

.NET 4 and IIS6 Changing version without W3SVC service restart  

2012-10-30 10:03:30|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

If you ever installed a .NET 4.0 application on a Windows 2003 machine with IIS6 you most likely encountered the following error message when attempting to modify the ASP.NET version.

“Changing the Framework version requires a a restart of W3SVC service.  Alternatively, you can change the Framework version without restarting the W3SVC service by running: aspnet_regiis.exe –norestart –s IIS-Virtual-Path”

Since sounds like exactly what I want to do, I don’t want to restart the W3SVC service just to change my framework version on my new application, now how do I get the IIS-Virtual-Path.

Open up a command prompt and navigate to C:\Windows\Microsoft.NET\Framework\v4.0.30319> and type aspnet_regiis.exe –lk list the full path for the IIS application.

Example:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -lk
W3SVC/  1.1.4322.2470 
W3SVC/1/ROOT/   1.1.4322.2470 
W3SVC/1/ROOT/SomePath/SomeFolder/       1.1.4322.2470

*note, if your new application is not listed simply copy the first portion to be used in the next step W3SVC/1/ROOT/

Copy down the root path of your new application you wish to change to .NET 4.0.

Back in the command prompt again and type aspnet_regiis.exe -norestart -s W3SVC/1/ROOT/SomePath/SomeFolder/

Example:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -norestart -s W3SVC/1/ROOT/OnlineBankingHelpers/SomeFolder/
Start registering ASP.NET (4.0.30319) recursively at W3SVC/1/ROOT/SomePath/SomeFolder/.
Finished registering ASP.NET (4.0.30319) recursively at W3SVC/1/ROOT/SomePath/SomeFolder/.

Now if you run aspnet_reggiis.exe –lk you can see the framework version changed without a restart of the root service.

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -lk
W3SVC/  1.1.4322.2470 
W3SVC/1/ROOT/   1.1.4322.2470 
W3SVC/1/ROOT/SomePath/SomeFolder/  4.0.30319.0

  评论这张
 
阅读(223)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017