Loading Toolbox Items From Network Shares
I had a few questions this morning in response to the new AJAX Control Toolkit in regards to loading the Toolbox items from a remote share. Many organizations, like ours, stores libraries and such in a common location on a network share, and then references (and updates) them as needed in projects.
“There was an error loading types form assembly %location%\%library%.
Request for the permission of type ‘System.Web.AspNetHostingPermission, System, Version=126.96.36.199’ failed.”
Unfortunately, anything that is not registered with the GAC (Global Assembly Catalog), will not add into the Toolbox in Visual Studio. Additionaly, the error provided is VERY unhelpful in explaining that. Since the Control Toolkit doesn’t come with an installer, you must install it manually.
In Windows XP (and assuming Vista, I’ll verify tonight when I get home), the GAC is located at %SystemRoot%\Assembly, or C:\Windows\Assembly.
Copy your library, the ControlToolkit in this case, into that directory and restart Visual Studio. You should now be able to add the controls to your Toolbox.