Oct 31, 2011

Enterprise Single Sign-On Service Error:0x80131700

ESSO service cannot start and giving  error message,
Windows could not start the Enterprise Single Sign-On Service service on 
Local Computer.
Error 0x80131700: 0x80131700 


This is happens after installing .net 4.0 framework. This is known known issue and there is a hotfix to install.

The URL* is, Update for Microsoft Enterprise Single Sign-On v4 (KB2252691)


* last access: 2011-10-31 11:45AM

For more details
http://support.microsoft.com/kb/2252691

Oct 27, 2011

MS SQL Server Backups & Restore: Steps explained

Yes I know, there are lots of articles and posts about this topic. But I want to show, what are things to be known to recover the database to specific point-in-time.

Backup

As you know there are 3 recovery models supported in MS SQL server.
  1. Simple
    • Automatically clear the log file.
    • Only allows  recover to end of a backup.
    • No log backups
  2. Full
    • Requires log backups
    • No work is lost, if data (.mdf) file get damaged/lost
    • Can recover to a specific point-in-time.
  3. Bulk-logged
    • Requires log backups
    • Use minimal logging for bulk operations, thereby reducing the log space
    • Point-in-time recovery is not supported.
In a mission critical environment, Full recovery model is the most recommended. In this post I’m paying attention to this model and simply explain point-in-time recovery.
From your SQL server database you can take, 3 back up types.
  1. Full
  2. Differential
  3. Transaction Log
In Full recovery model, applicability of above types can be depicted in following way.
SQL Backup life cycle
Figure 1
You can see in the Figure 1, Full backup will take all the data from start to the end(let say T1). On the other hand Differential backup will take care of data from last successful Full backup(always) to the end. Whereas, Transaction Log back up will incrementally takes data in subsequent attempts from where the last successful transaction log was taken to the end of the log.  By considering this you can create a backup strategy for your database. It has to be more serious when you are dealing with large and mission critical database. In a little later, I will explaining about restoring of database which will helps you to design the backup strategy.
Here is the T-SQL statements for

Oct 20, 2011

DUMP TRAN <Dbname> WITH TRUNCATE_ONLY & MSSQL 2008

To Shrink the database log file I’ve used to,
   1:  
   2: DUMP TRAN <DatabaseName> WITH TRUNCATE_ONLY
   3: GO
   4:  
   5: USE <DatabaseName>
   6: DBCC SHRINKFILE (<DatabaseName>_log, 100);
   7: GO
   8:  


This is not work in SQL 2008, as DUMP is discontinued. Otherwise we have to use BACKUP.

To shrink the log file in SQL 2008,
  1. Back up the database in “SIMPLE” recovery mode.
  2. then run above line no 6.

