November 16, 2007

Cool idea on colloborative annotation

Though it needs some polishing , it is a cool implementation of a cool idea.
May shift paradigms.

November 09, 2007

Biztalk egitim notlari(2006)

egitimci:Hakan Arslan

1.gun

schemas (test)

mapping definitions map schemas to each other

deployment

publish and subscribe architecture

messagebox database: butun mesajlarin d(xml, pdf vs ) sikistirilarak saklandigi veritabani

property promotion : message routing sirasinda kullanilmasi icin secilmis property

her promotion performans icin bir yuk getiriyor(pipeline xpath query si ile bu property i bulup veritabanina ayri bir alana yaziyor)

Delimiter : 0x0D 0x0A

reconfigure biztalk

  1. unconfigure all features
  2. drop all biztalk databases
  3. hakan.bat -> "C:Program FilesMicrosoft SQL Server90ToolsBinnsqlcmd.exe" -i hakan.sql
    pause
  4. hakan.sql ->:connect .
    go
    drop database BAMAlertsApplication
    go
    drop database BAMAlertsNSMain
    go
    drop database BAMArchive
    go
    drop database BAMPrimaryImport
    go
    drop database BizTalkDTADb
    go
    drop database BizTalkEDIDb
    go
    drop database BizTalkHwsDb
    go
    drop database BizTalkMgmtDb
    go
    drop database BizTalkMsgBoxDb
    go
    drop database BizTalkRuleEngineDb
    go
    drop database SSODB
    go
  5. confugure basic config.

2.gun

send port ve receive portlar

receive port enable edilmeden islem baslamiyor

send port enlist edilince mesajlar queue da toplanmaya basliyor, start edilince bu mesajlar islenmeye basliyor

pipeline

passthru pipelinelarda property promotion ve content based routingler calismiyor cunku xml islenmiyor

promotions ->

distinguished dedigimiz zaman bunun ozelliklerine direk olarak orchestration icinden . ile ulasilabiliyor , ve sadece orchestration icinden ulasilabiliyor.

ornegin ->

sOnaylayan=msgSiparisOnay.Siparisler.Onaylayan;

System.Diagnostics.EventLog.WriteEntry("From BTS",sOnaylayan);

sOnaylayan burada bir degisken olarak (variable) onceden tanimlanmis olmali

promoted property dedigimiz zaman icin ise context icinde bu veriler geliyor ve parantez acarak verilere ulasilabiliyor

ornegin->

System.Diagnostics.EventLog.WriteEntry("From BTS",msgSiparis(TestBTS_1.PropertySchema.SiparisNo));

expression lar icinde tamamen c# kodu yaziliyor

3.gun

correlation -> konvoy seklinde islenen mesajlarda, disaridan gelen odeme sekli gibi bir mesajin hangi workflowla ilgili oldugunu bir sekilde tutma

correlation ve correlation setleri tanimlanarak mesajlarin birbirine bagli calismasi saglaniyor

correlation icindeki islemler correlation initializa ile baslatiliyo ve devam eden islemler correlation following olarak isaretleniyor

orch.dehydration -> orchestration un diske yazilmasi

parallel convoy -> parallel convoya eklenen islemlerin ikisi de bitmeden devam etmiyor

kendi kullandigimiz classlarin bulundugu class librarylerin gac da bulunmasi gerekiyor -> gacutil -i

scope icine de variable tanimlanabiliyor ve bu zaman burada kullanilacak classlarin serializable olarak tanimlanmasina gerek yok

ama serializable olmayan bir classi kullanabilmek icin de kod elimizdeyse serializable olarak mark etmek daha mantikli cunku scope

persistence noktalari yuzunden pahali bir islem

transaction icin none verildigi zaman buraya exception handling kodlari yazilabiliyor, none yazmanin amaci bu

web service cagirmalari

4.gun

adapters

sql adapter, sql ve stored procedure

BAM Business Activity Monitor

virtual labs : http://msdn.microsoft.com/virtuallabs/biztalk/

business rules

policy -> business rule grouplari

5.gun

