Again, this is just one of those things that I feel I should remember, but know I never will:
To set up host names, edit the file C:\WINDOWS\system32\drivers\etc\hosts.
It's a simple text file that maps IP addresses to host server names.
26 May, 2010
12 May, 2010
XML Editor Just Wasted My Day
I can't believe this happened. And yet I can.
Try this:
Copy the following xml snippet into a file and save it with an ".xml" extension:
<rowset>
<row>
<blah>OPN </BLAH>
</ROW>
</ROWSET>
If you open that file in e.g. Notepad++, then you see it as-is.
If you right-click on that file, select "Open With" -> "XML Editor". Now what do you see?
- <rowset>
- <row>
<blah>OPN</BLAH>
</ROW>
</ROWSET>
No padding spaces. 37 missing spaces to be exact.
Now, let's say one is troubleshooting a Biztalk map that it throwing output validation errors because a field exceeds the defined 20 character MaxLength. The input file looks fine (in XML Editor). "Why would Biztalk just pad this thing out to 40 characters?"
Would you say that it would be useful to know that the input file has 37 trailing spaces after the text?
How much time, would you say, one could waste Googling and trying various oddball things trying to get rid of this mysterious series of spaces? My answer to that question is embarrassing.
Not a happy developer today.
Try this:
Copy the following xml snippet into a file and save it with an ".xml" extension:
<rowset>
<row>
<blah>OPN </BLAH>
</ROW>
</ROWSET>
If you open that file in e.g. Notepad++, then you see it as-is.
If you right-click on that file, select "Open With" -> "XML Editor". Now what do you see?
- <rowset>
- <row>
<blah>OPN</BLAH>
</ROW>
</ROWSET>
No padding spaces. 37 missing spaces to be exact.
Now, let's say one is troubleshooting a Biztalk map that it throwing output validation errors because a field exceeds the defined 20 character MaxLength. The input file looks fine (in XML Editor). "Why would Biztalk just pad this thing out to 40 characters?"
Would you say that it would be useful to know that the input file has 37 trailing spaces after the text?
How much time, would you say, one could waste Googling and trying various oddball things trying to get rid of this mysterious series of spaces? My answer to that question is embarrassing.
Not a happy developer today.
19 April, 2010
Excel Solutions - Gross, but Occasionally Useful
So, once again maybe I'm behind the curve a bit, but I just found the Excel project types in VS2008. So in those cases where I need to hack something in Excel, I can now do it with managed code instead of VBA.
There were, however, a few things to note.
1) Security. The code needs to be Fully Trusted to run. In Admin Tools-> Microsoft .NET Framework 2.0 Configuration, go to Configure Code Access Security Policy. Go to Runtime Security Policy->User->Code Groups->All_Code, and add a new code group. I named mine "Ross Dev", based it on URL (specified my dev folder), and gave it Full Trust. Office projects are automatically given Full Trust, but at some point I had to do this, not sure why-- maybe when I tried to move it out of the original location.
This can also be done with the Caspol.exe commandline tool, but I like the GUI.
b) My app had to make a call to a web service, and it took a while to return data. I got a message about "blah blah blah pumping Windows messages blah blah" and mentioned an MDA ("Managed Debugging Assistant"). To turn this @#$% off, note the name of the MDA, go to the Debug->Exceptions... in VS, and expand "Managed Debugging Assistants"-- untick the trouble maker.
3c) The issue I haven't resolved, and therefore have just accepted, is that even though I created the project as an "Excel 2003" app (because the customer has not upgraded to Excel 2007 yet), when I close VS and re-open, it automatically updates the project to Excel 2007. No questions, prompts, or options-- it just does it. I don't know what will happen if it's put on machine with only Excel 2003 though. And I don't particularly care.
There were, however, a few things to note.
1) Security. The code needs to be Fully Trusted to run. In Admin Tools-> Microsoft .NET Framework 2.0 Configuration, go to Configure Code Access Security Policy. Go to Runtime Security Policy->User->Code Groups->All_Code, and add a new code group. I named mine "Ross Dev", based it on URL (specified my dev folder), and gave it Full Trust. Office projects are automatically given Full Trust, but at some point I had to do this, not sure why-- maybe when I tried to move it out of the original location.
This can also be done with the Caspol.exe commandline tool, but I like the GUI.
b) My app had to make a call to a web service, and it took a while to return data. I got a message about "blah blah blah pumping Windows messages blah blah" and mentioned an MDA ("Managed Debugging Assistant"). To turn this @#$% off, note the name of the MDA, go to the Debug->Exceptions... in VS, and expand "Managed Debugging Assistants"-- untick the trouble maker.
3c) The issue I haven't resolved, and therefore have just accepted, is that even though I created the project as an "Excel 2003" app (because the customer has not upgraded to Excel 2007 yet), when I close VS and re-open, it automatically updates the project to Excel 2007. No questions, prompts, or options-- it just does it. I don't know what will happen if it's put on machine with only Excel 2003 though. And I don't particularly care.
06 April, 2010
Valrhona Abinao 85% dark chocolate
Now ordinarily I'd consider 85% cocoa well beyond my chocolatey limits, but turns out this Valrhona one is pretty smooth and is doing a fine job of keeping me awake this first day back at work after a long Easter weekend.
Thanks for the Easter gift, boss!
Thanks for the Easter gift, boss!
Using xpath in BizTalk orchestrations
Because I always forget the syntax... Below is how to get a count of the number of records from within an expression shape:
{variable name}= xpath({MsgName}, "count(//{MsgNode})");
You can use other xpath functions in place of "count".
You can also write values using this method, but you'd need to do this within a construct block shape.
{variable name}= xpath({MsgName}, "count(//{MsgNode})");
You can use other xpath functions in place of "count".
You can also write values using this method, but you'd need to do this within a construct block shape.
24 March, 2010
Biztalk Promoted Properties
Another lovely issue that had me scratching my head: in a schema in Biztalk, I believe that elements that are defined as type "xs:string" have essentially an unlimited length, or at least "unlimited" for any typical purpose that I would come across.
HOWEVER, if that element is specified as a promoted property, then it becomes limited to 256 characters. See "Limitations for Promoting Properties" here.
Sigh.
HOWEVER, if that element is specified as a promoted property, then it becomes limited to 256 characters. See "Limitations for Promoting Properties" here.
Sigh.
23 March, 2010
Re: BizTalk Config Settings
Try creating a helper class that reads the settings from your config file. You should be able to call that from within a message assignment shape in a construct block with no problems.
Subscribe to:
Posts (Atom)