assembly wpdotnet could not be loaded when precompiling

Discussion about the open-source Phalanger [?] project.

assembly wpdotnet could not be loaded when precompiling

Postby deming14points » May 19th, 2013, 1:41 pm

Hi,

I'd like to remove all php files by precompiling wpdonet.

I then installed Phalanger and I created a batch file under my wpdotnet install with
"C:\Program Files (x86)\Phalanger 3.0\Bin\phpc" /target:web /root:. /recurse:. /out:Bin /static+ /debug-

as explained here
http://www.php-compiler.net/blog/2012/w ... c314894195

When running I got this error when precompiling "assembly wpdotnet could not be loaded ... An attempt was made to load from network ... "

Whereas it is not true, all files are local to the server :!:
deming14points
 
Posts: 8
Joined: May 11th, 2013, 1:13 pm

Re: assembly wpdotnet could not be loaded when precompiling

Postby Jakub Misek » May 19th, 2013, 2:16 pm

Hi,

Great you are trying wordpress on .NET!

web.config contains reference to WpDotNet assembly. So ensure, there is Bin\WpDotNet.dll file.

If not, just remove that reference from web.config. Otherwise, try to change that reference from
Code: Select all
<add assembly="WpDotNet"/>
to
Code: Select all
<add url="bin\wpdotnet.dll"/>


Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: assembly wpdotnet could not be loaded when precompiling

Postby deming14points » May 20th, 2013, 6:24 pm

Hello,

Thanks for your support: it works better. I removed all assembly reference in web.config then It compiled.


Still when browsing on wordpress I got error "Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

I then tried to add "Bin\PhpNetMysql.dll" but on compilation I got error "... could not be loaded. The given assembly name or codebase was invalid".
deming14points
 
Posts: 8
Joined: May 11th, 2013, 1:13 pm

Re: assembly wpdotnet could not be loaded when precompiling

Postby Jakub Misek » May 20th, 2013, 6:26 pm

Hi,

Great!

PhpNetMysql.dll has dependency. I understand that .NET exception is not much descriptive ...

PhpNetMysql.dll requires MySQL.Data.dll. Just copy this file into Bin.

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: assembly wpdotnet could not be loaded when precompiling

Postby deming14points » May 27th, 2013, 10:06 pm

>PhpNetMysql.dll requires MySQL.Data.dll. Just copy this file into Bin.

Well MySQL.Data.dll is already in Bin.
deming14points
 
Posts: 8
Joined: May 11th, 2013, 1:13 pm

Re: assembly wpdotnet could not be loaded when precompiling

Postby Jakub Misek » May 28th, 2013, 10:32 am

Also you have to ensure, the assembly is listed in your web.config

Code: Select all
<classLibrary><add assembly='PhpNetMySql' />...
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: assembly wpdotnet could not be loaded when precompiling

Postby deming14points » June 8th, 2013, 1:37 am

PhpNetMySql is already added :

Code: Select all
      <classLibrary>
         <clear/>
         <add assembly="WpDotNet"/>
         <add assembly='PhpNetCurl' />
         <add assembly='PhpNetIconv' />
        <add assembly='PhpNetMbstring' />
         <add assembly="PhpNetClassLibrary, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl"/>
         <add assembly="PhpNetMySql, Version=3.0.0.0,Culture=Neutral,PublicKeyToken=2771987119c16a03" section="mysql"/>
         
         <!-- Phalanger Professional Managed extensions -->
<!--          <add assembly="PhpNetCurl.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="curl" />
         <add assembly="PhpNetXml.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="xml" />
         <add assembly="PhpNetGd2.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="image" />
         <add assembly="PhpNetZlib.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="zlib" />
 -->      
         <!-- PHP Native extensions (Windows only) -->
<!--       <add assembly="php_curl.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl"/>
          <add assembly="php_xml.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="xml"/>
         <add assembly="php_gd2.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="image"/>
         <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>
deming14points
 
Posts: 8
Joined: May 11th, 2013, 1:13 pm

Re: assembly wpdotnet could not be loaded when precompiling

Postby Jakub Misek » June 18th, 2013, 10:19 am

It is possible, the assembly could not be loaded; in such case your first request to WordPress page would show an ASP.NET error message.

Otherwise I'm not sure what could be wrong. Could you please add
Code: Select all
phpinfo();
e.g. to index.php file, and check whether there is MySQL extension loaded? (or attach the output here)

Thanks!
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 2 guests

cron

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 124 on September 25th, 2020, 6:57 am

Users browsing this forum: No registered users and 2 guests