Click here to Skip to main content
15,881,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
CSS
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="info@phpcompiler.net" 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.
Posted

1 solution

I just have to add some declarations and my issue was solved..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900