BAM Business Activity Monitor

Excelle kullaniliyor

excel icinden BAM addini aktif hale getirilip gerekli seyler eklenince performansla ilgili bilgiler toplanmaya basliyor

Semalarda

Elementin ozelliklerinde Flat FIle -> Tag Identifier ve Tag Offset

Tag Identifier -> Ayirt edici ozellik mesela header bilgisi satirlarinda 1.karakter H olarak belirtiliyorsa tag identifier H ve tag offet 1 olarak girilmeli

flat file icin semada schema file extensions da flat file check ediliyor

stored procedure tanitmak icin add -> add generated items -> add adapter metadata ile

stored procedure parametrelerini iceren (request ve response) semayi yaratiyor

daha sonra bu semalari orch da kullanmak icin messagelar yaratiyoruz

stored procedure icin ilk asamada schema generate edebilmek icin select icinde xml auto, xmldata predicate i kullaniliyor, daha sonra selectin bu sekilde

kalmasi sorun yarattigi icin schema generate olduktan sonra xmldata predicate i kaldiriliyor

Trace Bundy

Youtube sayesinde tanidigim bu muzisyenin albumleri ve melodileri de bana gore oldukca orjinal , burada ise bir cover parcasini icra etmis.  

Embedded Video

November 06, 2007

Microsoft Sync Framework

For applications that are disconnected sometimes, data synchronization has always been a problem. For such case Microsoft's response is Sync Framework which they claim to work over any network, data type and data store.

September 13, 2007

Using Workflow Foundation in creating dynamic navigation applications in ASP.NET

ASP.NET
— There are a few things to think about when using Windows Workflow Foundation (WF) in ASP.NET and this article is going to cover creating a simple wizard application using lessons learned from a large-scale application using these technologies. The basis of this article and the companion code is a wizard used to enter employee expenses and relies on WF to control what page to display and to provide data for the page. Before we get into the code, let me explain the application in a little more detail.

July 12, 2007

The future of CPU and computer power

This is not the type of blogging I do but I could not keep it in myself. I just can't figure out what will be the the future computer power. As they tell high end cpu power double every 12-16 months for the avarage consumer for the last 10-15 years. In the past we had slow bootups , slow application switches and slow multitasking. Then the cpu producers manufactured faster cpus, chip makers manufactured bigger rams and for some period we had decent computers. Then operating systems slowed down and we had to buy newer cpus. Games always demanded high end systems. Now if you are not a gamer and you are not in a computer power demanding business(RD etc.) what you get in the last 3 years as a computer system will mostly suffice what you need. I just can't understand why an average home user would need a dual-core, quad-core xGb ram , 500gb disk. I may seem like someone who told 640kb system ram would be sufficient, but this is like it. It is like driving a 800hp truck for carrying some couple of books. You just dont need it. Now as MS does always you should buy a pretty decent hardware for running Vista, but why would I need Vista. It is prettier but that has never been the motive for me , at least for an operating system :).

June 14, 2007

A simple WSS 3.0 application backup script

FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B

FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B

FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B

FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B

SET LocalFolder=%mm%%dd%%yyyy%

SET RemoteFolder=

mkdir %LocalFolder%

mkdir %RemoteFolder%

stsadm -o backup -directory %LocalFolder% -backupmethod full -item "Windows Sharepoint Services Web Application"

xcopy %LocalFolder% %RemoteFolder% /E /Y

"Your search cannot be completed because this site is not assigned to an indexer. Contact your administrator for more information."

If your site gives this error when search is accomplished , check this place;

Go to Central Administration -> Application Management -> Content Databases .
Choose your database and on the opening window and at the bottom combobox choose your indexing service.

June 13, 2007

Nice post on Sharepoint utilities collection

Best way to copy document library content inside a sharepoint web application.

I had to copy some bunch of files in a document library to another one. First I tried in browser window -> Open with Windows Explorer. I was on a remote site and this solution seemed to continue forever.
Luckily I opened Sharepoint Designer and to my surprise the copy operation was lightning fast.
I recommend this way if you are copying large and many files...

