Thursday, December 27, 2007

Tuesday, December 25, 2007

Visual Studio VS SharePoint Designer

A few basic differences between these two amazing development tools
Visual Studio             ==> VS
SharePoint Designer  ==> SPD

  1. Code Behind
          Yes (VS)
          No (SPD)

  2. Development Model
          Graphical Designer (VS)
          Wizard Based (SPD)

  3. Supported WF Hosts
          WSS/MOSS/Others (VS)
          WSS/MOSS (SPD)

  4. Type of WF Supported
          Sequential & State Machine (VS)
          Sequential (SPD)

  5. Activities
          Built-in, Use & Dev Custom (VS)
          Built-In & Use Custom (SPD)

  6. Form Technology
          Design forms in any technology Including
          ASP.NET/InfoPath (VS)
          Auto generated, customizable ASP.NET Forms (SPD)

  7. Modification
          Can modify WF (VS)
          Can’t modify WF using modification forms (SPD)

  8. Association
          Can be associated with multiple content types,
          list and document libraries (VS)
          Associated automatically with a single list at design time,
          No other association possible (SPD)

  9. Debugging
          Yes
          No (SPD)

  10. Deployment
          Must build package & Deploy WF using SharePoint Feature
          technology (VS)
          Automatically Deployed to associated list,
          live Changes (SPD)

Tuesday, December 4, 2007

Setting Up Kerberos For MOSS 2007 Server

1. Configure Service Principle Names (SPN)
The first thing we need to do in order to enable Kerberos for SharePoint is configure Service Principle Names (SPNs) for our SharePoint service accounts (US\Srv_Moss2007) in Active Directory

SPNs are used by Kerberos to ensure that only certain accounts have permission to delegate a specific service on a user's behalf. An SPN needs to be configured for each service and address that the account needs to delegate for. SPNs are configured by using SetSPN.exe

Example for tester22 site:
Setspn –A HTTP/tester22.us.domain.net US\srv_moss2007
Setspn –A HTTP/tester22 US\srv_moss2007

Note: Remove away all the SPN for local host Trust for Delegation
In addition to setting the SPNs for each of your service accounts, you also need to trust each of the computer accounts and some of the service accounts for delegation.

2. Trusting for delegation means that the accounts are allowed to delegate on a user's behalf.
In order to trust for delegation you need to open Active Directory Users and Computers as a user with domain administration rights and follow these instructions

Process the following for “US\Srv_Moss2007”

Locate the account and click 'properties'
Navigate to the 'Delegation' tab
Choose 'Trust this user/computer for delegation to any service (Kerberos)'

3. Enable Kerberos on your web applications
In MOSS 2007, the switch between Kerberos and NTLM is very simple and is undertaken via Central Administration.

If you are creating your farm from scratch, be sure to set Central Administration itself to use Kerberos which you can set as part of the 'SharePoint Products and Technologies Configuration Wizard', however if the farm is pre-created you can easily enable Kerberos by following these steps:

Open Central Administration
Navigation to Application Management > Authentication Providers
Choose the web application you wish to configure from the drop-down in the top right corner (this includes the Central Administration web application)
Click on 'Default'
Set the authentication to Negotiate (Kerberos)
IISRESET

4. Enable Kerberos on your SSP
In this step you enable Kerberos on your SSP. Follow these steps:
Open Central Administration
Navigation to Application Management > Authentication Providers
Choose Web Application
Click on Zone Default
Under Edit Authentication, Section Integrated Windows authentication
Choose Negotiate (Kerberos)
Save and Close

5. Component Services Configuration
We need to set various permissions in Component Services. Follow these steps:

Open Component Services on the MOSS server
Navigation to Component Services > Computers > My Computer
Click on Properties (for My Computer) > Default Properties > Default Impersonation Level = Delegate
Navigate to Component Services > Computers > My Computer > DCOM Config > IIS WAMREG Admin Service
Click on Properties (for IIS WAMREG Admin Service) and navigate to the Security tab
Edit Launch and Activate Permissions
Grant all three of your application pool account 'Local Activation' permissions.

Example:
US\MySiteAppPool
US\SSPAdminAppPool
US\PortalAppPool

6. Troubleshooting Kerberos
Issue these commands and retest

A. KList purge
In the Server as well as testing workstation issue the fallowing command to clear the Kerberos tickets
KList purge
Then answer with flag Y (yes)

B. DNS & NetBIOS State
Issue fallowing command on server as well as workstation
Nbtstat –R
Ipconfig /flushdns

Monday, August 13, 2007

InfoPath 2007 Data Source Field Naming Standards

