May 27, 2007

Problem while getting ContentTypeId from url...

This behaviour is from Windows Sharepoint Services 3.0 (wss 3.0).

I have created a contenttype for building a document library with custom metadata information. When the user creates a file she will be redirected to a custom form. The redirection is established by a changing the default document template url in site content type-> advanced settings. While redirecting sharepoint adds some extra request parameter such as List Guid, contentTypeId, and source. The problem is that the contenttypeid does not exactly match the actual one. It partially matches such as while the actual one is sth like this;
0x0101090022F6F433E7D4D248BCDF8A67E8D30F70

the one that comes from url is
0x0101090022F6F433E7D4D248BCDF8A67E8D30F70009A93DD1A0BCCFF47B39D75B5390CA316

it adds some extra bytes there. I thought i could use the string.Contains method for partial matching but that would be a problem since content type id's are not entirely random and they declare some hierarchy. I guess it may be a bug.

May 21, 2007

How to allow relaying in win 2003 smtp server?

First of all be sure that you have configured smtp from Add remove windows programs -> Add remove windows components -> Application Server.

After you have installed the service, open IIS Manager and choose SMTP -> Properties.
Go to "Access" tab and press "Relay". Choose "All except the list below" and uncheck the statement at the bottom. This worked for me.

May 19, 2007

How to clean up word html tags?

It is hard to understand why MS does not allow to create clean html code while saving word documents in html format. Lots of people like me are having difficulties with this issue. Luckily people developed workarounds for this problem. I find some of them especially useful. Try this if you want an online MS word html cleaner. Try this if you want some code sample for cleaning word tags in .Net C#, and this.
Using Regular expressions; link1, link2

May 12, 2007

A useful add-on for visual studio 2005

CoolCommands 3.0 adds some useful commands to your context menu and solution items, check it out here...