<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx</link><description>I've received a couple of requests lately about how to implement drag-and-drop multiple file uploads in Internet Explorer from within managed code. Fortunately for me, someone else has already taken the liberty of writing an article on the subject at</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#74489</link><pubDate>Tue, 17 Feb 2004 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:74489</guid><dc:creator>Jerry Pisk</dc:creator><description>And as soon as somebody installs this you can use it to lift files from their system without them even knowing (just call AddFile with as many files you need and submit a form, no user interaction required).&lt;br&gt;&lt;br&gt;I would expect Microsoft employees to be a little more responsible when posting deliberate security holes on the internet.</description></item><item><title>re: Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#74537</link><pubDate>Tue, 17 Feb 2004 04:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:74537</guid><dc:creator>Andy Oakley [MSFT]</dc:creator><description>A good point that would be true in the ActiveX world without other considerations. &lt;br&gt;&lt;br&gt;The column does speak to this problem in the 'New Security Model' section. The standard permission set for controls loaded in the Internet zone won't allow for arbitrary file system access, it has to be explicitly granted through the configuration tool (or a setup package) and even then is subject to the hierarchy of enterprise, machine and user settings. &lt;br&gt;&lt;br&gt;Extending this sample, additional steps along the lines of &lt;br&gt;a) checking FileUploadURL ('site-locking' so uploads can only go to the site the user expects them to)&lt;br&gt;and&lt;br&gt;b) explicitly prompting the user with the list of files before uploading&lt;br&gt;could also be used to good effect.</description></item><item><title>re: Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#74558</link><pubDate>Tue, 17 Feb 2004 04:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:74558</guid><dc:creator>Jerry Pisk</dc:creator><description>The problem with security is that users who will have a valid use for this will allow it to run and access the file system without restrictions (being able to specify a restricted access, such as read-only and only within current user's profile/my documents would help a little too).&lt;br&gt;&lt;br&gt;Prompting the user is probably the only way to prevent mis-using this, because when would you check the action url? You can attach an event handler to submit event and change it there, from legit to a rogue one.&lt;br&gt;&lt;br&gt;As for calling AddFile - you can hide it, making it inaccessible to a script in a page, but any script will be able to craft an event object and call your event handler, making it just a little more difficult to misuse but not fixing the problem.&lt;br&gt;&lt;br&gt;Maybe Secure computing initiative should also apply to examples posted on MSDN :)</description></item><item><title>re: Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#74851</link><pubDate>Tue, 17 Feb 2004 15:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:74851</guid><dc:creator>Mel Grubb</dc:creator><description>Dude, calm down.  If you don't like it, don't deploy it.  I think this sort of control is intended for use in an Intranet environment.  The question was HOW to do this, not WHAT are the reasons not to.&lt;br&gt;&lt;br&gt;MG2.0</description></item><item><title>What security is</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#74976</link><pubDate>Tue, 17 Feb 2004 18:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:74976</guid><dc:creator>Dumky</dc:creator><description>The eternal conflict between features and security: how to do more things vs. how to prevent them.&lt;br&gt;This code example is interesting, because it does use the .NET security model (requesting a permission then using it then reverting it). But it seems the granularity is still causing problems: you can't give access to one file without giving access to all files...&lt;br&gt;&lt;br&gt;The only solution I have ever seen to this problem is the E language and other capability-based security systems (like EROS). Check out &lt;a target="_new" href="http://erights.org"&gt;http://erights.org&lt;/a&gt; and the Skynet Virus talk.</description></item><item><title>Take Outs: The Digital Doggy Bag of Blog Bits for 17 February 2004 </title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#75001</link><pubDate>Tue, 17 Feb 2004 21:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75001</guid><dc:creator>Enjoy Every Sandwich</dc:creator><description>Counts: .NET:9; Admin:2; Blogging:2; Dev:0xF; Funny:1; Security:1; SQL:3; Tools:2; WILY:6; XML:4. Line of the day: </description></item><item><title>re: Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#75090</link><pubDate>Tue, 17 Feb 2004 21:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75090</guid><dc:creator>Mel Grubb</dc:creator><description>Hmmm. I can't seem to get the code from the article working.  At one point, the article mentions an error I SHOULD be getting, but I'm not.  In fact I'm not getting a whole lot of anything.  Just what looks like a blank, scrollable frame where the control ought to be.&lt;br&gt;&lt;br&gt;Also, I don't remember having to set any code access permissions when setting up the Workspaces source control Winform components, although I did have plenty of OTHER problems at the time.  Any chance you could shed some light on how this was done?</description></item><item><title>re: Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#75109</link><pubDate>Tue, 17 Feb 2004 21:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75109</guid><dc:creator>Andy Oakley</dc:creator><description>I don't remember if the article explicitly mentions this, but have you copied the generated assembly (bin\debug\upload.dll) into the ServerFileUpload folder in your wwwroot?  A blank frame suggests the browser is unable to retrive the assembly from the server. This post &lt;a target="_new" href="http://blogs.msdn.com/aoakley/archive/2003/06/20/49627.aspx"&gt;http://blogs.msdn.com/aoakley/archive/2003/06/20/49627.aspx&lt;/a&gt; has some pointers for further debugging.&lt;br&gt;&lt;br&gt;Regarding Workspaces, the permissions are granted as part of the installation package along with a few other checks. The installation package has a custom install action (extending System.Configuration.Install.Installer) that creates the code groups and permissions sets (see System.Security.Policy and System.Security.Permissions) before using System.Security.SecurityManager to save the modified policy.</description></item><item><title>Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#75350</link><pubDate>Wed, 18 Feb 2004 11:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75350</guid><dc:creator>Mark Olson's blog</dc:creator><description /></item><item><title>Back in action</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#78109</link><pubDate>Mon, 23 Feb 2004 03:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:78109</guid><dc:creator>Mungo Knotwise of Michel Delving</dc:creator><description /></item><item><title>re: Drag and drop file uploads in IE with .NET</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#84748</link><pubDate>Fri, 05 Mar 2004 18:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:84748</guid><dc:creator>Xinkun</dc:creator><description>I got a problem when set control's allowdrop = true. If I did that, the control itself can not been shown in Internet Explorer properly, which looks like un-open image, any helps?&lt;br&gt;&lt;br&gt;Many thanks</description></item><item><title>Back in action</title><link>http://blogs.msdn.com/aoakley/archive/2004/02/16/74460.aspx#93238</link><pubDate>Sat, 20 Mar 2004 20:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:93238</guid><dc:creator>The Diffracted Developer @ Home</dc:creator><description /></item></channel></rss>