baris

June 12, 2007

Diagnosing 401 errors

David Wang's excellent post sheds some light on mysterious iis 401 errors.


These also provide useful;
How IIS authenticates browser clients
http://support.microsoft.com/default.aspx?scid=kb;EN-US;264921

Troubleshooting HTTP 401 errors in IIS
http://support.microsoft.com/default.aspx?scid=kb;EN-US;907273

How to change the port of a WSS 3.0 application?

Fastest way:
Change the port in IIS
Change the port in Central Admin -> Operations -> Alternate Access Mappings

Someone else could also go and extend the web application in a different port. That way don't forget to copy your customizations.

June 11, 2007

Enabling search after site restore from full backup

Go to:
  1. Central Administration > Application Management > Content Databases -> Manage Content Databases
  2. Choose your content database
  3. Choose your search server
  4. For manually starting crawl issue stsadm -o spsearch -action fullcrawlstart

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...

March 29, 2007

The system cannot find the file specified. (0x80070002) in Event Log

If your search in Wss 3.0 site returns no results when it should have, check the event log for the error The system cannot find the file specified. (0x80070002). It may be the indication of your windows search service not running. Start it and check if it is ok.

March 20, 2007

Weird behaviour with custom search box control

While i was trying some formatting on the custom search box control that I mentioned in my Customizing wss 3.0 default search scope post I encountered a weird behaviour. I simply issued a format(code beautfy ctrl K-D) command and saved the control , and this made the control invisible on my sharepoint main site. I didn't guess it was because of my command and wrestled with stsadms, reinstall features etc. When I returned back from a backup I was surprised (and happy!) to see it working again.

March 15, 2007

Customizing search results page appearance in WSS 3.0

In this post I will share two tips about the customization of sharepoint search results appearance.
The results page is located in "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\searchresults.aspx". This is the page we will change.
First of all suppose we want to show 5 results page instead of the default 10. Open the aspx page and edit the SearchWC:CoreResultsWebPart.... webpart attributes by adding ResultsPerPage='"5". This should be enough.
As you may have noticed CoreResultsWebPart is a class showing results. Rather than duelling with the Reflector and writing my own class, handling the searches, the followng part was easier and much quicker for me. Secondly, what I wanted to accomplish was to remove the author and date information from the results pages. This was somewhat harder than the first part :). For this I have added another attribute to
SearchWC:CoreResultsWebPart, that is OnPreRender="PreRender_Handler".
Than add the following snippet



public void PreRender_Handler(object sender, System.EventArgs e)
{
CoreResultsWebPart coreResults = (CoreResultsWebPart)sender;
string searchResultsTxt = ((Literal)(coreResults.Controls[0])).Text;
Regex rex = new Regex(@"^\s*-\s*^\s*(\w*)\s*^\s*-\s*^\s*(\d+/\d+/\d+)",
RegexOptions.Multiline);
string replaced = rex.Replace(searchResultsTxt, string.Empty);
((Literal)(coreResults.Controls[0])).Text = replaced;

}



This code gets the search results html page and parses it with a regular expression , for cleaning the htmls of author and publishing date information. The Literal is the container for the html results. The regular expression gets the name and date in groups in case you may want to use them.
Hope it helps...

Customizing wss 3.0 default search scope

In Moss 2007 , you can define custom search scopes from administration application. However, AFAIK, there is no such support for wss 3.0.