Refer this (http://msdn.microsoft.com/en-us/library/ms144262.aspx) for discontinued functionalities in SQL 2008.

Oct 13, 2011

WPF Application Crashes in Windows XP (System.IO.FileFormatException)

Background

Windows XP users are keep complaining me about  crashes of WPF application as soon I released it.  I was wandered, why all Windows 7 users don’t have that. My team mate did couple of enhancements plus adding new application’s window icon. The error message they receive is (crashing message !),

clip_image002[4]

Problem

Since everything working perfectly on Windows 7, something wrong with XP to what we did lastly. That is replacing the icon. But I have no proof for that, but  got a clue from the following screen.

image

Hm…., I change the icon to a very classic one and try it. WOW, it is working fine in XP. Now I want to find out what is the different between this icon and the my icon. I found that my icon containing additional two image types (256x256, 32bit,PNG), which you can be seen from the Visual Studio Icon editor.

Solution

I removed these two image types from the icon file using Visual Studio Icon Editor, added to the application and  it’s work fine.

To justify the situation, I found this (accessed on 10/13/2011 4:21 PM + GMT 5.30) URL and extracted bellow comment.

Make sure the icon has max size 64x64 pixels.
It can still be 32 bit (using alpha channel).

Sep 19, 2011

WS02 Con 2011- Colombo

During last week, I have attended to WS02 conference. The company, WS02, known as SOA company but I would like to call them Platform Enabler. They have done really good work in open source. I’m quite interesting in their ESB product which using by EBay.  

They have implemented open source version of Cloud platform called WSO2 StratosLive is really simple and easy to use.  As a Sri Lankan I’m truly proud of this company. If I’m not wrong, WSO2 started somewhere around 2005-2006, but they made a good journey so far.

Best of luck for your future.

Jun 3, 2011

IIS 7.5: 401 Unauthorized Access Error (Keep prompting Username/password)

Background

Yesterday, my ASP.net applications were migrated to Windows 2008 R2 (64bit).

All applications configurations are,

  1. Developed using .NET v 2.0 & 3.5
  2. Using 32bit COM/wrapper for ERP access
  3. Windows Authentication

Without recompiling, applications were migrated to IIS 7.5. Actions taken on IIS for above 3 are, respectively,

  1. Used “Classic .NET AppPool”
  2. Set “Enable 32-Bit Applications
    iis7_AdvaSett
  3. Enabled Windows Authentication
    iis7_Auth 

Problem

All are accessed by our local intranet users. 95% of the workstations using Windows 7. Rest the XP users complaining me they cannot use the applications, in which keep asking the User Name/password. Though they have entered their domain user name and password it did not accept.

Solution

After one & half day attempt, I solved this issue. Solution can be found in KB 896861. Folks, if you face the same problem, go head with Method 2 in the KB.

Excerpt from the KB

Method 2: Disable the loopback check (less-recommended method)
The second method is to disable the loopback check by setting the DisableLoopbackCheck registry key.
To set the DisableLoopbackCheck registry key, follow these steps:
  1. Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:

    281308 (http://support.microsoft.com/kb/281308/ ) Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name

  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

  4. Right-click Lsa, point to New, and then click DWORD Value.
  5. Type DisableLoopbackCheck, and then press ENTER.
  6. Right-click DisableLoopbackCheck, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. Quit Registry Editor, and then restart your computer.

May 20, 2011

BizTalk 2010 EDI : Parties/Party Migration

Parities cannot be directly migrated from order version to BizTalk 2010. Because,  Trading Partner Management (TPM) has been re-engineered in BizTalk 2010. You have to use BizTalk Server Party Migration Tool.

Party Creation in 2010 is more logical & practical than 2006 R2.

New changes are:

  1. We have to create a party (Trading Partner) along with a business profile. Business Profile is analogue to the business divisions in an organization where can have multiple. Each business profiles define parameters for B2B messaging like identifiers, Encoding formats, Protocol  settings.
     image
    Figure 1
  2. In order to do B2B messaging, we have to define agreement(s) between trading partners. This is very easy to use and understand. 
    image
    Figure 2

    As of Figure 2, once you select the second party (number 3 in the picture)  two more tabs on the dialog (number 6) where you defines the interchange and transaction set settings based on the protocol selected. 

    If you have created protocol settings when creating party, you can select them or leave      –None- to override them. (number 5)

May 19, 2011

BizTalk 2010 Error: Schema referenced by Map ‘<map name>’ has been deleted.

When my BizTalk 2006 R2 applications going to be migrated to BizTalk 2010, I did test run on my test server( BizTalk 2010 on Windows 2008R2 64bit).

Then I choose one of simple live-running application to test with, and I got following error in BizTalk administration console.


TITLE: BizTalk Server Administration
------------------------------
Schema referenced by Map 'Map name goes here' has been deleted. The
local, cached version of the BizTalk Server group configuration is out of date.
You must refresh the BizTalk Server group configuration before making further
changes. (Microsoft.BizTalk.Administration.SnapIn)
For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2010&ProdVer=3.9.469.0&EvtSrc=Microsoft.BizTalk.ExplorerOM.Resources&EvtID=IDS_ERR_FIND_SCHEMA



This is yet another message from BizTalk with no help at all.  I could not be able to refresh whole BizTalk Group\Applications Node in the BizTalk Administration console. I spent couple of hours ,while scratching my head, to find a solution.


Solutions like, restarting BizTalk service, Administration console, etc did not work. But I found solution (not my own) which is really works though it is not recommended.


The solution is SQL,


   1:  
   2: -- Run bellow queries against BizTalkMgmtDb database.
   3: -- You can find the related item here
   4: SELECT * FROM bt_mapspec
   5: -- Replace with correct itemid value
   6: DELETE FROM bt_mapspec WHERE itemid =165 

Reason:

One of blog post suggests, it could be the reason when the Map and references Schemas are in separate assemblies. I can agree with it, i believe , in this application the map and its source schema in two separate assemblies.

Apr 5, 2011

PowerShell Error: the execution of scripts is disabled on this system

When you run powershell scripts (.pl1), in Windows PowerShell console you may received following error.
 
 
File C:\Projects\Microsoft.Practices.ESB\Source\Samples\Management 
Portal\Install\Scripts\Management_Install.ps1 cannot
be loaded because the
execution of scripts is disabled on this system. Please see "get-help
about_signing"
for more de
tails.
At line:1 char:25
+
.\Management_Install.ps1 <;;;<<< 1
+
CategoryInfo :
NotSpecified: (:) [], PSSecurityException
+
FullyQualifiedErrorId : RuntimeException

Error_powershell 

To fix this, run following command, in the console



set-executionpolicy unrestricted

On 64bit version of Windows 2008R2, also make sure to set this command for 64bit  PowertShell, which can be found in C:\Windows\SysWOW64\WindowsPowerShell\v1.0 


After you done, it is recommended to revert the setting by using



set-executionpolicy restricted
 
        OR
 
set-executionpolicy default
 


Mar 11, 2011

DB2/iSeries .net Driver Post Installation Issue

I have installed DB2/iSeries .net driver on my 32bit(Windows 2003 R2) and 64bit(Windows 2008) production servers, which are having .net ver 3.5 SP1 and ver 4.0 respectively.

This is caused to stopped running ASP.net applications.

image You will received above error or “Service Unavailable” error message.

The reason is, as screen shot showing read/read-execution permission of IIS service account to read machine.config has gone.

Set permission for IIS_WPG user as follows,

image

Mar 10, 2011

Visual Studio 2010: Displaying Assembly in “Add Reference” Dialog Box

When you add .net assemblies to the GAC, it is not true they will show in “Add reference” dialog in Visual Studio IDE.

I found http://support.microsoft.com/kb/306149 link which describe the steps that we want to follow.

But, it is not working for VS2010. To work with need to set following Reg Key path.

 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\MyAssembly\
(Default)= “Assembly Folder path”

Feb 15, 2011

Connecting DB2/iSeries From .net Application

I need to connect to a DB2 from a .net application. But it’s  in iSeries system. I did not know what is the way do it. I read lot of articles/blog posts and really helped me. But in this post, I thought to consolidate them for fast reference.

There are two .net data providers for DB2.

  1. IBM.Data.DB2.iSeries
  2. IBM.Data.DB2

Both provider follows same rules/guidelines of common ADO.net components. For an example, both have Connection, Command, DataAdapter, DataReader. But there are differences and limitations.

IBM.Data.DB2.iSeries

Using this provider you can only access to iSeries system. You have to install iSeries Client Access to development machine and/or server. It is quite a bit setup file ( > 3GB with 64Bit version), but we required (refer the bellow screen shots)

  • .NET Data Provider
  • Header,Library and Documentation.

clip_image002Figure 1clip_image002[12]

 

There are limitations/unsupported features [IBM Redbooks 2005 ,Page 38]  in this provider, bellow lists 3 out of 11.

  1. User-defined types (UDTs): Although some features may work, extensive testing has not
    been done using the IBM.Data.DB2.iSeries provider with UDTs.
  2. Distributed relational database architecture (DRDA®), including the CONNECT and
    DISCONNECT statements.
  3. SET TRANSACTION, COMMIT, and ROLLBACK statements: Instead, we recommend
    using the built-in transaction support provided via the iDB2Connection.BeginTransaction()
    method, and the iDB2Transaction object.

I think they have stopped update/improvements for this provider after .net version 1.1

IBM.Data.DB2

This comes as new IBM  data provider for .net 2.0 and having rich features. For the easier development, it is coming with Visual Studio Add-in. Also IBM released beta version for .net 4.0 and add-in for VS 2010. You can see details and download by clicking this link.

Testing DB2 .net connection

After installing either IBM Data Server Client or IBM Data Server Runtime Client, we can test the connection by running following command,

To connect iSeries system, we have to give the port no 446 (default) to the connection string, Server=[IP:PORT].

C:\Program Files\IBM\SQLLIB\BIN>testconn20.exe "User ID=[UserName];Password=[pwd];
Database=[Data Base Or Alias];Server=[IP];"

If this success, it should dump output to the console similar to the following.[Beginning DB2 2008, Page 282]



Step 1:Printing version info
    .NET Framework version: 2.0.50727.42
    DB2 .NET provider version: 9.0.0.2
    Capability bits: ALLDEFINED
    Build: 20070524
    Factory for invairant name IBM.Data.DB2 verified
    Elapsed: 7.15625
 
Step 2: Connecting using "User ID=fuzzy;Password=fuzzy;Database=SAMPLE;
    Server=localhost;ServerType=db2;pooling=false"
    Server type and version: DB2/NT 09.05.0000
    Elapsed: 4.640625
 
Step 3: Selecting rows from SYSIBM.SYSTABLES to validate existence of packages
    SELECT * FROM SYSIBM.SYSTABLES FETCH FIRST 5 rows only
    Elapsed: 0.890625
 
Step 4: Calling GetSchema for tables to validate existence of schema functions
    Elapsed: 1.78125
 
Test passed.




References


[IBM Redbooks 2005]:  Hernando Bedoya,Carlos Carminati,Lorie DuBois,Jarek Miszczyk,Ajit Mungale. Integrating DB2 Universal Database for iSeries with Microsoft ADO .NET. 2005


[Beginning DB2 2008]: Grant Allen,Beginning DB2: From Novice to Professional, Apress 2008

Feb 11, 2011

Visual Studio Add-Ins not showing in the “Tool” menu

For my developments, I am using VS 2005, VS 2008 and VS 2010 side  by side. I have developed couple of Add-ins (XML Add-Ins) for my own use to ease the development, one can be found in this blog.

Last week I installed DB2 connection tool kit( for testing purposes) which installed a VS Add-in (COM Add-in) too. I removed that product from my system, it also removing the Add-ins. My other Add-ins also gone from the “Tool” menu (This happened only to VS 2005 & 2008).

But in Add-In Manger I can see them,

VS Add-In Manger

What I did?

I found lots of tips from the Net. All are talking about Registry Entries and devenv command.

  1. running
    devenv /setup


    failed.


  2. Changing

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\<version>\PreloadAddinStateManaged
    <MyAddIn Name> value

    value 2 to 1 failed.
  3. running
    devenv.exe /resetaddin [Namespace].Class

    worked. This wont delete any Add-ins from the disk. You have to re-load them from the Add-ins Manger.

 


References



  1. Visual Studio Forums
  2. MZ-Tools

Feb 2, 2011

Creating MS SharePoint meeting workspace from MS Outlook 2010

Microsoft SharePoint is tremendous collaboration tool for an organization.  As a software engineer I’m using SharePoint to manage my team, their activities, event customers requirements.

In SharePoint, we can manage meeting workspace where we can store relevant documents, agenda, decisions etc. All attendees can share them, hence it is easy to use for later references.

Here is the simple steps to create meeting workspace from Outlook 2010.

  1. Adding “Meeting Workspace” icon image to the Quick Access tool bar of Meeting window.
    • Go to “Calendar”
    • File-> Option & follow the numbered
      image
  2. Setup the meeting request as usually.
    • Click on “Meeting Workspace” icon
    • Now you can see a panel named “Meeting Workspace” on the right hand side of Meeting request window.
    • There,
      Select a Location.
      Select a type of Meeting workspace. Eg. Basic Meeting Workspace, Blank Meeting Workspace etc.
    • Click on “Link” button and it will embed to meeting workspace link to the email body.
      image

Security


By Default, all invited associates will be granted to read, write and delete information in the workspace.

Jan 20, 2011

Movex Class Builder v2.0

I released Movex Class Builder v 2.0 after 2+ yrs from its initial release.

New Features:

  1. It is showing connected IP and Port. You can change the setting and re-connect the same time. No need to close-and-reopen the Class Builder.

     image5
  2. Checking API Layout.
    This enable us to check consistency in C# class API layout and current Movex API layout.

    image10 

    By clicking on this option, it will search currently connected API is in opened project, it does show the summary dialog box.

    image
    Figure: C# Class and M3 API layout is exactly matched.

    image
    Figure: Having conflicts in the code