创建IIS WebApplication时出错 [英] Error creating IIS WebApplication

查看:169
本文介绍了创建IIS WebApplication时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用powershell在默认网站下添加了一个webApplication,如下所示:

I added a webApplication Under Default website using powershell as follows:

function CreateWebApplication([string]$WebApplicationName,[string]$AppPoolName,[string]$PhysicalPath)
{
    try
    {
    New-WebApplication -Name $WebApplicationName -Site 'Default Web Site' -PhysicalPath $PhysicalPath  -ApplicationPool $AppPoolName
    Write-Host "Created WebApplication :" $WebApplicationName
    }
    catch [Exception]
    {
    write-host $_.Exception.Message `n;
    }
}

它的创建很好,但当我看到这个在IIS中,它只有两个部分名称IIS和management.but如果我从IIS控制台做同样的事情,添加了三个部分名为ASP.net,IIS和管理。为什么我没有得到第三部分。如果我正在尝试另一件事为了启用同一目录浏览,它给出了一个无法检索目录浏览的错误,给出了applicationhost.config文件的一些问题。但是当我试图找到applicationhost.config文件时,它不在请求的位置C:\ Windows \ System32 \inetsrv。这里出了什么问题我无法完成。
请帮助:)

Its getting created fine,But when i am seeing this in IIS,it has only two section Names IIS and management.but if same thing i do from IIS console,three sections named ASP.net,IIS and management are added.Why i am not getting third section.Another thing if i am trying to enable directory browsing on same,its giving an error that unable to retrieve directory browsing giving some problem with applicationhost.config file.But when i am trying to find applicationhost.config file,its not there in the asked location "C:\Windows\System32\inetsrv".What is going wrong here i am not able to fin out. Please help :)

推荐答案

应用程序池很可能不是用创建的clr 版本。

The application pool is most likely not being created with a clr version.

如果从 IIS 打开应用程序池并查看 .NET 它会说的版本

If you open the application pool from IIS and look at the .NET version it will say

No managed code.

您可以创建应用程序池并指定 managedRuntime 版本。

You can create the app pool and specify the managedRuntime version.

这篇关于创建IIS WebApplication时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