Thursday, December 30, 2010

İletişim ve Hakkımda

Bu blog adresini kullanmıyorum. Güncel Blog Adresim: http://onurgorur.wordpress.com

İletişim:

Facebook: www.facebook.com/onurgorur
Twitter: @onurgorur
Linkedin: http://tr.linkedin.com/in/onurgorur

Hakkımda:
1979 yılında İstanbul’da doğdum. 2000 Yılında İstanbul Üniversitesi Makina Mühendisliği Bölümü’nden mezun olduktan sonra Sabancı Üniversitesi’nde İşletme Yüksek Lisansı eğitimi aldım.

Son sekiz yıldır Microsoft Türkiye’de çalışıyorum. Önceki senelerde Satış Programları Yöneticisi, Teknoloji Uzmanı ve Ürün Yöneticiliği rollerine çalıştım. Bir yılı aşkın süredir Office ve Bilgi Çalışanı Ürün Grubu Pazarlama Müdürü görevini üstleniyorum. Bu görevimde Office, SharePoint, Exchange, Lync, Project gibi iş üretkenliği çözümlerinin Türkiye’de yaygın kullanımı için yerel stratejileri belirliyorum.

Piyano çalmayı ve fotoğraf çekmeyi çok severim. Arada da gitar çalıyorum. Fırsat buldukça yeni yerler görmek için eşimle seyahate çıkarım. Tabii şimdi bize takılan kızım İpek ile seyahatler daha da eğlenceli!

İlgilendiğim konular:

- Piyano, gitar başta olmak üzere her türlü müzik aleti
- Fotoğraf. Nikon sanki daha profesyonel ama Canon’un pratikliği de güzel.
- Pazarlama, özellikle dijital pazarlama
- İş üretkenliği çözümleri (özellikle sevdiklerim: içerik yönetimi, kurumsal arama, süreç yönetimi, birleşik iletişim)
- teknolojik cihazlar (uydu, gps, fotoğraf makinesi, hi-fi, wireless home, wii vs.)

Friday, January 27, 2006

Having problems while deleting Office objects?

Do you encounter problems while deleting objects in Office applications with VSTO 2005 - Visual Studio Tools for Office 2005? This is because of the underlying Office Object model and although you seem to be doing the right thing with iterating through the objects in a collection and deleting them - and the compiler does not raise any errors - most of the time at runtime your code results with unexpected behavior. (it deletes the wrong object, does not delete all objects etc.)

Here is a code with problem:

foreach (Outlook.Attachment _attachment in _mailItem.Attachments)
{ _attachment.Remove }


So here is what you should do: instead of deleting during iteration, create a new .NET Collection, add the objects (in our example attachments) to that collection within the foreach clause and after that delete the objects in the .NET collection.

Happy coding!

Wednesday, January 04, 2006

Türkiye'den 7600 fotoğraf!

Dick Osseman Türkiye'yi köşe bucak gezerek 7600 fotoğraf çekmiş ve bunları internet'te yayınlamış. Aşağıdak adresten fotoğraflara ulaşabilirsiniz.

http://www.pbase.com/dosseman/

Monday, January 02, 2006

Business Contact Manager - Database creation was unsuccessful


Business Contact Manager 2003'ü yükledikten sonra veritabanı yaratılması sırasında (Database Setup) "Database creation was unsuccesful" hatası alıyorsanız BCM kurulumu için biraz uğraşamanız gerekecek :)

Bu hatanın nedeni MSDE (Microsoft Sql Desktop Engine) veritabanı kurulumunda Collation'ın Turkish_CI_AS olarak kurulmasından kaynaklanıyor. Collation nedir diyorsanız: Veritabanlarında alfabetik, numerik ya da belirli bir mantik cercevesinde siraya koyma işinin nasıl yapılacağını tanımlayan bir ayar. Regional Settings Turkish olarak ayarlandığında MSDE de Türkçe'ye uyumlu olmak için bu ayarı Turkish_CI_AS olarak kuruyor.

Ne yazık ki BCM bu şekilde kurulamıyor çünkü Collation'ın LATIN1_GENERAL_CI_AS olarak kurulması gerekiyor. Collation'ı sonradan değiştirmek mümkün değil. (mümkün olabilir ama oldukça zahmetli)

En iyisi

1) BCM'i outlook 2003 üzerine kurun.
2) BCM Service Pack 1'i kurun.
3) Program ekle kaldir'dan MICROSOFTSMLBIZ adlı Sql veritabanını kaldırın.
4) BCMV2UPD.exe yi bir klasör e extract edin. Bunun için Winzip, winrar kullanabilirsiniz.
5) daha sonra yine bir exe yaratılıyor. Onu da aynı şekilde bir klasöre açın.
6) Şimdi SQLMSDE diye bir klasör yaratılmış olmalı
7) Command Prompt'dan bu klasöre erişin ve şunu yazın:

