Free Support Forum -

Error when running on server

I am developing using Aspose.Excel.Express and Aspose.Powerpoint products. My code works well on the development machine but when I depoly to my server I get the following error when creating Excel or PowerPoint files.

[BadImageFormatException: !“ValueType mismatch”]…ctor() +0
Aspose.Office.h…ctor(String name) +21…ctor() +76
Aspose.Office.t…ctor() +30
Aspose.Office.t…ctor(Stream stream) +25
Aspose.PowerPoint.Presentation…ctor(Stream stream) +35
PRM.prmControllerBase.CreatePowerPointFile(String path, HttpResponse response, OutputFiles fileType, Image chart) in c:\documents and settings\adavis\my documents\visual studio projects\prmnew\common\prmcontrollerbase.cs:748
PRM.details.exportPowerPoint_Click(Object sender, ImageClickEventArgs e) in c:\inetpub\wwwroot\webui\details.aspx.cs:315
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +111
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +244
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +5
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5157

Please help!

Do you use .Net2.0 in your server?
BadImageFormatException is related to the binary format of the .dll. We have seen this error is mentioned on the internet in a number of places and it seems to be due to many various reasons. I’m not sure, but I guess this might be related to obfuscating, we use Dotfuscator to obfuscate our products. Apparently, we cannot fix this and need to wait when dotfuscator is updated and .NET 2.0 is more stable.

We do have that web site running with ASP.NET 2.0. I will change it and let you know what happens.

Thanks for the quick response!