IIS 6.0的设置和排错

这两天因为在部署一个网站时出了问题,在网上搜了一下,有些东西值得收藏。

IIS 6.0 现在还是有很多问题,这点可以从网上的大量的问题看出来。IIS 6不是在IIS 5的基础上的升级,而是一个完全重写的新软件,因此出现这些问题就不奇怪了。

1 动态内容无法访问

IIS6把安全性作为最重要的设计原则,因此,在安装后,系统默认只允许访问静态网页,动态内容如asp,aspx等默认情况下是被禁止的。

要启用动态内容访问,到web service extensions中将 asp,aspx设置为enable即可。

2 IIS6中基本上不需要重启IIS服务,只需要重启应用程序池里的进程既可

3 IIS错误日志:系统日志中看不到太多东西,IIS自己的日志里有很多有价值的信息,IIS日志在c:/windows/system32/logfiles目录下,有好几个子目录,分别记录不同的信息。

4 测试IIS:在发生问题后,先要确定问题的源。确定那些request有效,那些无效。常用的测试类型

4.1 html, add a hello.htm

<HTML>

<BODY>

<H3>Hello World</H3>

</BODY>

</HTML>

4.2 asp文件

<%@ Language=VBScript %>
<html>
<body>
<%
Response.Write ("The time is now: " & Now() & "<p>")
Response.Write ("The authenticated user is (blank if anonymous) : " & _
         Request.ServerVariables("LOGON_USER") & _
         "<p>")
Response.Write ("The application pool that served this request is: " & _
         Request.ServerVariables("APP_POOL_ID") & _
         "<p>")
%>
</body>
</html>

4.3 aspx文件

<%@ Page Language="VB" Debug="True" Trace="True" %>
<%@ Import Namespace=System.Web%>

<HTML>
   <script language="VB" runat="server">
  
      Sub Page_Load(Src As Object, E As EventArgs)
        
      dim ctx as HttpContext = HttpContext.Current
        
      lblTime.Text = Now()
        lblUserIdentity.Text = ctx.Request.ServerVariables("LOGON_USER")
        lblAppPool.Text = ctx.Request.ServerVariables("APP_POOL_ID")
        
     End Sub

   </script>
   <body style="FONT: 8pt verdana">
     <form runat="server">
      The time is now:  
     <asp:Label id="lblTime" runat="server" /><p>
      The authenticated user is (blank if anonymous):
     <asp:Label id="lblUserIdentity" runat="server" /><p>
   The application pool that served this request is:
      <asp:Label id="lblAppPool" runat="server" /><p>
     </form>
   </body>
</HTML>

4.4  COM对象或net对象

做好一个简单的对象,如返回“hello world”部署到IIS的目录下。

5 重装

如果检查了半天还是搞不定,就只有最后一招-重装。

一般先重装NET framework,Net2.0使用aspnet_regiis /i  命令

如果不起作用,重装IIS吧

6  Cannot find iisadmin.mfl durring IIS 6.0 Install

I have a clean W2K3 SP1 machine and via the Mange Your Server app, I am
trying to install IIS. I keeps looking for several files that are not on
the CD, or in the Service pack, one of which I have listed in the subject.
the other files are:

iisadmin.mof
adsutil.vbs
asp.mfl
w3core.mfl
w3dt.mfl
w3dt.mof
w3isapi.mfl
achg.asp
aexp2b.asp
aexp4b.asp
iispwchg.dll

If I try the install from Add/Remove - Windows Components without selecting
ASP.NET, I can cancel the file, tell it to continue without the file, and it
appears to work, but I need to go back and manually install Active Server
Pages and Internet Data Connector and ASP.NET. What is missing from the
manual install that occurs with the wizard version?


Re: Cannot find iisadmin.mfl durring IIS 6.0 Install
I had the same problem yesterday. If you don't have a slipstreamed
install CD, you can fix it by:

1. Running the W2K3S SP1 install package
2. Copying the temporary I386 directory it creates to a safe location
3. Cancel the install wizard
4. At the add/remove program prompt for IISADMIN.mfl, point it to the
i386 safe location 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值