Welcome Guest Search | Active Topics | Sign In | Register

ActionResult decorated with RenderAsPDF not working on MVC4 Options
DWarner
Posted: Tuesday, November 19, 2013 12:08:26 PM
Rank: Newbie
Groups: Member

Joined: 11/19/2013
Posts: 2
Hi, I'm trying to get a View on MVC4 to render as a PDF on MVC4 using the RenderAsPDF attribute but I am getting the following error:

Could not load file or assembly 'EO.Pdf.Mvc, Version=5.0.50.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc' or one of its dependencies. The system cannot find the file specified

I have referenced both EO.Pdf and EO.Pdf.Mvc4 assemblies and they appear in the site BIN folder. Permissions appear to be sufficient.

The assembly load trace if it helps is:

=== Pre-bind state information ===
LOG: User = IIS APPPOOL\ASP.NET V4.0 Integrated
LOG: DisplayName = EO.Pdf.Mvc, Version=5.0.50.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc
(Fully-specified)
LOG: Appbase = file:///D:/src/R0V05.servicing/CACC/Main/CSC Web/
LOG: Initial PrivatePath = D:\src\R0V05.servicing\CACC\Main\CSC Web\bin
Calling assembly : EO.Pdf.Mvc4, Version=5.0.50.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\src\R0V05.servicing\CACC\Main\CSC Web\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: EO.Pdf.Mvc, Version=5.0.50.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc
LOG: The same bind was seen before, and was failed with hr = 0x80070002.



Any ideas on how to fix this issue please?

Cheers,

David.
eo_support
Posted: Tuesday, November 19, 2013 12:24:49 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Please check whether EO.Pdf.Mvc.dll has the right version. All our DLLs are stronged name, so the version has to match exactly. Another possibility is the DLL file is corrupted. You can check the file size and the size of the file that's on your local machine (assuming it works on your local machine).

Thanks!
DWarner
Posted: Wednesday, November 20, 2013 7:04:34 AM
Rank: Newbie
Groups: Member

Joined: 11/19/2013
Posts: 2
Hi,

The issue was I had referenced EO.Pdf.Mvc4.dll but not EO.Pdf.Mvc.dll.. whoops!

Thanks.
eo_support
Posted: Wednesday, November 20, 2013 9:04:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Ah...that makes sense. Thanks for the update!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.