I was absolutely sure that I'll get much more funny errors as I upgrade by office computer to Windows 7. All installations took a day long (because of updates). While installing my default environment triplet Visual Studio 2003-2005-2008, I learnt that VS2003 is no more supported by Windows 7 (and by Vista). Feeling thankful because I do not have to deal with my VS2003 projects recently. Then I tried a VS2005 project and got my beautiful error:

HTTP Error 500.23 - Internal Server Error: An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.



After a short research, I've find out that performing the recommendation on page does not break down anything:


  1. Go to IIS 7.5

  2. Expand Sites/Default Web Site

  3. Right click on the application that causes problem and choose "Manage Application/Advanced Settings..."

  4. Change "Application Pool" parameter to "Classic .NET AppPool" and save


With glorious feelings solving this issue, I immediately switched to VS2008 and tried to compile a project and got an error telling about an access problem to somewhere under "Temporary ASP.NET Files" directory. I went to directory and gave access to nearly all users that comes to my mind. This time I get an error saying one of project's dll is inaccesible:



After this point, I cycled through one access problem on "Temporary ASP.NET Files" folder and one access problem on project DLLs. My fight on giving permission and healing lasted about 4-5 hours splitted into two days. I was getting a similar error on browser:



After a long long internet research, the resolution I've found made me feel like I want to cry. All problems are resolved miraculously after setting "Special Permissions" on Microsoft .NET folder under Windows folder for "Users" group.

I feel that I'll live much more funny days with this Windows 7 - Visual Studio double...

Bu yazının Türkçe sürümü bulunmaktadır

This post is also available in English

