Welcome to MSDN Blogs Sign in | Join | Help

Visual Web Developer Team Blog

Your official information source from the Visual Web Developer team.

News

  • These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified Terms of Use
Using Microsoft AJAX Control Toolkit with Visual Studio 10 Beta 1

In this post we will talk about the effects of a particular security enhancement in CLR 4.0 Beta 1 and how it affects working with AJAX Control Toolkit in Visual Studio 10 Beta 1 and possibly other 3-rd party assemblies.

The security enhancement in question is the way CLR 4.0 treats assemblies that came from a remote source (e.g., downloaded from the Internet or copied from a file share of another computer). Prior to CLR 4.0, if such assembly was copied to a local drive on your computer, CLR would treat it as a trusted assembly coming from My Computer zone. This is different from how Windows was treating such assemblies. Downloaded assemblies are marked with a special “Internet” bit and should not be trusted unless a user explicitly grants trust to them. This behavior was implemented in CLR 4.0 Beta 1. Unfortunately, it causes a somewhat obscure error message when working with such assemblies in Visual Studio 10 Beta 1. In particular, this error message happens when you attempt to add controls from such assembly to Visual Studio Toolbar. We will certainly improve the error message or may bypass this security check in this particular scenario in Visual Studio 10 Beta 2, but for now the users should understand what that error message means and the action required from them to give trust to downloaded assemblies that they wish to use in Visual Studio.

Please note that this issue should affect only assemblies downloaded as a plain DLL assembly file, or as a part of a ZIP archive. Third-party assemblies installed by a downloaded executable installer should not be affected by this issue.

As mentioned above, the issue manifests when attempting to add controls from a downloaded assembly to Visual Studio 10 Beta1 Toolbox. In particular, the issue affects AJAX Control Toolkit since it is currently made available for download as a ZIP archive. If the user right-clicks on the toolbox and selects “Choose Items” from the context menu

ChooseItem

and browses to the AJAX Control Toolkit assembly

BrowseToACT

they will get the following error message when adding the items

 

Error

Could not load file or assembly 'file:///E:\Download\AJAX 1.0\Toolkit\AjaxControlToolkit-NoSource\SampleWebSite\Bin\AjaxControlToolkit.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

In order to be able to add controls from the assembly to the toolbox, the user should grant the needed permissions to the assembly. It should be done by going to the assembly file properties in Windows Explorer

ChooseProperties

and clicking the “Unblock” button

Unblock

After that, you should be able to add AJAX Control Toolkit to the toolbox and use it as you did in previous version of Visual Studio.

Posted: Tuesday, May 26, 2009 12:45 PM by WebDevTools

Comments

What's New said:

In this post we will talk about the effects of a particular security enhancement in CLR 4.0 Beta 1 and

# May 26, 2009 6:31 PM

DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

# May 26, 2009 11:10 PM

Sam Gentile's Blog (if (DeveloperTask == Communication && OS == Windows) said:

Agile Agility at Scale: Become as Agile as You Can Be: Scott Ambler talks about his new ebook; The goal of the Agility at Scale: Become as Agile as You Can Be ebook is to get people thinking outside of the box a bit when it comes to agile development

# May 27, 2009 11:18 AM

Jason N. Gaylord's Blog said:

If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds.jasongaylord

# May 27, 2009 4:58 PM

ASPInsiders said:

If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds.jasongaylord.com/JasonNGaylord

# May 27, 2009 6:03 PM

Susan Reed said:

How do you get the controls to show images rather than the purple gear looking icon? I did this one before a couple of years ago, but I'm on a different machine now and can't remember how to do it.

# July 8, 2009 4:05 PM
New Comments to this post are disabled
Page view tracker