- http://msdn.microsoft.com/en-us/library/cc646023.aspx
- netstat –n –a
- PortQry tool
- WF.msc (firewall rule)
- netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = SUBNET profile = CURRENT
- firewall.cpl
Saturday, October 17, 2009
Manage port/firewall
Tools
- Performent analysis
- DTCPing Tool to troubleshoot DTC firewall problem.
- Windows XP small tools
- Anti-virus Portable ClamWin
- Portable Free Download Manager
- Video converter - Format Factory Portable
- FFmpeg - record, convert and stream audio and video
- VLC Media Player – A Multi-platform Multimedia Player
- PhotoFiltre – A Complete Image Retouching Program
- CDBurnerXP - Disc burning app for your USB flash drive
- InfraRecorder Portable to burn DVD
WCF SAP Adapter Error: Incorrect Action
An error occurred during calling an RFC / TRfc / BAPI to SAP
Incorrect Action http://Microsoft.LobServices.Sap/2007/03/blablabla . Correct the specified Action, or refer to the documentation on the allowed formats for the Actions.
This problem occur for only two reason:
The WCF SAP Adapter using WCF Custom adapter, the important thing is the SOAP Action Header under General Tab in Configuration.
this is a sample of SOAP Header:
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="Z_BAPI_PIP3B2_INBOUND" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/Z_BAPI_PIP3B2_INBOUND" />
</BtsActionMapping>
Name parameter correspond to the Operation of the logical orchestration port and Action usually correspond to MessageType without #.
This is default using from adapter wizard.
To be sure to do all correctly you can do that:
Import schema from SAP, after you'll find a Bindinginfo file to create a physical port on BizTalk from admin console.
Open this file and use the value of action paramenter to rename the operation of orchestration logical port.
Deploy all, create physical port with binding file and configure your orchestration.
You could use a your custom action, to do that write WCF.Action context property:
myMessage(WCF.Action)="http://myAction/asd.asd.asd"
This is a grate thing to use multiple operation on a single port
BizTalk troubleshooting
- BAM Web Services and SQL Server mixed mode authentication : http://blogs.msdn.com/tihot/archive/2006/06/13/630313.aspx
- BAM troubeshooting
Please logon local to your BAM Portal server and check the following:
- Open IE and navigate to the BAM Portal for example like this: http://localhost/bam/BamManagementService/BamManagementService.asmx
If it works, your web service is working. - Click: GetViewSummaryForCurrentUser
- Press the Invoke button, displayed in the upper left corner
- If it works, your web service is able to talk to the database
- If it does not work, check the web.config file under for example
C:\Program Files (x86)\Microsoft BizTalk Server 2006\BAMPortal\BAMManagementService
- If it works, your web service is able to talk to the database
<appSettings>
<add key="BamServer" value="SKLAB5026" />
<add key="BamDatabase" value="BAMPrimaryImport" />
</appSettings>
Make sure the correct database server and name is entered. Also check the web.config file of the BAMQueryService as well.
- BizTalk Adapter Package version
ProductVersion for that adapter (most probably under): "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BizTalk Adapter.."
- How TPE log the data to PrimaryImport DB
To be more precise, TPE utilize OrchestrationEventStream to log data to the messagebox.
Later, the TDDS writes data to the PrimaryImport database…
- About DehydrationFailedException: The string '' is not a valid AllXsd value.
This is a serialization issue. While dehydrating, engine tries to serialize objects – apparently in the orchestration code there are some objects being used which are not serializable. We advice to use Atomic Shape in such cases so that orchestration does not dehydrate.
- Set up a Windows Server Cluster on Hyper-V virtual machines using iSCSI for storage (see http://blogs.technet.com/pfe-ireland/archive/2008/05/16/how-to-create-a-windows-server-2008-cluster-within-hyper-v-using-simulated-iscsi-storage.aspx)
- You can see the whitepaper for the BizTalk Adapter pack to get an idea of what the supported scenarios are.
- Since everything is SSL-encrypted I used the .Net tracing from here: http://blogs.msdn.com/dgorti/archive/2005/09/18/471003.aspx
- How to monitor BizTalk performent: http://msdn.microsoft.com/en-us/library/aa578302.aspx
- Creating, Updating, and Deleting a Host Instance Using WMI: http://msdn.microsoft.com/en-in/library/aa560467(en-us).aspx
- BizTalk performent: http://www.unisys.com/eprise/main/admin/corporate/doc/BL100200.pdf
- Keperos in Sharepoint: http://www.windowsecurity.com/articles/Kerberos-Sharepoint-Environment.html
- BizTalk Server Database Optimization: http://msdn.microsoft.com/en-us/library/bb743398.aspx
Chrome - I’m feeling lucky
- Click the Wrench icon, select Options
- On the Basics tab at Default Search, click Manage
- Click Add
- On Name: let's label it as "I'm Feeling Lucky"
- On URL: right-click on the link below and select Copy Link Address and paste it.
- where, btnl=745 acts as I'm Feeling Lucky in Google's search engine
- Click OK to confirm
- Select your "I'm Feeling Lucky" and Make Default
- Close
SharePoint - Delete Library List
- Click to go to the item to be deleted
- Select Form Library Settings in Settings menu
- Click “Delete this form library”



Wednesday, October 14, 2009
My top ten computer favourites - Oct 2009
- Picasa
- Window Commander
- Linux
- Chrome/Firefox
- Visual Studio/Eclipse
- blogger
- gmail
- VNC
- ZoomIt
- ThunderBird
My favourite web sites
- NirSoft - freeware utilities: password recovery, system utilities, desktop utilities
- Sysinternal - Advance utilities for windows
- Apache
- Open source projects
- Java blog
- Photo collections
- Popular Images
- Bookmarking images.
- Comments for MySpace, Hi5 and Orkut
- http://www.glitter-graphics.com/
- http://www.myhotcomments.com/
- Sign generator
- http://lifehacker.biz/
- Bittorrent sites
- Vietnamese Unicode link
How to turn off firewall in Windows 7
- Download and install process hacker (which can be found in here)
- Open Process Hacker --> Service tab
- Kill all processes which have description contains firewall
ZoomIt - simple utility for zooming and drawing on the screen
Tuesday, October 13, 2009
Install BizTalk MQSC Adapter on 64-bit Windows
- The MQSC Adapter only supports 32-bit versions of Microsoft Windows that are supported by BizTalk Server 2006. WebSphere MQ on Windows is not supported on 64-bit versions of Windows. Therefore, the MQSC Adapter is not supported on a 64-bit version of Windows or on a 32-bit BizTalk host instance that is running in a 64-bit version of Windows.
- An update is available that enables you to install the client-based BizTalk Adapter for WebSphere MQ on 64-bit versions of Windows: http://support.microsoft.com/kb/939202
- To obtain this feature immediately, you need to contact Microsoft Customer Support Services to get the file.
- I've updated the update to internet. If you want to try, can get it from here
Useful sysinternal tools.
- Disk2vhd: simplifies the migration of physical systems into virtual machines (p2v).
- Diskmon: captures all hard disk activity or acts like a software disk activity light in your system tray.
- ntfsinfo: Use NTFSInfo to see detailed information about NTFS volumes, including the size and location of the Master File Table (MFT) and MFT-zone, as well as the sizes of the NTFS meta-data files.
- Pendmove: See what files are scheduled for delete or rename the next time the system boots.
- Process Monitor: Monitor file system, Registry, process, thread and DLL activity in real-time.
- psfile: See what files are opened remotely.
- pstool: The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
- PsExec - execute processes remotely
- PsFile - shows files opened remotely
- PsGetSid - display the SID of a computer or a user
- PsInfo - list information about a system
- PsKill - kill processes by name or process ID
- PsList - list detailed information about processes
- PsLoggedOn - see who's logged on locally and via resource sharing (full source is included)
- PsLogList - dump event log records
- PsPasswd - changes account passwords
- PsService - view and control services
- PsShutdown - shuts down and optionally reboots a computer
- PsSuspend - suspends processes
- SDelete: Securely overwrite your sensitive files and cleanse your free space of previously deleted files using this DoD-compliant secure delete program.
- sigcheck: Dump file version information and verify that images on your system are digitally signed.
- Sync: Flush cached data to disk. This tool can be used before removing your thump drive
- Autoruns: See what programs are configured to startup automatically when your system boots and you login.
- Handle: This handy command-line utility will show you what files are open by which processes, and much more. Use Process Expolorer for the UI version.
- ListDll: List all the DLLs that are currently loaded, including where they are loaded and their version numbers. Version 2.0 prints the full path names of loaded modules.
- Process Explorer: Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.
- Process Monitor: Monitor file system, Registry, process, thread and DLL activity in real-time.
- ShellRunas: Launch programs as a different user via a convenient shell context-menu entry
- VMMap: See a breakdown of a process's committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Identify the sources of process memory usage and the memory cost of application features.
Monday, October 12, 2009
Format SQL statement

1. Open Aqua Data Studio which is can be downloaded here.
Monday, October 5, 2009
Eclipse shortcut keys
- How to view/modify shortcuts in eclipse (version 3.4.2): Windows --> Preferences --> General --> Keys
- Delete a line: Ctrl + D
- Active editor: F12
- Find and replace: Ctrl + F
- Incremental find: Ctrl + J
- Duplicate lines: Ctrl + Alt + Down
Wednesday, September 30, 2009
Connect Oracle using ODBC

2. Create a C# console project and insert the code below
Tuesday, September 29, 2009
Tuesday, July 28, 2009
Key blogger
2. http://www.codeguru.com/code/legacy/system/KBHookDemo.zip
(source: http://www.codeguru.com/code/legacy/system/KBHookSrc.zip)
Saturday, July 25, 2009
Disable Additional plugins are required in Firefox
privacy.popups.disable_from_plugins
0 Allow popups from plugins
1 Limit popups to dom.popup_maximum
2 Block popups from plugins
3 Block popups from all plugins (even on whitelisted sites)
Tuesday, July 21, 2009
Serialize object to a string instead of stream
StringBuilder sb = new StringBuilder();
XmlSerializer s = new XmlSerializer(typeof(TradeInfoArray));
StringWriter stringWriter = new StringWriter();
s.Serialize(stringWriter, arrTrade);
result = stringWriter.ToString();
log on locally permission
Log on as a service account
Click Start, point to Run, type mmc, and then click OK.
On the File menu, click Add/Remove Snap-in.
In Add/Remove Snap-in, click Add, and then, in Add Standalone Snap-in, double-click Group Policy Object Editor.
In Select Group Policy Object, click Browse, browse to the Group Policy object (GPO) that you want to modify, click OK, and then click Finish.
Click Close, and then click OK.
In the console tree, click User Rights Assignment.
Where?
- GroupPolicyObject [ComputerName] Policy
- Computer Configuration
- Windows Settings
- Security Settings
- Local Policies
- User Rights Assignment
- GroupPolicyObject [ComputerName] Policy
In the details pane, double-click Log on as a service.
If the security setting has not yet been defined, select the Define these policy settings check box.
Click Add User or Group, and then add the appropriate account to the list of accounts that possess the Log on as a service right.
Mail server on windows server 2008



Monday, July 20, 2009
Sunday, July 19, 2009
Create a new thread
Thread trd;
private void btnRun_Click(object sender, EventArgs e)
{
trd = new Thread(new ThreadStart(this.ThreadTask));
trd.IsBackground = true;
trd.Start();
}
[STAThread]
private void ThreadTask()
{
//Do something here
}
private void btnStop_Click(object sender, EventArgs e)
{
if (trd != null)
{
trd.Abort();
trd = null;
}
}
private void btmExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
copy and paste data to and from Clipboard
Get: System.Windows.Forms.Clipboard.GetText();
Wednesday, July 15, 2009
Mouse class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace FFSAutoTrade
{
class Mouse
{
#region System constants
const uint MOUSEEVENTF_MOVE = 0x0001; /* mouse move */
const uint MOUSEEVENTF_LEFTDOWN = 0x0002; /* left button down */
const uint MOUSEEVENTF_LEFTUP = 0x0004; /* left button up */
const uint MOUSEEVENTF_RIGHTDOWN = 0x0008; /* right button down */
const uint MOUSEEVENTF_RIGHTUP = 0x0010; /* right button up */
const uint MOUSEEVENTF_MIDDLEDOWN = 0x0020; /* middle button down */
const uint MOUSEEVENTF_MIDDLEUP = 0x0040; /* middle button up */
const uint MOUSEEVENTF_XDOWN = 0x0080; /* x button down */
const uint MOUSEEVENTF_XUP = 0x0100; /* x button down */
const uint MOUSEEVENTF_WHEEL = 0x0800; /* wheel button rolled */
const uint MOUSEEVENTF_ABSOLUTE = 0x8000; /* absolute move */
const int SM_CXSCREEN = 0;
const int SM_CYSCREEN = 1;
#endregion
#region Base routines
[DllImport("user32.dll", EntryPoint = "mouse_event")]
static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, uint dwExtraInfo);
[DllImport("user32.dll", EntryPoint = "GetSystemMetrics")]
static extern int GetSystemMetrics(int index);
private static void DoEvent(uint eventType, int globalX, int globalY)
{
globalX = globalX > 0 ? globalX : 0;
globalY = globalY > 0 ? globalY : 0;
uint x = Convert.ToUInt32((float)globalX * 65536 / GetSystemMetrics(SM_CXSCREEN));
uint y = Convert.ToUInt32((float)globalY * 65536 / GetSystemMetrics(SM_CYSCREEN));
mouse_event(MOUSEEVENTF_ABSOLUTE | eventType, x, y, 0, 0);
Thread.Sleep(Delay);
Application.DoEvents();
}
#endregion
public static int Delay = 0;
/// <summary>
/// Press down left mouse button
/// </summary>
/// <param name="globalX">Global X coordinate</param>
/// <param name="globalY">Global Y coordinate</param>
public static void LeftDown(int globalX, int globalY)
{
DoEvent(MOUSEEVENTF_MOVE, globalX, globalY);
DoEvent(MOUSEEVENTF_LEFTDOWN, globalX, globalY);
}
/// <summary>
/// Release left mouse button
/// </summary>
/// <param name="globalX">Global X coordinate</param>
/// <param name="globalY">Global Y coordinate</param>
public static void LeftUp(int globalX, int globalY)
{
DoEvent(MOUSEEVENTF_MOVE, globalX, globalY);
DoEvent(MOUSEEVENTF_LEFTUP, globalX, globalY);
}
/// <summary>
/// Press down right mouse button
/// </summary>
/// <param name="globalX">Global X coordinate</param>
/// <param name="globalY">Global Y coordinate</param>
public static void RightDown(int globalX, int globalY)
{
DoEvent(MOUSEEVENTF_MOVE, globalX, globalY);
DoEvent(MOUSEEVENTF_RIGHTDOWN, globalX, globalY);
}
/// <summary>
/// Release right mouse button
/// </summary>
/// <param name="globalX">Global X coordinate</param>
/// <param name="globalY">Global Y coordinate</param>
public static void RightUp(int globalX, int globalY)
{
DoEvent(MOUSEEVENTF_MOVE, globalX, globalY);
DoEvent(MOUSEEVENTF_RIGHTUP, globalX, globalY);
}
/// <summary>
/// Move Mouse with emulated speed
/// </summary>
/// <param name="globalX">Global X coordinate</param>
/// <param name="globalY">Global Y coordinate</param>
/// <param name="speed">Speed in pixels per move</param>
public static void MoveTo(int globalX, int globalY, int speed)
{
int temp = Delay;
Delay = 50;
if (speed != 0)
{
int cursorX = Cursor.Position.X;
int cursorY = Cursor.Position.Y;
int dX = globalX - cursorX;
int dY = globalY - cursorY;
int steps = Math.Max(Math.Abs(dX / speed), Math.Abs(dY / speed));
if (steps != 0)
{
int stepX = dX / steps;
int stepY = dY / steps;
for (int i = 0; i < steps; i++)
{
cursorX += stepX;
cursorY += stepY;
DoEvent(MOUSEEVENTF_MOVE, cursorX, cursorY);
}
}
}
DoEvent(MOUSEEVENTF_MOVE, globalX, globalY);
Delay = temp;
}
/// <summary>
/// Move mouse
/// </summary>
/// <param name="globalX">Global X coordinate</param>
/// <param name="globalY">Global Y coordinate</param>
public static void MoveTo(int globalX, int globalY)
{
MoveTo(globalX, globalY, 0);
}
public static void DragAndDrop(int startX, int startY, int finishX, int finishY)
{
LeftDown(startX, startY);
MoveTo(finishX, finishY, 10);
LeftUp(finishX, finishY);
}
public static void MoveToAndClick(int globalX, int globalY, int delay)
{
Delay = delay;
MoveTo(globalX, globalY, 10);
Mouse.LeftDown(globalX, globalY);
Mouse.LeftUp(globalX, globalY);
}
public static void ClickAround(int x, int y, int delx, int dely, int step, int DelayTime)
{
int newx, newy;
for (int i = 0; i < delx; i++)
for (int j = 0; j < dely; j++)
{
newx = x + delx * i;
newy = y + dely * j;
Mouse.MoveTo(newx, newy, 10);
if (i + j == 0)
Mouse.Delay = DelayTime;
Mouse.LeftDown(newx, newy);
Mouse.LeftUp(newx, newy);
}
}
}
}
View mouse position on screen
Tuesday, July 14, 2009
Open infopath by browser in Sharepoint
- Open Sharepoint Administration
- Open http://
/_admin/ManageFormsServiceProxy.aspx - Check both checkboxes
- Try to public again.
Monday, July 13, 2009
Modidify the condition for how the workflow be started
Sunday, July 12, 2009
Get field name from schemas
Thursday, July 9, 2009
Want to insert html code into blogger
Can't open .svc file
<location path="Default Web Site/PersonnelBiz">
<system.webServer>
<handlers accessPolicy="Execute, Script">
<add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode" />
<add name="svc-ISAPI-2.0" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
</handlers>