<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/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>Programming with .NET - General</title><link>http://forums.silverlight.net/forums/17.aspx</link><description>General discussions around authoring Silverlight .NET applications.</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Sharing violation opening a file with OpenFileDialog - Can we change this??</title><link>http://forums.silverlight.net/forums/thread/75144.aspx</link><pubDate>Mon, 28 Jul 2008 07:59:29 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:75144</guid><dc:creator>Yi-Lun Luo - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/75144.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=75144</wfw:commentRss><description>&lt;p&gt;Hello, I think Office opens a file with the FILE_SHARE_WRITE flag, which means subsequent requests to this file must also include this flag, or the request will fail. Try to open the file in WordPad, and you&amp;#39;ll also note an error. WordPad opens a file with the FILE_SHARE_READ flag only. However, Notepad, or your Notepad++, opens a file with both FILE_SHARE_READ and FILE_SHARE_WRITE flags, so the request succeeds. There&amp;#39;s very little you can do in Silverlight to change this behavior. I&amp;#39;ve logged this as a feature request. But I can&amp;#39;t assure you anything since the IO APIs are completely different on Mac, and we need to support both...&lt;/p&gt;</description></item><item><title>Sharing violation opening a file with OpenFileDialog - Can we change this??</title><link>http://forums.silverlight.net/forums/thread/74301.aspx</link><pubDate>Thu, 24 Jul 2008 15:25:41 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:74301</guid><dc:creator>CleverCoder</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/74301.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=74301</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Good morning! I&amp;#39;ve recently ran into an issue with a sharing violation using the OpenFileDialog. Basically, we have the ability to import CSV data in our application. When I open Excel and create a CSV file, then save to disk and subsequently open it with Silverlight, I get a sharing violation and an exception is thrown. I only see two options for opening the file: &amp;quot;OpenRead&amp;quot; and &amp;quot;OpenText&amp;quot;.&lt;/p&gt;&lt;p&gt;I assume that our hands are tied here and we can&amp;#39;t tell the framework to open the file in manner thats safer. For instance, I can open the file with Notepad++ and it doesn&amp;#39;t complain. The only difference I see is the options:&lt;/p&gt;&lt;p&gt;SL: Options:&amp;nbsp;&amp;nbsp;&amp;nbsp; Synchronous IO Non-Alert, Non-Directory File, Open No Recall&lt;br /&gt;NOtepad++:  Options:&amp;nbsp;&amp;nbsp;&amp;nbsp; Synchronous IO Non-Alert, Non-Directory File&lt;br /&gt;&lt;br /&gt;So... does anyone have any experience with this? It seems that since it&amp;#39;s a read only file open under ALL circusmtances, we should be able to open this file in this situation..&lt;/p&gt;&lt;p&gt;Cheers!&lt;/p&gt;&lt;p&gt;-Sean &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>