I have build on development server a reporting page(full trust) that loads dynamically the Form dll (partially trusted if it matters) from a library xsn and use it to get some data from the form document for report.
Everything works fine on development server but not on production! The method Assembly.Load(byte) throws NullReferenceException! The web.config-s are practically the same except debug mod, stack trace and custom error.
I have tried to load that assembly from a console application(using sharepoint objects), I even put that dll in the bin and GAC forlders and added it on safe control in web config. The same error, on test works but on production not.
Is that something relating to some hidden policy? Could that be something related to account that application pool uses?(on test it is member of admins group) or maybe that has something relating to another trust setting inherited from machine.config?
In 2 days I din't find any clue and that keeps me sad :( Please help. (I work with Sharepoint 2010 enterprise)