[Ultimate PDF] Could not load file or assembly 'System.Net.Http, Version=4.0.0.0 on Platform 11.9.0

Forge Component
(15)
Published on 14 Sep by Leonardo Fernandes
15 votes
Published on 14 Sep by Leonardo Fernandes

Good Morning,

We updated our OutSystems Platform to 11.9.0 and now we are getting an error with Ultimate PDF when trying to load the module.  Would you need to push out an update to your component to fix this issue so it's compatible with the latest version of System.Net.Http 4.6 used with 11.9.0.


Ultimate PDF is looking for System.Net.Http, Version=4.0.0.0 and it's not finding it as it depends on it for methods so when it's not found it throw the following error:

Protocol error(Page.navigate): Target closed. (NetworkManager failed to process Network.requestWillBeSent. Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified..    at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)

Hi Justin,


We're having the similar error (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified) on an own developed espace, which uses no external extensions... 


We're still trying to chase the problem but no luck yet.


I will post you something if i find anything that might help you.



hi, may I know how you fixed this problem?

Hi,

Maybe this is caused of the Forge compone uses an extension with references to older versions of microsoft assemblies. 

Platform 11.9 upgrades Microsoft.AspNetCore and Microsoft.Extension libraries to the latest 2.1 LTS (Long-Term Support) versions. (RRCT-2896) This could be the cause of the references to break. 

You could try to open the extension in microsoft visual studio and see if there are outdated microsoft assemblies referenced, fix them and rebuild the project.

Regards,

Daniel

Here we solve by opening the extension and recompiling

Rafael Salomão wrote:

Here we solve by opening the extension and recompiling

 

Can you be more specific on the steps you took to recompile & fix this issue?  I have tried recompiling and even updating all of the Nuget packages, but we still have this same error.


Thanks!

Ross

Ross Hoaglund wrote:

Rafael Salomão wrote:

Here we solve by opening the extension and recompiling

 

Can you be more specific on the steps you took to recompile & fix this issue?  I have tried recompiling and even updating all of the Nuget packages, but we still have this same error.


Thanks!

Ross

 

 Hi Ross,

First, open the extension, update the assemblies then compile the solution.

Second step, and I think the main one, was to change the deploy action to "ignore" in System.net.Http.dll

Before:

After:


Publish the extension and republish your modules.

 

Rafael Salomão wrote:

Ross Hoaglund wrote:

Rafael Salomão wrote:

Here we solve by opening the extension and recompiling

 

Can you be more specific on the steps you took to recompile & fix this issue?  I have tried recompiling and even updating all of the Nuget packages, but we still have this same error.


Thanks!

Ross

 

 Hi Ross,

First, open the extension, update the assemblies then compile the solution.

Second step, and I think the main one, was to change the deploy action to "ignore" in System.net.Http.dll

Before:

After:


Publish the extension and republish your modules.

 


 

 Thanks Rafael!!  Ignoring the System.net.http.dll was the trick!

Rafael Salomão wrote:

Ross Hoaglund wrote:

Rafael Salomão wrote:

Here we solve by opening the extension and recompiling

 

Can you be more specific on the steps you took to recompile & fix this issue?  I have tried recompiling and even updating all of the Nuget packages, but we still have this same error.


Thanks!

Ross

 

 Hi Ross,

First, open the extension, update the assemblies then compile the solution.

Second step, and I think the main one, was to change the deploy action to "ignore" in System.net.Http.dll

Before:

After:


Publish the extension and republish your modules.

 


 What a pity. Your shared solution is great. But we still can't solve our problem, now below errors occurs:


What else can we do?

 

Cathy Wu wrote:

...

Hi Cathy, it looks like you have a certificate issue on that page that opens the pdf, or

It could also be the wrong date and time on the server.

Thanks Daniël and Rafael for your solutions!

A new version was released, that should solve this issue.


Cathy Wu, your latest error is related to invalid SSL certificates. A typical solution is to use a relative URL such as "/Module/Screen.aspx" instead of an absolute URL. Let me know if that fixes your issue.

Leonardo Fernandes wrote:

Thanks Daniël and Rafael for your solutions!

A new version was released, that should solve this issue.


Cathy Wu, your latest error is related to invalid SSL certificates. A typical solution is to use a relative URL such as "/Module/Screen.aspx" instead of an absolute URL. Let me know if that fixes your issue.

 Great, thanks for your reminding. The issue is fixed in this way.