setup.exe SAPWD="AStrongSAPassword" INSTANCENAME="MICROSOFTSMLBIZ" COLLATION="LATIN1_GENERAL_CI_AS" /L*v C:\MSDELog.log

Burada sırasıyla:

a) MSDE için bir strong password tanımlıyoruz. daha strong bişey yazabilirsiniz.
B) SQL instance'ının adını tanımlıyoruz. (bu aynen kalsın)
c) Collation'ı gerektiği şekilde ayarlıyoruz
d) Windows Authentication ( /L*v)
e) log'u şuraya yaz.

8) Kurulum bittikten sonra BCM'i yeniden çalıştırın. Bu defa database sorunsuz yaratılacak.

Kolay gelsin!

Thursday, September 29, 2005

Outlook Anti-Phishing

Microsoft Office Service Pack 2 ile birlikte Outlook’a bir güvenlik özelliği olan “anti-phishing” de eklenmiş oldu.

Phishing, bilinen web sitelerinden, çalışılan bankalardan veya internet servis sağlayıcılarından gönderilmiş gibi gelen e-posta'lar aracılığı ile kişisel bilgilerin elde edilmesini sağlayan dolandırıcılık yöntemi olarak tanımlanıyor.

Phishing mesajları SP2 ile birlikte otomatik olarak Junk E-Mail klasörüne düşüyor, mesaj plain text olarak gösteriliyor ve en önemlisi içerinde bulunan linkler gerçek yönlendirilen adresle birlikte gösteriliyor. Bu sayede istenmeyen web sitelerine yönlendirilmenin önüne geçilmesi amaçlanıyor.

Daha çok bilgi almak için http://office.microsoft.com/en-us/assistance/HA011841931033.aspx adresini ziyaret edebilirsiniz.

Friday, September 23, 2005

Spam Mesaj Gönderimi ve Filtreler - Spam Confidence Level

Spam mesajlar nasıl mı filtreleniyor? Her mesajın “Spam Confidence Level” adında bir değeri bulunuyor. Bu 1-9 arası değişen bir rakam ve mesajın “ne kadar spam” olduğunu bildiriyor. 1=mesaj spam değil, 9= mesaj maximum spamlikte. Bizdeki Exchange Server, 5’in üzerinde spam değer olan mesajları Outlook’a ulaştırmıyor. Spam değeri 4-5 olan mesajlar ise Outlook’da Junk Mail folderına düşüyor.

Bu SPL sahası Outlook’un derinliklerinde gizli. Bu sahayı Outlook’ta ortaya çıkarmak için
http://blogs.msdn.com/exchange/archive/2004/05/26/142607.aspx adresinde bahsedilen adımları gerçekleştirmeniz gerekiyor. http://www.msexchange.org/tutorials/Microsoft-Exchange-Intelligent-Message-Filter.html adresinde de konu ile ilgili teknik bilgi yer alıyor.

Neler etkili olduğuna gelince... Öncelikle mesaj içerisinde yer alan resimler bu değeri artırıyor. Mesajın kimden gittiği de bir etken. Bazı kelimeler (promosyon, kampanya vs.) ve cümle kalıpları da bu rakamı etkilemekte. Bu nedenle mesajınızda bu özel kelimelerin, resimlerin yer almaması gerekiyor.

Bu konuda tam kesin bir sonuç yakalamak mümkün değil çünkü: The technology behind IMF is SmartScreen-based, which means the add-on is able to distinguish between legitimate e-mail messages and unsolicited commercial e-mail or other spam.
SmartScreen tracks over 500,000 e-mail characteristics based on data from hundreds of thousands of MSN Hotmail subscribers who volunteered to classify millions of e-mail messages as legitimate or as spam.

En iyi yöntem şu: Mesajı oluşturun, önce kendinize gönderin. Junk’a düşüyorsa SCL değerini düşürmek için resimleri ve bazı buzz word’leri çıkararak yeniden kendinize gönderin... ta ki mesaj junk’a düşmeyene kadar...

Kolay Gelsin!

Monday, September 19, 2005

Video camera capture in managed code

If you’re running Windows XP, you can use a little-known XP feature called Windows Image Acquisition (WIA) that has a COM library you can program against. This makes capturing either a single frame of a picture or video stream from a USB web cam as easy as 1-2 lines of code.

MSDN Windows Image Acquisition docs –
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wiaaut/wia/wiax/overviews/startpagewiaaut.asp

Code Samples:
http://www.codeproject.com/dotnet/wiascriptingdotnet.asp
http://www.codeproject.com/csharp/webcamservice.asp (DirectShow wrapper)
http://www.codeproject.com/csharp/Motion_Detection.asp

There is also an open source project to program a webcam across any operating system that may interest you -
http://libusb.sourceforge.net/