Just came to know that (after few hrs of debugging) InfoPath might error out If you publish form on to web which could be working without any error or issues in client (office InfoPath 2007)

If you don't fallow the naming standards and again there isn't any official document or note on naming standards from Microsoft!

Let's get down to details:
1. Create field inside Info path Data Source with naming like
GnG_Name [Capital{Small}Capital_FieldName ]


2. Now Bind those Data fields to form (Table)


3.Publish your form & try to view from browser

Oops! it will break with Unclosed Literal String error (works fine in Client)

4. Reopen the Binding

you will notice field break apart into Gn{Space}G_Name

I think it's kind of small BUG compare to beautiful features offered by Microsoft
Hopefully they will fix the Issue

Saturday, May 19, 2007

Large message processing

Typical Large message documents:

  • Large flat file documents with high volume (many records) and occasionally batched
  • Large flat file documents wrapped in a single CDATA section node in an XML
  • Large XML documents with thousands to millions of "rows" that were batched together
  • EDI interchanges where the file or data to be processed independently or in aggregate
  • Large flat document with a header and trailer at the starts and ends of the file with thousands to millions of records, each record need to be processed separately from the others, but the entire sequence must be processed in order to complete properly


Transforming a document with a map is a memory-intensive operation. BizTalk Server passes the message stream to the .Net XslTransform class, which then loads the document into a .NET XPathDocument object for processing in BizTalk 2006/2004, Where as DOM in the case of BizTalk 2002/2000. Loading the document into the .NET XPathDocument can potentially expand the original file size in memory by a factor of 10 or more.

XPathDocument caches information about the nodes of the XML along with the data itself to allow for faster access, but this result into high performance penalties because of the redundant data that sits in the objects. This is where 90%+ of the Out Of Memory (OOM) exceptions that cause orchestrations and receive/send ports to fail.

This expansion may be more pronounced when mapping flat files because flat files must be parsed into XML before they can be transformed

Note:
1 MB document may be enough with JITTed product and user code assemblies, other messages flowing through the process enough to blow the process to 200-500 MB in memory.
Since BizTalk converts the data into XML for internal processing we need to worry more with the flat files (Non-Xml files) thou they are designed to be as efficient as possible in order minimize cost, but XML explicitly stated this as a non-goal, with readability as a much higher priority.


The best recommendation not to send data that is more than 1MB into BizTalk, without some form of custom processing or large memory machines.
If possible try to transform the XML file before passing onto BizTalk Server Orchestration.

Other approach is to use distinguished fields or property promotion in our process. Orchestration does not load the data of the message stream unless required orchestration will fetch the right value without loading the whole message into memory and update the value this is a powerful means to manipulate key fields without loading the whole document into memory.

Adjust the message size threshold above which documents are buffered to the file system during mapping. To modify the size threshold, create a DWORD value named TransformThreshold in the BizTalk Server registry

HKLM\Software\Microsoft\BizTalk Server\3.0\Administration\TransformThreshold

Enter a decimal value with the number of bytes to set the new threshold to. E.g. 2097152 to increase the message size threshold to 2 MB (from the default of 1 MB). Increase this value on systems with a large amount of available memory to improve throughput. Buffering documents to disk conserves memory at a slight cost to overall throughput.

Wednesday, May 2, 2007

Typed/Untyped Messages & its Implementation

Let’s get into details what is a Typed Message?
Typed Message nothing but a strongly typed message conforms to a selected schema (XSD) or .NET class and the message inherits its properties from this schema or .NET class.

Where as Untyped Message nothing but a message which is configured to use System.Xml.Xmldocument as Message type
Or Non-typed Message, which is not tied to a specific schema

Let’s take simple scenario where by you need to receive PO’s (Purchase Orders) from different locations, systems or partners
Then implement predefine business logic (like check stocks, grade, delivery etc), since we are receiving from different sources PO details might vary.

As a developer we might need to define a generic fashion solution rather then customized solution to fit/resolve one issue!
Instead of building multiple solutions, you are now choose to implement Untyped Message process to receive different PO’s
Then implement predefine business logic, which gives you more manageability over the solutions.

Sunday, February 18, 2007

Great way of looking into BizTalk Assembly

As a developer we might wonder some time did I deployed right version of assembly!? Or thou my deployment went fine but I don’t see expected change or result at all!! Which version am I using!? Does my Assembly contain newly deployed schemas! etc

Answer for all this and without opening BizTalk MMC! One DLL registration away! Simply register BtsAsmExt.dll DLL and you are done!!



Regsvr32 "C:\Program Files\Microsoft BizTalk Server 2006\Developer Tools\BtsAsmExt.dll"