Mar 22, 2012

Enable PING in Windows 2008 R2

In MS Windows 2008R2 ping command dose not working unless you configure the inbound rule in Windows Firewall.

Steps

  1. “Start” –> “Administrative Tools” –> “Windows Firewall with Advanced Security”
  2. “Inbound Rules”-> “New Rule”
  3. image
  4. image
  5. Select “Allow the connection” –> [Finish].

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.

MEC: How to Set Message Counter for EDI Message

When you sending/creating EDI messages it is necessary to include unique message interchange number. This is to ensure each message that we ...