Creating .tar.gz archive in Windows

You might somehow want to create a .tar.gz archive package for distribution which can be easily extract on other operating systems such as unix/linux. 7-zip is a freeware file archiver can create a .tar.gz in windows.

1. You need to download and install 7-zip
2. Select the folder that you want to create .tar.gz archive (in my example folder name is "istanbul"). Right click then select "7-Zip" -> "Add to Archive".



3. Choose "Tar" option from the Archive Format menu to create .tar archive



4. Right click your newly created archive (istanbul.tar) then select "7-Zip" -> "Add to Archive" from the menu again to convert your tar archive to .tar.gz. Choose "Gzip" as the "Archive Format".



Note: For maximum compression you can choose "Ultra" for the "Compression Level" and select "258" for the "Word Size"

W3C Uyumlu Tarih Formatı

Ne yazık ki .net ile sitemap, rss, pingback v.b. teknolojilerde kullanılan W3C Uyumlu Tarih (W3C-compliant DateTime) için doğrudan uyumlu bir format olmadığından kısayoldan aşağıdaki gibi u formatı kullanılarak W3C DateTime elde edilebilir.

ValidDatetime.ToUniversalTime.ToString("u").Replace(" ", "T")

driver failed during system startup

When you start your windows, you may receive this error message "At least one service or driver failed during system start-up. Use Event Viewer to examine the event log for details."

This usually happens when a software or driver doesn't get uninstalled correctly or uninstaller doesn't remove it's entry from services. It's not a big problem because when you click the OK button, this error message will go away and you will never be bothered by this error message until you restart Windows.

To fix this problem, download and use autoruns from sysinternals.com

driver failed during system startup

As you can see from the image above, there is an invalid entry in services tab and Image Path field shows "file not found". To check start-up type of this invalid service entry open service manager and sort by start-up type. You can run Service Manager from Control Panel -> Administrative Tools -> Services.

Our invalid entry has an Automatic start-up type as shown the image above so you can delete or set disabled this entry to fix this problem.

Hope your start-up error message problem solved and you get back to using your windows without any driver failed alert.

Hug a developer

İnternette gördüğüm güzel bir video'yu paylaşmak istedim :)

Skype ve IIS7 port çakışması

Skype ile çok sevdiğim bir dostum Deniz ile bir süre sohbet ettikten sonra IIS'te bir kodu denemek için start dediğimde Internet Information Services (IIS) Manager bir hata mesajı "The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)" ile isteğimi geri çevirdiğini gördüm.

Mesajdan da anlaşıldığı üzere başka bir uygulama tarafından kullanılan bir dosyadan söz ediliyor fakat bunun 80. port olduğunu anlamak ilk bakışta akla ilk gelen çözüm gibi görülüyor. Bunu anlamak için Command Prompt'tan basit bir komut ile kullanılan portları ve portu dinleyen programı listeliyoruz.


netstat -ano


Ekrana dökülen listeye bakıldığında ise ilk satırda:

Proto Local Address Foreign Address State PID
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 6044
................

80. portun 6044 Process ID'li uygulama tarafından kullanıldığı görülüyor. Peki bu process (uygulama) kim?
Cevap için Task Manager (Görev Yöneticisi)'ı açıp çalışan uygulamaları listeliyoruz. PID sütununa göre sıralayıp 6044 numaralı process'in kim olduğuna bakıyoruz: skype.exe.

Eğer PID alanı Görev Yöneticinizde mevcut değilse "View->Select Columns" Görünüm->Sütun Seç ile PID sütununu görev yöneticinize ekleyebilirsiniz.

İyi muhabbetler..

Sharepoint İlk Yüklenme Süresi Çok Mu Yavaş

  • Sharepoint sisteminize deploy yaparken uzun süre bekliyor ve bu esnada da herhangi bir CPU, Disc veya Network aktivitesi oluşmuyorsa
  • "stsadm" komutunu parametresiz yazdığınızda ekrana birşeyler gelmesi 30 saniye sürüyorsa
  • Sorunun SQL Server'dan kaynaklanmadığını farkettiyseniz
  • Sisteminiz oldukça güvenli öyle ki doğrudan public internet ortamına çıkışa bile izin vermediyseniz..
Kendi kendinize "neyi bekliyor bu sistem" sorusunu yöneltiyorsanız, cevap Certificate Revocation List olabilir. CRL, Microsoft .Net Framework'ün signed edilmiş .net assembly'lerinizi internet tabanlı crl.microsoft.com adresinden kontrol etmek istemesi ve sisteminizin doğrudan public internete çıkışı olmaması sebebi ile timeout süresi kadar beklemesinden ibarettir. Bekleme işleminin timeout'a düşmesi de sisteme log olarak atılmadığı için durumun tam olarak ne olduğunu kestirmekte zorlanabilirsiniz.

Çözüm olarak clr hostname'ine hosts dosyanız aracılığı ile doğrudan erişim verebilir veya crl kontrolünü kaldırabilirsiniz. Eğer çözümünüz crl kontrolünü kaldırmak olacaksa kullanabileceğiniz vbs komutu aşağıdaki gibidir.

const HKEY_USERS = &H80000003
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\default:StdRegProv")
strKeyPath = ""
objReg.EnumKey HKEY_USERS, strKeyPath, arrSubKeys
strKeyPath = "\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing"
For Each subkey In arrSubKeys
objReg.SetDWORDValue HKEY_USERS, subkey & strKeyPath, "State", 146944
Next


Not: Sisteminiz için yukarıdaki vbs çözümünü kullanmak tamamen sizin insiyatifinizdedir.

Can't create table 'db.tablename' (errno: 150)

MySQL'de tablo oluştururken/düzenlerken karşılaşacağınız bu veya buna benzer hatalarda, hatanın sebebi ile ilgili daha detaylı bilgi almak ve sorunun kaynağına ulaşmak için kullanabileceğiniz etikili bir komut (mysql versiyonunuza göre) "SHOW INNODB STATUS" veya "SHOW ENGINE INNODB STATUS" tür.

Create/Alter komutunu çalıştırıp hatayı aldıktan hemen sonra yukarıdaki komutlardan mysql versiyonunuza uygun olanı çalıştırıp hatanın detaylarına ulaşabilirsiniz.

Benim senaryomdaki hatanın detay mesajı:

LATEST FOREIGN KEY ERROR
------------------------
Error in foreign key constraint of table...
You have defined a SET NULL condition though some of the
columns are defined as NOT NULL.


Hata mesajından not null olarak tanımlanan kolon'a Foreign Key ile OnDelete event'inde null set etmeye çalışıldığını ve bunun geçersiz bir işlem olacağı için hataya sebep olacağını görüyoruz.