PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Jul 10, 2024 6:22 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon May 30, 2011 10:43 am 
Offline

Joined: Thu May 26, 2011 5:23 am
Posts: 3
I wrote an app that produces a fairly complex PDF with lines, pictures etc. It works fine in my browser under the VB2008 built in web server. ... no problem but I don't want it local, it must run from a website.

When I publish the app I get this error.

System.BadImageFormatException: Could not load file or assembly 'PdfSharp, Version=1.31.1789.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb' or one of its dependencies. The module was expected to contain an assembly manifest.

I have created the simplest website, one page, one button with the code from your "hello " application verbatim.
I still get this error. Looks like perhaps the pdfsharp.dll is not correct? It is in the right place because if I remove it I get a different error.

Is there an "Idiots guide to getting PDF sharp to work" somewhere that I can read... I'm missing something basic possibly?

Can anyone help?


Top
 Profile  
Reply with quote  
PostPosted: Mon May 30, 2011 1:34 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
We have our websample:
http://www.pdfsharp.net/wiki/Clock-sample.ashx

We managed to get it running on IIS under Windows Server.
We don't have a step by step guide - this guide would need to be rewritten with every new version of IIS anyway.

Which Windows version? Which IIS?
Did you create an Application for your site?
Which Application Pool do you use?
Did you install/register .NET with IIS? Did you select the correct .NET version?

Could be a problem of 32 bit vs. 64 bit:
http://www.developmentalmadness.com/arc ... ption.aspx
http://www.davidmoore.info/2008/10/14/s ... exception/

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon May 30, 2011 3:08 pm 
Offline

Joined: Thu May 26, 2011 5:23 am
Posts: 3
Yes I did build an application for the site
I'm on Windows 7 32bit.
IIs or something similar is installed on some webserver at an ISP somewhere in the world ...I have no control over it or whats installed there. The rest of of my website on SQL Server works 100% .. I just need to be able to print something.

If have tried rebuilding the DLL for X86 only .. didn't change anything.
I put the DLL in the GAC
I put the DLL in the webroot\bin directory

The installer info I was after ( idiots guide...) are

Do I have to have any special settings in my web.config
do I have to alter anything in Assemblyinfo.vb

The program works so well locally but I have now been poking around for 3 days and have got absolutely nowhere yet on the website side... i'm going to have to try another product.


Top
 Profile  
Reply with quote  
PostPosted: Tue May 31, 2011 7:25 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
RodPrice wrote:
Do I have to have any special settings in my web.config
do I have to alter anything in Assemblyinfo.vb

None I know of.
We have full control over our IIS and we fiddle with Application and AppPool settings until it runs.

Recently 64 bit vs. 32 bit made things more complicated. The IIS of your ISP could be running 64 bit Windows.

Not my area of expertise. Rather a question for IIS experts than for PDFsharp experts.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group