If I access my MVC website in my local IIS, there is no error, but if I host the MVC website to external hosting provider, I got
Error 500 - Internal Server Error
Here is the picture:
NOTE: My MVC application is using virtual path provider, and allows MEF to use plugin dll at runtime, my main site is doing ok. All the pages can be accessed, but the pages from plugin, cannot be accessed. Why is this happening?
------ UPDATE--------
I traced the error, and I found this:
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) Specified argument was out of the range of valid values. Parameter name: site
Resulting in: An exception occurred while trying to create an instance of type 'EAccountingControllers.EAccountingController'.
Resulting in: Cannot activate part 'EAccountingControllers.EAccountingController'. Element: EAccountingControllers.EAccountingController --> EAccountingControllers.EAccountingController --> AssemblyCatalog (Assembly="EAccounting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")
Resulting in: Cannot get export 'EAccountingControllers.EAccountingController (ContractName="EAccounting")' from part 'EAccountingControllers.EAccountingController'. Element: EAccountingControllers.EAccountingController (ContractName="EAccounting") --> EAccountingControllers.EAccountingController --> AssemblyCatalog (Assembly="EAccounting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")
It is my MEF problem, the plugin is somehow produced this error, I wonder what is happening?