<?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>Speaking of which... : Bugs</title><link>http://blogs.msdn.com/johan/archive/tags/Bugs/default.aspx</link><description>Tags: Bugs</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Using IE6 With Visual Studio 2008</title><link>http://blogs.msdn.com/johan/archive/2008/03/26/using-ie6-with-visual-studio-2008.aspx</link><pubDate>Wed, 26 Mar 2008 19:04:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8337937</guid><dc:creator>JohanS</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/johan/comments/8337937.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=8337937</wfw:commentRss><description>&lt;p&gt;Here's a little scenario I came across the other day. I've forwarded the information to development, so it's pending further investigation. I still thought it would be a good idea to publish the scenario though.&lt;/p&gt; &lt;h1&gt;Visual Studio 2008 +&amp;nbsp;FTP = Possible trouble&lt;/h1&gt; &lt;p&gt;It seems like there might be a bug in&amp;nbsp;Visual Studio 2008 when it comes to projects that you access via FTP. I don't know how common it is to use FTP to access &amp;amp; deploy your projects. It would be really interesting to see some genuine statistics, but since FTP is highly insecure I guess it is very rarely used. This, I guess, is probably the reason why this little glitch slipped through in the first place.&lt;/p&gt; &lt;h2&gt;File change notification works fine...&lt;/h2&gt; &lt;p&gt;Consider the following scenario:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You're working on a web project using FTP  &lt;li&gt;You've downloaded a file to your local cache and you're doing some changes.  &lt;li&gt;Another client changes the file  &lt;li&gt;You attempt to save the file, but the original file on the server has changed so it no longer matches the one in your local cache.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;This causes a warning to pop up with the following information:&lt;/p&gt; &lt;p&gt;&lt;span class="InlineCode"&gt;A more recent version of the file&amp;nbsp;[File Name] has been saved to the web on '[Date]' . Do you want to replace the server file with your local file?&lt;/span&gt;&lt;/p&gt; &lt;h2&gt;...overwriting the file doesn't&lt;/h2&gt; &lt;p&gt;Clicking Yes you'd now expect Visual Studio to simply overwrite the file on the server. Unfortunately this is where the glitch rears it's ugly head. Instead of overwriting the file it gives you the following error message:&lt;/p&gt; &lt;p&gt;&lt;span class="InlineCode"&gt;Cannot save the file [File Name] to the Webserver. The file [File Name] has been modified by (unknown) on&amp;nbsp;[Date] [Time Zone].&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Continuous attempts at saving will have no effect. The error pattern will repeat, displaying the two dialogue boxes over and over again.&lt;/p&gt; &lt;h2&gt;Alternative solution&lt;/h2&gt; &lt;p&gt;My customer originally fixed this by selecting everything in the editor, copying it to Notepad, canceling the operation in Visual Studio, reopening the connection, pasting the contents from Notepad into the document and saving. Fortunately there's an easier way to resolve it.&lt;/p&gt; &lt;p&gt;Simply click&amp;nbsp;the Refresh-button in the Project Explorer window. Visual Studio will then ask you if you wish to update your cached version of the files you've edited. This may sound like you're going to perform a revert-to-save operation on the pages you've edited, undoing all the changes, but it's actually not the case. Visual Studio will simply refresh the files in the &lt;em&gt;cache&lt;/em&gt;, not the ones in the &lt;em&gt;editor&lt;/em&gt;. When Visual Studio has finished refreshing the cache it will notice the inconsistency between the files asking you if you want to update the file in the editor as well. At &lt;em&gt;this&lt;/em&gt; point you should answer "No", unless you want all your changes undone.&lt;/p&gt; &lt;h2&gt;My thoughts about this&lt;/h2&gt; &lt;p&gt;Obviously this shouldn't happen. You shouldn't have to refresh the cache in order to overwrite the files. Still, as I mentioned before I believe there are two reasons why this problem managed to slip through the cracks.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;FTP is unsafe. Even the password is sent as clear text and can be intercepted by anyone. For this reason I would assume that FTP is quite rarely used.  &lt;li&gt;In order for the problem to occur you need to trigger a file change notification on the file in question. For normal scenarios this would mean that another client accesses the FTP-site at the same time and changes the file as you're working on it. This type of on-the fly editing without any form of source-control would be highly risky in a production environment and you'd most likely use some other means of connection while in development.&lt;/li&gt;&lt;/ul&gt; &lt;h1&gt;Visual Studio 2008 + FTP + Internet Explorer 6 = More trouble&lt;/h1&gt; &lt;p&gt;Unfortunately the problem doesn't end there.&lt;/p&gt; &lt;p&gt;It turns out that if you are using Visual Studio 2008, are working on a web project using FTP and have IE6 on your machine, then IE will act as if a file change notification has occurred after 90 seconds wether this is true or not. This means that after 90 seconds all your attempts to save will trigger the behavior described above. The refresh cache-approach still works, but it will quickly become quite tedious.&lt;/p&gt; &lt;p&gt;According to the prerequisites for Visual Studio 2008, Internet Explorer 6 is a minimum requirement, so there is nothing documented on IE7 being a necessity in order to run Visual Studio 2008.&lt;/p&gt; &lt;h2&gt;Alternative solution&lt;/h2&gt; &lt;p&gt;So far I only know of one way to resolve this. Install IE7. You'll still encounter the first potential problem if you have more than one client working simultaneously on the same application, but as I've already mentioned, this sounds like a very&amp;nbsp;unlikely scenario.&lt;/p&gt; &lt;p&gt;/ Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8337937" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/johan/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/johan/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Aspnet_state.exe crashing on Xp</title><link>http://blogs.msdn.com/johan/archive/2007/12/21/aspnet-state-exe-crashing-on-xp.aspx</link><pubDate>Fri, 21 Dec 2007 18:35:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6828257</guid><dc:creator>JohanS</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/johan/comments/6828257.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=6828257</wfw:commentRss><description>&lt;p&gt;I ran across an interesting situation with a customer today.&lt;/p&gt; &lt;p&gt;He had a workstation running Windows Xp Professional. He'd&amp;nbsp;previously been running Framework 1.1 and had been using the ASP.NET State Service. He had now upgraded to framework 2.0. and upon shutdown he now received the following error:&lt;/p&gt; &lt;p&gt;aspnet_state.exe. Application Error. The instruction at "&lt;a&gt;0x6a2a2fec&lt;/a&gt;" referenced memory at "0x0000000c". The memory could not be "read".&lt;/p&gt; &lt;p&gt;To make a long story short it turned out this was due to an access violation upon shutdown. We did the following and resolved the situation:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Start Regedit.&lt;/li&gt; &lt;li&gt;Navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP.NET_2.0.50727 key.&lt;/li&gt; &lt;li&gt;Right-click "Names" and select Permissions on the context menu.&lt;/li&gt; &lt;li&gt;Click Add and enter NETWORK SERVICE, click "Check Names" and click Ok.&lt;/li&gt; &lt;li&gt;With NETWORK SERVICE highlighted in the "Groups or User Names" list click "Advanced".&lt;/li&gt; &lt;li&gt;On the "Advanced Security Settings for Names" dialogue highlight NETWORK SERVICE and click "Edit".&lt;/li&gt; &lt;li&gt;In the "Permission entry for Names" dialogue check the "Name" box is showing "NETWORK SERVICE" and put check marks against "Query Value", "Set Value", "Create Subkey", "Enumerate Subkeys", "Notify" and "Read Control".&lt;/li&gt; &lt;li&gt;Click Ok on all the dialogues and close Regedit.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;As I assisted him it turned out my customer had searched the web for a solution and had found quite a few people experiencing the same problem. I guess most of you are working with Windows 2003 / Vista, so this information might be a bit obsolete. But I thought I should share the knowledge anyway.&lt;/p&gt; &lt;p&gt;Happy Holidays! / Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6828257" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/SessionState/default.aspx">SessionState</category><category domain="http://blogs.msdn.com/johan/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/johan/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>I've upgraded and now my application doesn't work anymore</title><link>http://blogs.msdn.com/johan/archive/2007/01/23/i-ve-upgraded-and-now-my-application-doesn-t-work-anymore.aspx</link><pubDate>Tue, 23 Jan 2007 19:09:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1515283</guid><dc:creator>JohanS</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/johan/comments/1515283.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=1515283</wfw:commentRss><description>&lt;h1&gt;Scenario:&lt;/h1&gt; &lt;p&gt;A quite common scenario when working in the support industry is a call along theese lines:&lt;/p&gt; &lt;p&gt;"My application worked just fine, but now that I've upgraded to IE7, IIS6, Vista, etc. it doesn't work any more. This has got to be a bug! This new version of the software&amp;nbsp;obviously isn't any good, so when are you going to fix it?"&lt;/p&gt; &lt;p&gt; &lt;hr&gt;  &lt;p&gt;&lt;/p&gt; &lt;h1&gt;Is it a bug?&lt;/h1&gt; &lt;p&gt;Well, possibly. But most likely the bug doesn't lie within&amp;nbsp;IE, IIS&amp;nbsp;or the operating system. Instead you should look at your code to make sure you did everything following the recommended guidelines. Chances are that you didn't do things the right way originally, and for some reasons the previous version of the software was more forgiving.&lt;/p&gt; &lt;h1&gt;Example&lt;/h1&gt; &lt;p&gt;A little while ago I had the following scenario on my hands:&lt;/p&gt; &lt;p&gt;A customer had just upgraded their webservers from Windows 2000 to Windows 2003. After the upgrade&amp;nbsp;certain requests just "vanished" into thin air. The response never reached the clients. We managed to track down the problem to the following lines of code:&lt;/p&gt; &lt;div class="SampleCode"&gt;this.Page.Response.ClearContent();&lt;br&gt;this.Page.Response.Write(TextToWrite);&lt;br&gt;this.Page.Response.Flush(); &lt;br&gt;this.Page.Response.Close(); &lt;/div&gt; &lt;p&gt;Okay, so you probably see what is strange here. Why are they calling &lt;span class="InlineCode"&gt;Response.Flush()&lt;/span&gt; and &lt;span class="InlineCode"&gt;Response.Close()&lt;/span&gt;?&lt;/p&gt; &lt;p&gt;If we remove theese two lines and replace them with &lt;span class="InlineCode"&gt;Response.End()&lt;/span&gt; then everything works fine:&lt;/p&gt; &lt;div class="SampleCode"&gt;this.Page.Response.ClearContent();&lt;br&gt;this.Page.Response.Write(TextToWrite);&lt;br&gt;this.Page.Response.End();&lt;/div&gt; &lt;p&gt;Okay, so this is the proper way to do it. &lt;span class="InlineCode"&gt;Response.End()&lt;/span&gt; will call actually call &lt;span class="InlineCode"&gt;Response.Flush()&lt;/span&gt; and then gracefully end execution of the page, while &lt;span class="InlineCode"&gt;Response.Close()&lt;/span&gt; will simply "cut the cord". But how come it worked in IIS5 and not IIS6? Does this mean that IIS6 is a bad product? - Not at all!&lt;/p&gt; &lt;p&gt;One of the things that changed with IIS6 is that it now processes responses asynchronously. This means that in IIS5 all execution will be paused until the page has been sent, while in IIS6 the response will be put in a send-buffer, allowing IIS to immediately continue execution. This is one of the reasons why IIS6 is both faster and more secure than IIS5. The thread executing the page does not have to take the connection speed of the client into consideration. It can execute the page and move on to the next. In IIS5 all execution on the thread would be stopped until the client had downloaded every last bit. This made the server more vulnerable to Denial of Service (DOS) -attacks, and something as trivial as a bunch of clients with poor modem connections could impair the performance of the server.&lt;/p&gt; &lt;p&gt;In brief, here’s what happened with the old code: &lt;/p&gt; &lt;p&gt;IIS5:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Response.Flush sends data to client&lt;/li&gt; &lt;li&gt;Thread waits until data has been sent&lt;/li&gt; &lt;li&gt;Response.Close closes client connection &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;IIS6:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Response.Flush puts the data in a send buffer and immediately moves to the next line of code&lt;/li&gt; &lt;li&gt;Response.Close closes the client connection before the data has been sent &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Here’s what happens with the new code:  &lt;p&gt;IIS5:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Response.End is called&lt;/li&gt; &lt;ul&gt; &lt;li&gt;The data is sent to the client&lt;/li&gt; &lt;li&gt;IIS gracefully ends all further execution of the page &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;IIS6:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Response.End is called&lt;/li&gt; &lt;ul&gt; &lt;li&gt;The data is transferred to the send buffer&lt;/li&gt; &lt;li&gt;IIS gracefully ends all further execution of the page &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;h1&gt;Summary:&lt;/h1&gt; &lt;p&gt;The old code was incorrect, but worked anyway due to the synchronous design of IIS5. As IIS6 switched to an asynchronous response model this stopped working. I can sympathize with anyone that feels that this is a bug/mistake, but in reality it isn't. In fact it is a very concious choice made to further improve performance and reliability. &lt;p&gt;/ Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1515283" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.msdn.com/johan/archive/tags/Bugs/default.aspx">Bugs</category><category domain="http://blogs.msdn.com/johan/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>