Ofis makinemi de Windows 7'ye güncelledikten sonra daha eğlenceli hatalar alacağımdan şüphem yoktu. Bütün kurulumlar (updateler yüzünden) tam bir gün sürdü. Makineme hep kurduğum Visual Studio 2003-2005-2008 üçlemesinden ilkini kurarken, artık bu Windows 7'nin (ve Vista'nın) VS2003 desteklemediğini öğrendim. Öneriler çok yaratıcıydı: "Virtual PC'de Windows XP kullanın". Şimdilik VS2003 ihtiyacı olan projelerime bakmıyor olmamın sevinciyle bir VS2005 projesi denedim. İlk güzel hatayı aldım:

HTTP Error 500.23 - Internal Server Error: An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.



Kısa bir araştırma sonrasında, 2005 projeleri için ekrandaki öneriyi uygulamanın bir problem yaratmayacağını öğrendim:


  1. IIS 7.5 Açılır

  2. Sites/Default Web Site dalı genişletilir

  3. Sorunlu Application'a sağ tıklanıp "Manage Application/Advanced Settings..." seçilir

  4. Açılan kutuda "Application Pool" "Classic .NET AppPool" olarak değiştirilip kaydedilir


Bu sorunu çözmenin yaşattığı mutluluk ile hemen bir VS2008 projesi açtım, compile etmeye çalıştım, "Temporary ASP.NET Files" dizini altında bir yerlere erişim problemi olduğu ile ilgili bir hata aldım. Gittim dizine aklıma gelen bütün kullanıcılara yetki verdim. Bu sefer de projenin DLL'lerinden birine ulaşılamadığı hatasını aldım:



Bu noktadan sonra bir "Temporary ASP.NET Files" dizini yetki hatası bir DLL erişim yetki hatası arasında döndüm durdum. Yetki verme denemeleri ve düzeltme uğraşım, iki güne bölünen yaklaşık 4-5 saatlik bir süreç boyunca devam etti. Tarayıcıda alınan hata da benzer bir hataydı:



Oldukça uzun bir internet araştırması sonucunda bulduğum çözüm insanı ağlatacak cinstendi. Windows altındaki Microsoft .NET dizinine "Users" grubu için "Special Permission" vermek bütün sorunu bir anda ortadan kaldırdı.

Bu Windows 7 - Visual Studio ekürisi ile çok eğlenceli günler bizleri bekliyor gibi...

I'm nearly-fully satisfied with the Windows 7, that I began to use at home nowadays. To be honest, I can say that I'm an addict of it because of performance.

Or "was". Until it took 1 hour and 40 minutes to make a website working on IIS.

I didn't expected it to be so smooth but I never guessed a bloody ending like this. I created my site as usual and wanted to see the empty page immediately. When I came by IIS 7.5 and see the jelly-candy interface, I felt that things will not do good. Anyway I defined the website and went to the browser and firs error:

ERROR 1: HTTP Error 500.19 / Error Code: 0x80070005 / Config Error: Cannot read configuration file due to insufficient permissions

Inspection phase began of course. It was obvious that this is an access problem. I permitted the IIS_IUSRS user to access web project folder. I Refreshed the page in browser and second error:

ERROR 2: HTTP Error 500.19 / Error Code: 0x80070021 / Config Error: This configuration section cannot be used at this path. This happens when the section is locked at parent level....

This was the most educating error in this story. Though the things I've learnt was not related with the error... After some research, I've found out an easy way.
Opening the file at location %windir%\system32\inetsrv\config\applicationhost.config and to change the "Deny" words into "Allow" in this portion:

<section name="handlers" overrideModeDefault="Deny" />
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
By this way, I will be allowing sections to be overwritten in web.config.
It's an easy thing to do but if you can find the file... I immediately switched to my Total Commander, navigated to path, and what? directory is empty? look around it's empty? Then I switched to cmd. Navigated to path, nothing.
Then I learned the thing "SYSWOW32 Redirection" from a forum. In 64Bit operating systems, there are two system folders. One System32 and one SysWOW64. But because all software will try to access to system folder in same way, Microsoft redirects 32bit applications to 32Bit system folder by "SYSWOW32 Redirection". This means if you use an 32bit application to view the folder (Total Commander and cmd in my case) the folder shows empty, because the folder is not actually that folder.
After I got this, I switched to 64bit Notepad and managed to open and change the file by pointing to it with full path. Returned to browser, refreshed and here comes the 3rd error:

ERROR 3: HTTP Error 401.3 / Error Code: 0x80070005 / Unauthorized


After a long research, I found out that the problem is related with site authentication in IIS 7.5. It's needed to follow these steps in order to correct it:
1. Go to IIS7.5,
2. Expand "Sites" node, click the problem web site's name.
3. Double click "Authentication" on the right.
4. Right click on "Anonymous Authentication" item and click "Edit...".
5. Check the "Application Pool Identity" option
6. Save it.
I've completed all steps, returned to browser expecting "it's ok this time", F5 andddd


ERROR 4: HTTP Error 404.3 / Error Code: 0x80070032 / Not Found

I thought that ASp.NET handler is not working but how to find and correct in this jelly-candy IIS7.5? I began searching for it this time. I found out where the handlers are but no one was knowing about ASP.NET handlers over there. I then learned that requires manual activation of ASP.NET components even if you have Framework installed. For this, we go to "Programs and Features" from Control Panel and then say "Turn Windows Features on or off". Then in the appearing tree, we go to this node: "Internet Information Services/World Wide Web Services/Application Development Features". Then we pick all items here except "CGI".

After completing these steps, I've refreshed browser then an error more. But this time I began to get good-old yellow error pages of ASP.NET. It was a meaningless error but I tried to compile project once more. Then it healed and lastly I managed to see my white good and empty Default.asp page...

These issues are not lived on an operating system installation that is screwed up and is living for ages. Operating system was 3-4 days old and Visual Studio installation was just 1 days old. In other words, platform was nearly out-of-the-box.

I hope this story heals somebody's problems out there...

Bu yazının Türkçe sürümü bulunmaktadır

This post is also available in English

Bir süredir evde kullanmaya başladığım Windows 7'den oldukça memnun sayılırım. Hatta kısa sürede özellikle performansından dolayı fanatiği oldum diyebilirim.

Diyebilirdim yada. Bugün IIS üzerinde bir websitesini çalıştırmak tam 1 saat 40 dakikamı alana kadar.

Acısız olmasını beklemiyordum ama bu kadar kanlı olmasını da beklemiyordum açıkçası. Her zaman yaptığımız gibi sitemi oluşturdum, hemen görmek istedim boş sayfayı. IIS'i açtığımda IIS 7.5'un jelibon-bonbon yüzünü görünce işlerin iyi gitmeyeceği içime doğmuştu zaten. Neyse, websitesi tanımlamasını yaptım. Tarayıcıya yöneldim ve ilk hata:

HATA 1: HTTP Error 500.19 / Error Code: 0x80070005 / Config Error: Cannot read configuration file due to insufficient permissions

Araştırma süreci başladı tabi ki. Sorunun yetki hatası olduğu belliydi. Web projesinin dizinine IIS_IUSRS kullanıcısına yetki verdim. Tarayıcıda sayfayı refresh ettim ve ikinci hata:


HATA 2: HTTP Error 500.19 / Error Code: 0x80070021 / Config Error: This configuration section cannot be used at this path. This happens when the section is locked at parent level....

En fazla bilgi öğreten hata bu oldu. Her ne kadar öğrendiklerim hata ile ilgili olmasa da... Araştırmalar sonucunda kolay bir çözümü olduğunu öğrendim.
%windir%\system32\inetsrv\config\applicationhost.config konumundaki dosyayı açıp, içerisindeki

<section name="handlers" overrideModeDefault="Deny" />
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
satırlarındaki "Deny" ibarelerini "Allow" yapmak. Bu sayede bu section'ların web.config üzerinden override edilmesine izin vermek.
İşlem kolay, kolay olmasına da dosyayı bulabilirsen... Hemen Total Commander'ıma geçtim, dizine gittim, o da ne, dizin boş? Ara tara boş. Hemen cmd'ye geçtim. Dizine gittim yok da yok.
En sonunda bir forumda "SYSWOW32 Redirection" denen bir zımbırtıyı öğrendim. 64Bit işletim sistemlerinde, sistem dizini iki adet. Bir System32 bir de SysWOW64. Ancak bütün yazılımlar sistem dizinine aynı şekilde erişmek isteyeceği için, Microsoft, 32 Bit'lik yazılımlar sistem dizinlerine erişirken "SYSWOW32 Redirection" ile onları 32Bit dizinine atıyor. Yani dizine gözatmak için kullandığınız yazılım (bende Total Commander ve cmd) 32 bit ise, dizinde hiçbirşey olmuyor, çünkü o dizin o dizin olmuyor.
Bunu da öğrendikten sonra 64Bit'lik Notepad ile tam dosya adresi vererek dosyayı açmaya muktedir oldum ve değişiklikleri yaptım. Tarayıcıya döndüm, refresh veee buyrun 3. hata:


HATA 3: HTTP Error 401.3 / Error Code: 0x80070005 / Unauthorized

Uzun araştırmalardan sonra, sorunun IIS7.5 üzerindeki site yetkilendirmesindeki bir sorun olduğunu tespit edebildim. Düzeltmek için şu adımları izlemek gerekiyor:
1. IIS7.5'a girilir,
2. "Sites" dalı genişletilir, sorunlu web sitesinin adına tıklanır.
3. Sağ taraftan "Authentication"a çift tıklanır.
4. "Anonymous Authentication" öğesine sağ tıklanır "Edit..." denir.
5. "Application Pool Identity" seçenği işaretlenir
6. Kaydedilir.
Adımları tamamladım, büyük bir hevesle "bu sefer tamam" diyerek tarayıcıya döndüm F5 veeee 4.hata:


HATA 4: HTTP Error 404.3 / Error Code: 0x80070032 / Not Found

Hata mesajından ASP.NET handler'ının çalışmadığını düşündüm ama, jelibon-bonbon IIS7.5'da nasıl bulasın da düzeltesin handlerları. Bu sefer onu aramaya başladım. Handlerların yerini tespit ettim ama ASP.NET handler'larının yerinde yeller esiyordu. Meğerse Windows 7, Framework kurulsa dahi, ayrı ASP.NET bileşenlerini aktive etmeyi gerektiriyor. Bunun için denetim masasından "Programs and Features" altından "Turn Windows Features on or off" diyoruz ve çıkan ağaçta şu dala kadar gidiyoruz: "Internet Information Services/World Wide Web Services/Application Development Features". Buradaki öğelerden, "CGI" hariç diğerlerini işaretliyoruz.

Bu işelmi de tamamladım tarayıcıda refresh, yine bir hata. Ama bu sefer ne güzel ki artık sarı ASP.NET hata sayfası görebilmeye başlamıştım. Anlamsız bir hataydı ama bir compile edeyim projeyi tekrar dedim. Netekim düzeldi ve boş, düz beyaz Default.aspx sayfamı görmeyi başardım...

Yukarıda anlattığım sorunlar, orası burası kurcalanmış yada uzun süredir kullanılarak sorunlara yol açılmış bir Windows kurulumnda değil, 3-4 gün önce yeni işletim sistemi ve 1 gün önce de yeni Visual Studio 2008 kurulumu ile tam manasıyla bir out-of-the-box sistem üzerinde meydana geldi.

Umarım bu sorunları yaşayan birilerin biraz faydam dokunur...

Copyright Ali INAL ©2009 - Creative Commons Licence
preload preload preload

Taşındık!


Ali's Surprisingly Web blog'u, artık yeni, güçlü ve daha esnek altyapısıyla yeni adresinden yayın yapıyor. Yeni adresimiz: http://surprisingly.web.tr. Bu eski blog sayfalarındaki bütün içerik, yeni blog altyapısına da taşındı. Arzu ederseniz sizi yeni blog'umda ağırlamak isterim.
Yeni blog'a gitmek istiyorum Bu sayfayı okumak istiyorum

We've Moved!


Ali's Surprisingly Web Blog is now serving from a new, stronger and flexible system with a brand new address. Our new address: http://surprisingly.web.tr. Also we've migrated all old content from this blog to our new blog. If you wish, I want to welcome yo to my new blog.
I want to visit new blog I want to stay and read this page