Thursday, April 29, 2010

ASP.Net web compilation error after upgrading to Visual Studio 2010

After installing Visual Studio 2010, I tried opening and running one of my websites. It seemed to compile fine against the 3.5 .Net Framework, but when I went to run it, it said there was a compilation error CS0016: Could not write to output file 'c:\windows\microsoft.net\framework\v2.0.50727\Temporary ASP.NET Files\[blah blah blah] -- 'Access is denied.'

So, I went to the temp folder and made sure Network Service had permissions. It still wouldn't run.

Long story short...I found out that as of IIS 7.5, an account gets created for each application pool, called "IIS AppPool\<app pool name>" and in IIS, it shows up as "ApplicationPoolIdentity" where I used to have it set to "NetworkService". Installing Visual Studio 2010 changed my app pool identities. So, in order to run an app, the app pool account would have to have access to things like the temp folder, etc.

For a quick fix, I simply changed my app pool identities back to NetworkService, and things are happy again.

Tuesday, April 27, 2010

"Open Table" missing from Sql Server Management Studio 2008

When you right-click a table in Sql Server Management Studio 2008, you don't see the "Open Table" command that you're used to from previous versions. You see "Select Top 1000 Rows" and "Edit Top 200 Rows". The "Edit" command is like the "Open Table" command, but as it says, only lets you edit the top 200 rows.

You can get around this behavior though. Go to Tools-Options-Sql Server Object Explorer-Commands, and change the "Value for Edit Top Rows command" to some number that makes sense for you. If you change it to zero "0", then it will do All Rows, which is just like "Open Table".