Hello,
I'm writing a web-app that should use OpenOffice ("OO" now on), if installed, to do some document manipulation.
Before stating with the web-app, I've done a test WinForm application. The application references some OO dlls and has some code to detect OO installation.
The application works properly in local (where OO is installed) and on the production web server (where OO is NOT installed) correctly detecting OO installation missing.
Now I've moved the relevant code into the web-app, copying the referenced dll to the web-app's bin folder, and in local everything works good.
So I've pre-compiled the web-app and copied it to the web server (where OO is NOT installed) but here the web-app start showing the following error:
This application has failed to start
because the application configuration is incorrect. Reinstalling the
application may fix this problem. (Exception from HRESULT: 0x800736B1)
This error usually means some of the dlls your application uses can't be loaded cause of missing (or otherwise inaccessible) dependand dlls and that's pretty clear being OO not installed on the web server.
My question is: why does the WinForm application run flawlessly also when OO is not installed while the web-app fails to load?
I might only suppose the the pre-compilation somewhat links the web-app to the OO dlls in a way that these dlls are required immediatly at program start up. there is no way to avoid this?
Forthermore, if I remove the OO dlls from the web-app bin folder I receive the following error:
Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean isAuthenticated)
at System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated)
at System.Web.HttpContext.get_Profile()
at SISSLAM.SISSBasePage.Page_Init(Object sender, EventArgs e)
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Page.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Finally, removing any reference to the objects provided from the OO dlls from the web-app's code restore web-app functionality fully.
Thank you for your help.