2012-11-12 39 views
0

直到现在我只在Visual Studio中使用这个web.config。但是,我现在试图将我的网站发布到IIS,并且存在与我的web.config相关的错误。它似乎崩溃了模块的配置数据。web.config引起iis问题

<?xml version="1.0"?> 

<configuration> 
    <system.web> 
     <compilation targetFramework="4.5" /> 
     <httpRuntime targetFramework="4.5" /> 
    </system.web> 
    <phpNet> 
    <classLibrary> 
     <add assembly="php_mcrypt.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="mcrypt" /> 
     <add assembly="php_curl.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl" /> 
    </classLibrary> 
    <scriptLibrary/> 
    </phpNet> 

</configuration> 

错误:

enter image description here

这张截图是试图增加一倍IIS的 “功能视图” 中点击任何一个 “要素” 的时候。但是如果我只是通过一个浏览器中点击网站上的错误是一样的:

The configuration section 'phpNet' cannot be read because it is missing a section declaration

phpNet是Phalanger,并应安装扩展,但我不知道如何检查。就像我说的,这个web.config和phalanger在visual studio中工作良好,所以我不知道什么是错的。特别是因为安装程序确实在iis中安装了样本。

回答

0

我发现这个张贴http://crdevelopment.net/2012/06/12/fixing-iis-error-the-configuration-section-system-web-extensions-cannot-be-read-because-it-is-missing-a-section-declaration/

害得我来检查应用程序池。 enter image description here

在哪一点我注意到那里倍数。我选择了phalangerAppPool,并摆脱了我的错误,但带来了一个新的。

Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

但是,这种错误是很多容易解决(fix

1

你缺少配置部分定义

<configSections> 
<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" /> 

没有这一点,.NET不知道“phpNet '配置部分。

此外,这意味着,您没有使用setup.exe安装Phalanger。这里有一些关于使用Phalanger没有正确安装的信息(重要的是关于配置的部分)http://www.php-compiler.net/blog/2011/installation-free-phalanger-web

+0

我发布的答案是怎么回事?因为一旦我开始使用“PhalangerAppPool”工作。 –

+0

我也最终将这些语句移到了.net/frameworks/v4/config目录下的master.config –