Happy Coding!

Friday, September 16, 2005

Visual Studio.NET ile Outlook 2003 Uygulamaları - Attachment lar ile oynamak

Visual Studio 2003 ile managed code kullanarak Outlook'u yönetmek ve üzerinde uygulama geliştirmek mümkün. Çoğu zaman kodu sıfırdan yazmak yerine daha önce geliştirilmiş olan örnekleri kullanıp, bu örnekleri değiştirmek işleri hızlandırabiliyor. Böyle bir örneği inceleyelim:

Visual Studio.net 2003 öncelikle bir Com Add-in oluşturuyoruz. Visual Studio’da Com Add-in uygulamaları oluşturmak için: http://support.microsoft.com/?kbid=302901 adresindeki makaleden yararlanabilirsiniz.

- Yukarıdaki makaleyi inceledikten sonra Extensibility.IDTExtensibility2 interface’i hakkında bilgi edinmiş olacaksınız. Bir buton oluşturmak için bu interface’in OnStartupComplete prosedüründe aşağıdakine benzer bir kodla Outlook Standard toolbar’ında istediğiniz butonu ekleyebilirsiniz:

CommandBars oCommandBars;
CommandBar oStandardBar;

try
{
oCommandBars = (CommandBars) myApplication.GetType().InvokeMember("CommandBars", BindingFlags.GetProperty, null, myApplication, null);

}
catch (Exception)
{
object oActiveExplorer;
oActiveExplorer = myApplication.GetType().InvokeMember("ActiveExplorer", BindingFlags.GetProperty, null, myApplication, null);
oCommandBars = (CommandBars) oActiveExplorer.GetType().InvokeMember("CommandBars", BindingFlags.GetProperty, null, oActiveExplorer, null);

}

try
{
oStandardBar = oCommandBars["Standard"];
}
catch (Exception)
{
oStandardBar = oCommandBars["Database"];
}

try
{
MyButton = (CommandBarButton) oStandardBar.Controls["My Button"];
}
catch (Exception)
{
object omissing = System.Reflection.Missing.Value;

MyButton = (CommandBarButton) oStandardBar.Controls.Add(1, omissing, omissing, omissing, omissing);
MyButton.Caption = "My Button";
MyButton.Style = MsoButtonStyle.msoButtonCaption;
}

MyButton.Tag = "My Button";
MyButton.OnAction = "!";

MyButton.Visible = true;
MyButton.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(this.MyButton_Click);

- Burada MyButton_Click gibi bir methodda System.IO class’ını ve MailItem.SaveAs methodunu kullanarak mesajları kaydedebilirsiniz. Örneğin o an seçili mesajı kaydetmek için:

using OL= Microsoft.Office.Interop.Outlook ;
...
OL.MailItem mailItem = (OL.MailItem) myApplication.ActiveExplorer().Selection[1];
MailItem.SaveAs ...


Bir hatırlatma… Visual Studio.net 2003’de Com Add-in uygulaması oluştururken VS eski Office DLL’lerini kullanmakta. Uygulamaya başlamadan önce Referanslardan yeni COM class’ını eklemeyi unutmayın.

Son olarak Visual Studio Tools for Office 2005 ile birlikte çok daha kolay bir şekilde Office uygulamaları geliştirebeceğinizi hatırlatırım. Tabi bunun için biraz daha beklememiz gerekecek. :)

Wednesday, June 22, 2005

Two nice quotes...

Two nice quotes: One for developers, one for photographers...

It is not the strongest of the species that survive, nor the most intelligent, but the ones most responsive to change - Charles Darwin

"Life beats down and crushes the soul and art reminds you that you have one."-- Stella Adler (1902-1992), American actress

Sunday, June 19, 2005

A simple trick to straighten your photos in Photoshop

Select the "Mesure Tool" (in the group as the "eyedropper")

Draw a line on what "should be" straight on your image... edge, horizon, table, wall... anything goes!)
Select >Image>Rotate>Arbitrary... and just like magic, Photoshop has filled in the "angle" field...

Hit "ok"... and your image is now straight!

Crop the image, and scrap it!


Google's image organizer software Picasa 2 has an awesome Straightening tool. It is much easier to do it compared to Photoshop. Give it a try! - http://www.google.com/downloads

Saturday, June 18, 2005

Microsoft Integration Technologies Overview

If you are confused about Microsoft's Integration Technologies, here is a brief overview of their use-cases:

Integrating applications directly

ASP.NET Web Services (ASMX)

Connecting Windows applications with Windows and non-Windows applications via SOAP
.NET Remoting
Connecting Windows applications with other Windows applications via distributed objects
Enterprise Services
Connecting Windows applications with other Windows applications that use distributed transactions, object lifetime management, etc.
Indigo
Connecting Windows applications with Windows and non-Windows applications using web services, distributed transactions, lifetime management, etc. (subsumes ASMX,.NET Remoting and Enterprise Services)

