IIS 6.0的设置和排错

    技术2022-05-11  64

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

    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.mofadsutil.vbsasp.mflw3core.mflw3dt.mflw3dt.mofw3isapi.mflachg.aspaexp2b.aspaexp4b.aspiispwchg.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 InstallI had the same problem yesterday. If you don't have a slipstreamedinstall CD, you can fix it by:

    1. Running the W2K3S SP1 install package2. Copying the temporary I386 directory it creates to a safe location3. Cancel the install wizard4. At the add/remove program prompt for IISADMIN.mfl, point it to thei386 safe location 


    最新回复(0)