本文介绍了Web配置文件出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I am trying to implement wordpress template on my windows server site. As soon as I tried to run the page I got an HTTP error 500.19 indicating me that my web config file is missing declaration. Here is what its saying:
The configuration section 'phpNet' cannot be read because it is missing a section declaration
My web.config file is:
<pre lang="xml"><?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Phalanger" path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
</handlers>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed">
<clear />
</httpErrors>
</system.webServer>
<system.web>
<globalization responseEncoding="utf-8" fileEncoding="utf-8" />
<httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
<pages validateRequest="false" />
</system.web>
<phpNet>
<compiler>
<set name="EnableStaticInclusions" value="true" />
</compiler>
<classLibrary>
<add assembly="PhpNetMySql, Version=3.0.0.0,Culture=Neutral,PublicKeyToken=2771987119c16a03" section="mysql" />
<add assembly="php_xml.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="xml" />
<add assembly="php_image.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="image" />
<add assembly="php_zlib.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="zlib" />
</classLibrary>
<error-control>
<set name="DisplayErrors" value="false" phpName="display_errors" />
</error-control>
<globalization>
<set name="PageEncoding" value="utf-8" />
</globalization>
<bcl>
<mailer>
<!-- SMTP server name used for sending e-mails. -->
<set name="SmtpServer" value="127.0.0.1" phpName="SMTP" />
<!-- SMTP server port used for sending e-mails. -->
<set name="SmtpPort" value="25" phpName="smtp_port" />
<!-- The default value of "From" header. -->
<set name="DefaultFromHeader" value="[email protected]" phpName="sendmail_from" />
</mailer>
</bcl>
</phpNet>
</configuration>
任何帮助都会受到赞赏,因为我陷入了这个问题,对我来说非常令人沮丧。
谢谢。
Any help would be appreciated as I am stuck in this matter and its quite frustrating for me.
Thanks.
推荐答案
这篇关于Web配置文件出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!