Mocking an Http Request-Respose port
I occasionally want to be able to mock a Request-Response port, inthe event the target database is down, or I’m working locally.
The following ASP.NET snippet will allow me to point a two-way Send port at a local ASP.NET page, and gives me complete control over the mocked data I send back:
protected void Page_Load(object sender, EventArgs e)
{
String req = new System.IO.StreamReader(Request.InputStream).ReadToEnd();
Debug.WriteLine(req);
FileStream outputFile = File.OpenRead(@”c:\temp\HttpListener\COPA_extract.xml”);
string extract = new StreamReader(outputFile).ReadToEnd();
//Write out the string to Response
Response.Write(extract);
// Need to call Response.End() or we get the standard Http DOCTYPE tags, etc
Response.End();
}
Debugging BizTalk instances – which one to attach to?
A good hint from Michael.
Determine the Process Id of a specific BTNTSVC.exe instance using the following command line:
tasklist /svc /fi "imagename eq btsntsvc.exe"
-
Archives
- November 2009 (1)
- September 2009 (1)
- August 2009 (2)
- July 2009 (2)
- June 2009 (1)
- April 2009 (2)
- March 2009 (2)
- February 2009 (1)
- January 2009 (1)
- September 2008 (3)
- August 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS


