原文地址:http://www.cnblogs.com/mytechblog/articles/1897682.html
基于.net的web程序设计asp.net,我们就必须安装VS和IIS,但这二者安装的先后顺序是怎样的呢?到底哪个先装,那个后装?
正常情况是先装IIS,后装VS;这样就不会发生错误了,因为asp.net就可以注册写入到IIS中。如果先装VS,再装IIS,这样就会导致"访问IIS元数据库失败"。这时不需要重新安装VS,只要重新注册一下IIS就可以了,具体方法如下:
接着还会出现"未能创建 Mutex"的问题,解决方法如下:
原因:IIS没有注册
解决办法:
在CMD中进入目录C:WINDOWSMicrosoft.NETFrameworkv2.0.50727,运行aspnet_regiis
1、aspnet_regiis -ga administrator(administrator为当前用户)
2、aspnet_regiis -i (注册IIS)
3、iisreset /noforce (重启IIS)
操作详细:
C:Documents and SettingsAdministrator>cd c:\windows\microsoft.net\framework\v2.0.50727
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>aspnet_regiis -ga administrator
Start granting administrator access to the IIS metabase and other directories us
ed by ASP.NET.
Finished granting administrator access to the IIS metabase and other directories
used by ASP.NET.
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>aspnet_regiis -lv
2.0.50727.0 Valid C:WINDOWSMicrosoft.NETFrameworkv2.0.50727as
pnet_isapi.dll
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>aspnet_regiis -i
Start installing ASP.NET (2.0.50727).
..............
Finished installing ASP.NET (2.0.50727).
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>aspnet_regiis -lv
2.0.50727.0 Valid (Root) C:WINDOWSMicrosoft.NETFrameworkv2.0.50727as
pnet_isapi.dll
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>iisreset /noforce
Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>