As you may know in wss 3.0 your searches are limited to site and its subsites. That is, ff you are in the context of a subsite, your search can not contain items from its parent.
But, for a project, I wanted to enable site-wide search that is all searches will begin from the root site.To enable this behaviour i have followed the steps in
How to: Customize a Delegate Control. After making sure it has worked as expected, I customized the custom control located in "controltemplates" directory. This process consisted of finding the root web site and setting it as the search scope.
Here is the code:
<% string strScopeWeb = null; string strScopeList = null; string strWebSelected = null; /*-----find the root website -----------*/ SPWeb rootweb= null; foreach (SPWeb spweb in SPContext.Current.Site.AllWebs) { if (spweb.IsRootWeb) { rootweb = spweb; break; } } /*----------------*/ SPWeb web = SPControl.GetContextWeb(Context); string strEncodedUrl = SPHttpUtility.EcmaScriptStringLiteralEncode( SPHttpUtility.UrlPathEncode(web.Url + "/_layouts/searchresults.aspx", false, false) ); strEncodedUrl = "'" + strEncodedUrl + "'"; //following line is commented for the search to include root web site //strScopeWeb = "'" + SPHttpUtility.HtmlEncode( web.Url ) + "'"; strScopeWeb = "'" + SPHttpUtility.HtmlEncode(rootweb.Url) + "'"; SPList list = SPContext.Current.List; if ( list != null && ((list.BaseTemplate != SPListTemplateType.DocumentLibrary && list.BaseTemplate != SPListTemplateType.WebPageLibrary) || (SPContext.Current.ListItem == null) || (SPContext.Current.ListItem.ParentList == null) || (SPContext.Current.ListItem.ParentList != list)) ) { strScopeList = list.ID.ToString(); } else { strWebSelected = "SELECTED"; } %>
That's it. You don't need to install the feature again.
Enjoy.

March 14, 2007

Finding root web site

/*-----find the root website to -----------*/
SPWeb rootweb= null;
foreach (SPWeb spweb in SPContext.Current.Site.AllWebs) //this returns all sites in the site
// collection
{
if (spweb.IsRootWeb)
{
rootweb = spweb;
break;
}
}

March 07, 2007

Sharepoint Designer Videos are available

Here are the first series of videos for using Sharepoint Designer 2007.

http://office.microsoft.com/en-us/help/HA102199841033.aspx
Failed to activate feature {GUID} at scope {sitename}

When I created a new web application at a custom port in WSS 3.0, the features on my old web site are NOT activated automatically.
But the features are listed anyway. When you try to activate them from site actions -> site collection features you got this error message:
Failed to activate feature {GUID} at scope {sitename}.
What you should do is to add the dll's of your features to your safecontrols list in your web.config file located in your site root. (namely c:inetpubwwwrootwss{portnumber})
You can copy them from your current site.

March 01, 2007

VMWARE Converter

As you may have noticed, the price fall in cpus, rams and disks made virtualization a hot topic in the IT industry, and I got my share too :).
We have been developing our sharepoint project on a virtual server where two developers remotely connect and use visual studio.
I have been evaluating vmware and virtual server of Microsoft.
Last night while I was browsing I have noticed a free product of vmware , namely Vmware Converter. This beast just takes your physical installed machine
and makes a virtual machine of it. And to my surprise it WORKS! . You might give it a try.
Check it out here.

February 22, 2007

New Application Templates for Windows SharePoint Services 3.0


All of them are released.
Download them here...


February 14, 2007

February 12, 2007

Custom Master Pages in WSS 3.0
After you edit your custom master page for site skinning, the next step is to configure your site to use it.
For creating a custom master page you can use one of the following links as templates;

After you have downloadeded the master page go to your wss 3.0 site which you will change the master page.
Click on Site Settings -> Master Page -> Upload
and upload the custom master page you have downloaded previously.

After you have uploaded the master page the rest is easy.
Open Sharepoint Designer 2007, open your site, goto _catalogs -> masterpages.
Right click on your masterpage and choose "Set as Default Masterpage".
That's it.

I am looking for how to set the custom master page without the use of Sharepoint Designer,
will post it here.


January 31, 2007

Site Admin Templates for WSS 3.0 are released

Some of the templates for WSS 3.0 are release including ;
  • Business Performance Reporting
  • Case Management for Government Agencies
  • Classroom Management
  • Clinical Trial Initiation and Management
  • Competitive Analysis Site
  • Discussion Database
  • Disputed Invoice Management
  • Employee Activities Site
  • Employee Self-Service Benefits
  • Employee Training Scheduling and Materials
  • Equity Research
  • Integrated Marketing Campaign Tracking
  • Manufacturing Process Management
  • New Store Opening
  • Product and Marketing Requirements Planning
  • Request for Proposal
  • Sports League
  • Team Work Site
  • Timecard Management