Integrating applications through queues

Microsoft Message Queuing
Connecting Windows applications with other Windows applications using queued messaging
SQL Service Broker
Connecting SQL Server 2005 applications with other SQL Server 2005 applications using queued messaging
Indigo
Connecting Windows applications with other Windows applications using queued messaging (via MSMQ and/or SSB)

Integrating with applications and data on IBM systems

Host Integration Server 2004

Connecting Windows applications with IBM zSeries and iSeries applications and data
Connecting MSMQ with IBM WebSphere MQ

Integrating applications through a broker

BizTalk Server 2006
Connecting Windows applications and non-Windows applications using diverse protocols
Translating between different message formats
Controlling business processes with graphically-defined orchestrations
Connecting with business partners using industry standards, such as RosettaNet and HL7
Providing business process services, such as Business Activity Monitoring and a Business Rules Engine

Integrating data

SQL Server Integration Services
Combining and transforming data from diverse sources into SQL Server 2005 data
SQL Server Replication
Synchronizing SQL Server data with copies of that data in other instances of SQL Server, Oracle, or DB2

Friday, June 17, 2005

Getting the Windows User Identity


1) Add the following line in Web.config:

2) Set IIS access to Windows Authentication and disable anonymous access from IIS Management MMC Snap-in.

3) UserName= HttpContext.Current.User.Identity.Name;

Note: UserName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;" might also return the user name but there is a catch. If you define a static username and password in web.config then this code will always return the name in the web.config. However httpcontext returns the actual user name.

C Omega


C Omega ile Visual Studio 2005’in en önemli hedeflerinden biri olan “daha az kod ile daha çok iş” amacına daha da yaklaşılmış oluyor. C Omega yeni bir dilden ziyade var olan dilleri birleştirmek için geliştiriliyor.

Basit bir örnek vermek gerekirse (Contact veritabanından ismi Onur olan kişilerin isimlerini çekelim)

rows = select distinct FirstName, LastName from MyDatabase.Contacts where FirstName==”Onur”; // “…” kullanmıyoruz. Strong-Typed!
foreach( row in rows ) {
Console.WriteLine("{0}", row.LastName);
}


İşte bu kadar basit. Aynı şeyi XML / XPath queryleri için de yapmak mümkün. Üstelik enterprise uygulamalar için transaction desteği de bulunuyor. Hem de aşağıdaki kadar kolay:

transact(database) {
delete from MyDatabase.Contacts where FirstName == "Onur";
}
commit {
Console.WriteLine("Done");
}
rollback {
Console.WriteLine(“Failed");
}

How to use the ASP.NET utility to encrypt credentials

Use the Aspnet_setreg.exe utility to encrypt and to store these attribute values in the registry under a secure key.

1) Download and Run Aspnet_setreg.exe. The file is available for download from the Microsoft Download Center.

2) Encrypt the userName and password attributes to be used with the section. (You can also do this for the other sections that are mentioned in this article). To do this, type the following command at the command line:

aspnet_setreg.exe -k:SOFTWARE\MY_SECURE_APP\identity -u:"yourdomainname\username" -p:"password"

This command encrypts the userName and password attributes, creates registry keys at any location that you specify, and then stores the attributes in those registry keys. This command also generates output that specifies how to change your Web.config or Machine.config file so that ASP.NET will use these keys to read that information from the registry.

3) Modify the corresponding configuration file to point to these registry keys. If these values must be used in the section, the resulting section resembles the following:

4) Grant Read permissions to the Aspnet_wp.exe process account. Grant Read permissions to the Aspnet_wp.exe process account. - yourservername\ASPNET or yourservername\NetWorkService when using Windows Server 2003 (IIS 6.0).

Happy Coding!

Encrypting QueryStrings

The whole trick to this working is that the QueryString is encrypted and decrypted with the same private key. This is the secret key - if anyone gets a hold of your key, they can decrypt the data themselves, so keep it a secret!

We're going to use a hard-to-crack 8 byte key, !#$a54?3, to keep parts of our QueryString secret.

public string encryptQueryString(string strQueryString)
{
ExtractAndSerialize.Encryption64 oES = new ExtractAndSerialize.Encryption64();
return oES.Encrypt(strQueryString,"!#$a54?3");
}

public string decryptQueryString(string strQueryString)
{
ExtractAndSerialize.Encryption64 oES = new ExtractAndSerialize.Encryption64();
return oES.Decrypt(strQueryString,"!#$a54?3");
}

If we wanted to encrypt our QueryString on our first page, we could do something like this:

string strValues = "search term";
string strURL = "http://yoursite.com?search=" + encryptQueryString(strValues);
Response.Redirect(strURL);

Happy coding!