Question
It is possible to host a windows user control in an Internet Explorer browser. I want to create a windows user control which make use of GTP.Gantt and host it in Internet Explorer.
First I tested the concept by dragging a treeview from the toolbox onto a windows usercontrol. Compiled it and included it on a ASPX webpage the following way:
<object id=”TestControl” height=”600″ width=”600″ classid=”http:test2control.dll#test2control.UserControl1” viewastext> </object>
It works perfectly.
I then created windows usercontrol and dragged a GTP.Gantt onto the usercontrol. But now it’s not possible to display the user control in the browser.
Is this a question of licensing or is it a question of reference?
Can you help me here?
Answer
UPDATE: YES We now have full understanding of all the trust issues invovled in this, and the GTP.NET has been adapted to be fully security aware. Look at the result: http://www.plexityhide.nu/IEHostedGantt/Default.htm This sample runs in the internet zone (zero trust).
<old answer below>
After you add the site to your trusted sites in IE, you need to change your security level for .NET code.
Currently to get the GTP.NET-usercontrol work this way you need to set it to Full Trust… You can adjust this setting by going to Control Panel – Administrative Tools – Microsoft.NET Framework Wizards 1.1 – Adjust .NET Security.
Note; This is not GTP.NET.WEB, in this case we actually want to download the GTP.NET to the client and host it within IE. In other words; not a Server side control….
Side note; Why we need “full trust” is not fully understood yet, will look into it, because it seems excessive.
Debugging Assembly Issues
If you’re getting an error when trying to use an assembly method, it’s most likely because the assembly object wasn’t created due to security issues. One thing you can do is check the exception logs created by Internet Explorer. You can find them in the Temporary Internet Files folder named “?FusionBindError!name=PlexityHide.GTP.dll “. Drag this file to Internet Explorer or a text editor to read the exception and trace log.