You can download them here

January 26, 2007

How to allow a blocked file type in WSS 3.0?

WSS 3.0 blocks certain file types listed in
Central Administration -> Security Configuration -> Blocked file types.

You can edit this list to allow a specified filetype.

January 22, 2007

Sample Code for traversing a MindManager xml file

MindJet's MindManager is a good mind mapping software. The best part is it stores the content in an xml file. Locate your mindmanager file, change the extension to .zip and extract the contents.
What you will see is a xml file and associated schemas and image files.

I have written some sample code traversing this file and adding the structure to a treeview. Here is the code sample.

private void btnLoad_Click(object sender, EventArgs e)
{
XmlDocument xdoc = new XmlDocument();
xdoc.Load(@"..\..\SampleData\Document.xml");

TreeNode trn = new TreeNode("Root");
trv.Nodes.Add(trn);

// Create an XmlNamespaceManager to resolve the default namespace.
XmlNamespaceManager nsmgr = new XmlNamespaceManager(xdoc.NameTable);
nsmgr.AddNamespace("mm", "http://schemas.mindjet.com/MindManager/Application/2003");

string xpathQuery = "/mm:Map/mm:OneTopic/mm:Topic";

RecurseChilds(
xdoc.ChildNodes.Item(1).SelectNodes(xpathQuery, nsmgr),
trn,
nsmgr);


}

public void RecurseChilds(XmlNodeList xnl, TreeNode root, XmlNamespaceManager nsmgr)
{
if (xnl != null && xnl.Count > 0)
{
foreach (XmlNode xn in xnl)
{
XmlNode xnTitle= xn.SelectSingleNode("./mm:Text", nsmgr);
if (xnTitle != null)
{
XmlNode xnHyperlink = xn.SelectSingleNode("./mm:Hyperlink", nsmgr);
string treeText = xnTitle.Attributes["PlainText"].Value;
TreeNode trn = new TreeNode(treeText);
if (xnHyperlink != null)
trn.ToolTipText = xnHyperlink.Attributes["Url"].Value;
root.Nodes.Add(trn);
XmlNodeList xnlChildNodes = xn.SelectNodes("./mm:SubTopics/mm:Topic", nsmgr);
RecurseChilds(
xnlChildNodes,
trn,
nsmgr);
}

}
}
}

January 17, 2007

Getting rid of "Welcome System Account"

I have installed WSS 3.0. To my surprise when I tried to log in the system recognized me as sharepoint\system. The problem is even I log with my company domain credentials wss still recognizes me as sharepoint\system. And there is no domain , or server called "sharepoint" either.

I have crawled the web and tried the following with no success

Checked the application pool accounts and changed them to a wss admin account for all content, config databases wss 3.0 uses.
  • I have changed the domain accounts for the windows services for sharepoint.
  • I have checked the local user groups like IIS_WPG etc, removed my domain name.
  • I have checked the database users and switched them to wss admin account.
  • I have swithed the database owners to wss admin account

None of them worked, till Jukka Paajanen [MSFT] solved the problem suggesting the following command On a machine hosting the central admin web application:

stsadm -o updatefarmcredentials -userlogin "domain user" -password "newPassword"

This did the trick!


Thanks Jukka :)

January 14, 2007

Top Worst Domain Names of 2006

I have seen these domain names and I noticed I have never looked the techie site expertsexchange.com like that :D .

Check out the link...

January 13, 2007

Adding Pdf search to WSS 3.0 ,Sharepoint 2007 or MOSS 2007

Adding Pdf search to WSS 3.0 ,Sharepoint 2007, MOSS 2007
Although it is easy to found around, I have compiled the following information anyway:

  1. Download the ifilter plugin for adobe pdf documents.
  2. Install the filter as in told here.
  3. Download the pdf icon here.
  4. Edit C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\XML\DOCICON.XML -> add an entry for pdf
  5. copy the pdf icon to C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\IMAGES
  6. iisreset