在Windows Server 2003 64位部署ASP.NET4.0

Host an Asp.Net 4.0 web application in IIS6 on Windows 2003 R2 SP2 x64.

C:\WINDOWS\microsoft.net\Framework
 
* 1.0.3705
 * 1.1.4322
 * 2.0.50727
 * 3.0
 * 3.5
 * 4.0.30319
 
and in C:\WINDOWS\microsoft.net\Framework64 the same except 1.0 and 1.1
 
IIS6 runs in 32 bit mode but there is no Asp.Net tab in the properties screen of the website. So I can't switch frameworks and don't know what frameworks runs in what applicationpool.


Solutions :

Open command prompt on your Server.
Go to the default path of Asp.Net 4.0 i.e. C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
 run the command aspnet_regiis -lk | find "28008" (the number is the identifier of your web site )
 
Command: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspn et_regiis -lk | find "28008"
 
Once you run the command, you will get the current Asp.Net version which is set for your web site & i.e. W3SVC/28008/ROOT/ 2.0.50727.3053
 
Once it's done, you need to run the command aspnet_regiis.exe -norestart -s "W3SVC/28008/ROOT/" that will Start registering ASP.NET (4.0.30319) recursively at W3SVC/28008/ROOT/.
 
Command: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspn et_regiis.exe -norestart -s "W3SVC/28008/ROOT/"
 
It will finished registering ASP.NET (4.0.30319) recursively at W3SVC/28008/ROOT/. There is no need to restart IIS on server.

 

附:详细列出IIS里的站点ID、描述、及物理目录 VBScript Script 文件 (.vbs)

Set ObjService=GetObject("IIS://LocalHost/W3SVC")
For Each obj3w In objservice
If IsNumeric(obj3w.Name) Then
sServerName=Obj3w.ServerComment
Set webSite = GetObject("IIS://Localhost/W3SVC/" & obj3w.Name & "/Root")
ListAllWeb = ListAllWeb & obj3w.Name & String(25-Len(obj3w.Name)," ") & obj3w.ServerComment & "(" & webSite.Path & ")" & vbCrLf

End If
Next
WScript.Echo ListAllWeb
Set ObjService=Nothing
WScript.Quit

放在:C:\inetpub\AdminScripts\目录下。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值