Could you please post the detailed error you encountered? According to your description, please ensure your portal application pool is running under .net version 4.0.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact email@example.com. Microsoft One Code Framework