Thursday, May 03, 2007

BTW, ThumbPosition DOES HAPPENS..!!

So my life revolves around DebugView. I used it constantly when debugging Biztalk or Web Services. It is a great tool to have.

Then one afternoon, I am running MOSS on a VirtualPC 2007 (64bit) of course, and doing some weird calls from Vista into my VPC, when out of the blue, I see this message showing up on my debugview console:

MSEnv extensibility IClassFactory::LockServer(TRUE), lock count: 1 MSEnv extensibility IClassFactory::LockServer(TRUE), lock count: 2 MSEnv extensibility IClassFactory::LockServer(TRUE), lock count: 3 MSEnv extensibility IClassFactory::LockServer(FALSE), lock count: 2 MSEnv extensibility IClassFactory::LockServer(FALSE), lock count: 1 %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s ThumbPosition got called! That never happens. %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s


That's very strange, or should I say WTF?... A search on Live.Com give me a link to the scroll event types, ScrollEventType Enumeration.

I wonder which developer wrote this assert.!!

Anyways, my environment is Vista Enterprise 64bits, VStudio Team Suite with SP1, MOSS 2007, in case someone finds the same error.

It's a conspiracy man..:S

Tuesday, May 01, 2007

Reading appSettings from BTSNTsvc.exe.config in Vista


I am not getting into all of the discussions on what's the best way to store and retrieve information at run time when running Biztalk 2006. For small things, I like to use the BTSNTsvc.exe.config file.

For Windows 2003 you will open the file and add the keys you need, i.e:
<appSettings>

<add key="xxx.newYear" value="2009"/>

<add key="xxx.newXSN" value="http://site.com/template.xsn"/>
</appSettings>
Then inside your orchestration you can have code like this inside your expression/message assignment shape:

sXSNPath = System.Configuration.ConfigurationSettings.AppSettings.Get("xxx.newXSN");
sYear = System.Configuration.ConfigurationSettings.AppSettings.Get("xxx.newYear");

and you can test the values by writting them out:

System.Diagnostics.Trace.WriteLine("bts- XSD:[" + sNewXSNPath + "]");
System.Diagnostics.Trace.WriteLine("bts- Year:[" + sYear + "]");


However, if you are running Vista, these calls return blanks.

The reason for this is the new feature of Vista called Virtual Stores. What this functionality is that it allows your running program to save information into one of the secured folders (Program Files). When in fact, it is creating a virtual location for you. In my case, the actual location of the BTSNTsvc.exe.config file that Biztalk is looking for is located at:

C:\Users\awing\AppData\Local\VirtualStore\Program Files (x86)\Microsoft Biztalk Server 2006

and not in the

C:\Program Files(x86)\Microsoft Biztalk Server 2006 folder.

This could get confusing for some users, since there is no errors or warnings about it. I can see how some applications could get out of sync really quick.

For instance if you have the UAC turn on, and have been using a software that stores its data on the c:\program files\Cust_App\. Then after a couple of weeks/months, you decide to turn off the UAC, you will find, that your application will have missing data.!



Sunday, April 29, 2007

Repair.aspx can't get to the message

In the current project I am working on, there is a need to move some InfoPath forms from one Sharepoint library to another while preserving the information contained in them. The one caveat to this, is that one of the requirement is that we need to modify a couple of fields inside the infopath forms.

In summary these are the tasks that I need to accomplish:
  • Modify the PI (Processing Instructions) for each form in Sharepoint so that they point to the correct template library.
  • Modify some of the data inside of the Infopath forms (since the data is contained inside the Infopath). This includes updating and adding a couple of nodes.
These fields are then used by Biztalk when routing the document to another Sharepoint library. I have tried several approaches.

A. Repair.aspx. This form is found inside the FORMS folder on your Sharepoint library. It does fix the hardcoding href command found on the PI (Processing Instruction) for the InfoPath forms. It will accomplish one of my goals, however the user interface is not the most friendly. For instance, one of the source library location, have over 1500 forms. If you decide to use the Repair.aspx, that's a lot of clicking you got to do..!!

B. Microsoft repair download tool for infopath 2007. This tool can be download here. This is pretty much the EXE version of the repair.aspx. It is called: IPWssUpg.exe. It goes s and change the hard coded values of the InfoPath forms to the current location. This is mainly used when you are moving to a new server, or copying forms to a new library, etc. This tool can accomplish Task 1, but it wont be able to modify the actual content which is what I am after in Task2.

C. Write a .NET component to parse the Sharepoint lists and then load the whole Infopath as an XML file and apply regular expressions to accomplish Task 1 and 2. Lazy.

D. Use Biztalk to do it. Since we already have Biztalk 2006 deployed on the environment, it can be put to good use. ;)

E. Powershell?. maybe, but I don't have the time to learn it right now.

Enter Biztalk 2006. In just 7 lines of code I can accomplish both Task 1 and Task 2. By using the Windows Sharepoint Service Adapter (WSS).

First, setup a basic orchestration:




then on the Message Constructor, add the following lines:

Add Updated PI

1 //Messages are immutable.

2 outMsg = inMsg;

3

4 //populate the new infopath PI

5 sInfopathPI = @"< ?mso-infoPathSolution PIVersion='0.9.0.0' href='some_XSN_Path'? > ....";

6

7 //issue the command

8 outMsg(XMLNORM.ProcessingInstructionOption) = 1;

9 outMsg(XMLNORM.ProcessingInstruction) = sInfopathPI;



WSS Instructions

1 //set the filename for target location

2 outMsg(WSS.Filename) = strFilename + ".xml";



BTS Instructions

1 //if a form document is found on the library, overwrite it.

2 outMsg(WSS.ConfigOverwrite) = "yes";

3 outMsg(WSS.ConfigOfficeIntegration) = "no";


Make sure that both the receiving and sending logical ports are setup to Specify Bindings Later.
Then using the Biztalk Administrator console, configure a Receive Location and a Send Port to use the WSS adapter, put the values for the Sharepoint Library (both source and target locations)

Bind the physical ports to the logical ports, and the ODX will pick the forms from the source library and move them to the target location.

7 lines of code!!! Can't get any lazier than that.. ;)

Friday, April 27, 2007

Biztalk Services

Internet Service Bus? yikes, I am still waiting at the bus stop for the ESB one so that I can do a transfer. :(

Brian wrote a very informative post on the internet service bus concept. Check it out here.

The demo they have at the biztalk labs is ok. I was able to create a personal identity card in less than 5 minutes. Useless, but fun. Then I try to use the Relay Service, and it tells me that I need a Managed Card. WTF? Once again, I think the technology is in its infancy right now, so I am not risking anything by waiting for a few more months for it to mature.

Also the recommended OS to do any development with it is windows 2003. Oh com'on, I am in cloud nine running Vista 64bits, I am not going back...;)

I guess that there are always those VPC's to take you back to nostalgia lane.

Friday, April 20, 2007

Changing PI on an Infopath Form using repair.aspx

So there is this utility inside Sharepoint 2003. If you ever copy your forms from one library location to another library location, they will copy, but the PI (Processing Instructions) inside the Infopath forms will still be pointing to the original location where the template.xsn was located.

So all of your newly copy Infopath forms when opened they will go to the original location for the template. For instance if your original location is:
http://yourSTS_site/Books_2005

and you copy this to a new location, say:
http://yourSTS_site/Books_2006

the Infopath forms in the 2006 library will contain the PI
   15 <?mso-infoPathSolution  PIVersion='0.9.0.0' href='http://yourSTS_site/Books_2005/Forms/template.xsn'?>
   16 <?mso-application  progid='InfoPath.Document'?>
   17 <?mso-infoPath-file-attachment-present?>

and what you really want is the PI to say something like this:

   15 <?mso-infoPathSolution  PIVersion='0.9.0.0' href='http://yourSTS_site/Books_2006/Forms/template.xsn'?>
   16 <?mso-application  progid='InfoPath.Document'?>
   17 <?mso-infoPath-file-attachment-present?>

Enter the repair.aspx utility.! If you type the following:
http://yourSTS_site/Books_2006/Forms/repair.aspx

then you will get a page that will display all of your forms that have the wrong PI embedded into them and then you can select which ones to update.




Click on the Relink Forms command and they will be automatically updated to use the current form library template.

Neat-o.

Wednesday, April 18, 2007

Biztalk Web Service Publishing Wizard not found...!

I have run into this situation a couple of times. It is one of those RTFM, I am blogging it here so that it gets indexed and someone will find it useful.

On a windows server 2003 with multiple server installation. There are times that the Web Service Publishing Wizard option is not available on the Biztalk group.



This is because somewhere along the installation instructions, someone skip the step that instruct you to install Visual Studio 2005. Perhaps this is a mis-conception, that you dont need Visual Studio if you are setting up a QA environment, or even a production environment. This might be true, but if you need to use the Web Service Publishing Wizard, you will need to install the Visual Studio runtime and the SDK for .NET 2.0

Run the Visual Studio Setup. Select custom, then select C# and select the SDK option.



After this is installed you will need to re-run the installation setup for Biztalk. Select Modify and then select the Developers Tools and SDK checkbox. Click OK to continue.



now if you pay attention to the status screen, you will see this message being display



after the installation is done, open the program selection and you will see that now we have the Biztalk Web Services Publishing Wizard available to choose.

Monday, April 16, 2007

Biztalk Only eMagazine

Cool initiative. Todd VanNurden and Sal Cincotta are getting back to the basics and created a magazine dedicated to Biztalk. From his initial email:

"...The goal of BizTalk Hotrod is to provide information beyond what you'd normally find on Microsoft sites and its written by people with the real experience..."

This is going to be awesome!. Go and download the first copy at http://biztalkhotrod.com/default.aspx.

Wednesday, April 11, 2007

Microsoft free developer e-training

Found this link to Dave Bost blog. He has instructions and the voucher number to use in order to access the free e-Learning courses from Microsoft Training. The courses available seems to cover a wide range: Data and XML, Web, .NET 2.0, Windows, ASP.NET, etc.

Check it out here.

Friday, April 06, 2007

Biztalk 2006 Installation on Multiple Servers

So this is the 3rd time I have encountered this error, so I am blogging about it... Hoping, that by blogging it, it will re-inforce this in my brain and next time I encounter this error, it wont take me that long to figure it out.

Installing Biztalk 2006 on an environment that was previously setup by an IT department with a zealous security guy making the decisions on naming conventions and user accounts is a NIGHTMARE. You can have firewall, ports, security policies, insufficient rights to SQL Server, application pools not setup correctly, etc...

This one environment I have had to work with was just like my IM name ;). Anyways, after about an hour or so trying to find out why the configuration of Biztalk 2006 will just suddenly die after creating 3 databases. I keep getting this one error:

BizTalk Server cannot access SQL server. This could be due to one of the following reasons:

  1. Access permissions have been denied to the current user. Either log on as a user that has been granted permissions to SQL and try again, or grant the current user permission to access SQL Server.
  2. The SQL Server does not exist or an invalid database name has been specified. Check the name entered for the SQL Server and database to make sure they are correct as provided during SQL Server installation.
  3. The SQL Server exists, but is not currently running. Use the Windows Service Control Manager or SQL Enterprise Manager to start SQL Server, and try again.
  4. A SQL database file with the same name as the specified database already exists in the Microsoft SQL Server data folder.

Internal error from OLEDB provider: "Cannot open database "BizTalkRuleEngineDb" requested by the login. The login failed."

And btw, I only had access to 2 domain accounts, instead of the 10+ accounts recommended to run Biztalk with. So finally my friend Monish mentioned about installing the SQL client connectivity tools on the Application server where Biztalk was being installed. duh. Just another case of RTFM. Here is the Biztalk Installation Guide. Cleaned up the old DB's and re-started the configuration, and this time it created all databases.

Makes me wonder, why is the configuration tool of Biztalk running and creating half way installation scripts, but yet it can't finish creating the rest of the databases. I guess I need to dig more information into this.

Thursday, April 05, 2007

Search Macros vs Swickis

There is are so many customized search engines out there. We had the original Swickis, and now the Window Live team has come out with the Search Macros.

My only gripe about these macros is that it is very hard to discover what other search macros are available.

I have found this one that was created by the SQL Server 2005 BOL (Books Online Library) team.
http://search.live.com/macros/sql_server_user_education/booksonline

One click and you get access to the latest version of the books online. Versus:
  1. downloading a 130+ MB msi file
  2. installing it
  3. opening CHM file to get to search prompt
If you are at a client site and need to research some sql info on the fly. I believe the Search Macros would be the winner.

Tuesday, April 03, 2007

Biztalk Server 2006 R2 - Beta2 available

Biztalk 2006 R2 was supposed to be out yesterday. However, the official site

http://www.microsoft.com/technet/prodtechnol/biztalk/2006/default.mspx

did not have a link to it. I have found the R2 at this other url:

http://connect.microsoft.com/site/sitehome.aspx?SiteID=65,

you will find the url for the R2 on the right hand side. Click on it and that will take you to the connect home page. You will need to log in with your Microsoft Passport to be able to see your connections.

If you have not applied for the R2 program, scroll to the bottom and apply. After you apply you will be able to see the download screen (see below).

Will post more after I *play* with it… ;)


Monday, April 02, 2007

Welcome, Frazzled Dad...!

Yeah, it is official. Jim Holmes will be joining Quick Solutions.!!! It is exciting to be able to say that we work with 2 of the most influential people in the .NET community in Ohio.

Brian and Jim will take the Solutions Team to a level never before seen...!!!

Welcome to the team, Jim.

Thursday, March 29, 2007

SQL Server 2005 – SP2 available

We can *officially* run SQL Server 2005 on Vista... ;) All of those days of reading messages about SQL not being supported in Vista are finally over.!

Here is the query to determine your version of sql:

SELECT SERVERPROPERTY('ProductVersion')

9.00.1399

SQL Server 2005

9.00.2047

SQL 2005 with SP1

9.00.3042

SQL 2005 with SP2


You can download the SP2 at the SQL Server 2005 SP2 Download Page.

Wednesday, March 28, 2007

Free book on Building Composite Applications - OBA

With the release of Office 2007 and the whole enterprise suite, there seems to be a lot more buzz on the net about creating Office Business Applications (OBAs) to integrate enterprise business. This integration revolves around the idea of the ESB, which of course Biztalk seems to be the best implementation of it. IMHO. ;)

Developing in Sharepoint 2007, Infopath 2007 and Biztalk 2006 seems to fall into this category. There is a book written that Microsoft has made available for free download. Here is the link to Mike Walker's blog. He is one of the authors of the book. You can download the book here.

According to his blog, the LOB (Line Of Business) for loan originations will be out pretty soon. And this LOB will contain all of the files needed to implement the Loan Origination Solution. Including guidance package, enterprise blocks, etc. Nice. I can't hardly wait to start playing with this.

I like how Microsoft is leading the way by providing Best Practices (Enterprise Library) and Guidance Packages(GAX) that developers can follow when implementing enterprise solutions that have reusability and extensibility.

cool.

Sunday, March 25, 2007

Cincinnati Code Camp 2007

Original Plan:
  1. Get Up at 4:00am
  2. Meet James and Monish at 4:30am at the office
  3. Pick up Alexi at 5:00am at the Stringtown exit
  4. Arrive at Cincinnati at about 6:30am
  5. Go to IHOP for breakfast.
  6. Arrive at Code Camp before 7:30am to help out on the registration
Actual Plan:
  1. Phone call at 4:45am from Monish.
  2. [2-5] same workflow
  3. Arrive at Code Camp at 7:45am.
Mental Note: when you are setting your alarm you should make sure it is setup for the correct day. I set my alarm for 4am on FRIDAY... :(

To make up for the lost 30 minutes, I was doing about 74.6 miles/hr down on I-71 South. We make it to Cinci at about 6:50am. However, finding the IHOP was a little bit more complicated than we expected. Google sent us driving through neighborhoods and dead end streets for a while. Finally we made it to the IHOP and the Code Camp.

1st Session: Missed it [front registration duty]

2nd Session: Getting to know Generics by Dustin Campbell
Dustin was showing some of the gotchas using generics. One of the main point he was try to make was that sometimes developers do not know what else is out there and use Generics for all return values. He explained about a couple of namespaces which will return Read-Only generic types, which are safer for public interfaces.

3rd Session: Real World Sharepoint by Jim Holmes
What can I say? He is good.! Jim was doing the Sharepoint 2007 presentation yesterday at DevCares, and today's presentation was not a repeat.! One thing that I learn, is that the BSOD is still available in Windows Vista.! Jim got a BSOD right at the beginning of the session.! :)

4th Session: Intro to XNA by William Steele
Bill's presentations are always amazing. I have a bigger interest in the XNA Development Toolkit, since I am volunteering some of my time to teach kids about programming. So this knowledge will compliment my presentations. I am using Kids Programming Language, and the way XNA works, it seems that this will be an awesome transitions for kids that are captivated by game development and want to move on to more advanced topics.

5th Session: Intro to Robotics by William Steele.
This was by far the most fun presentation I have attended in a long time. The concept with the Microsoft Robotic Studio is almost the same: Microsoft is providing most of the skeleton/framework code for you, so that you can concentrate on the actual code for your robot and not how the robot works.

6th Session: Real World Agile by James Avery
His session was in the same format as the Open Spaces at CodeMash. The only difference was that the topic was defined by James and not the audience. But the 2-way interaction was there and it was good. Good questions and good suggestions from the audience, kept the presentation going past the time. To the point that they were tearing down the wall for the closing session while James was still talking.! funny.

Overall, I think that the Code Camp was a very nice local event. There were plenty of drinks till the end of the day. Food as expected in a conference. It was nice being part of the developer community. I will definitely come back next year. Kudos to Mike Wood and all of the volunteers there, they did an awesome job.

Wednesday, March 21, 2007

Cool Vista Secrets

I have found the site of Tim Sneath (Vista Technical Evangelist). He has posted a couple of hidden treasures that you can find on Vista. It is just AWESOME.

Here is the link:

http://blogs.msdn.com/tims/archive/tags/secret/default.aspx

My favorite secrets:
#4: Disabling UAC

#1: Open comand prompt

#2: Copy as path

#8: Zoom in Explorer.

#11: Deleting the Undeletable
nice, very nice... :)

Tuesday, March 20, 2007

Guidance Automation Toolkit Installation Failure on Vista

When trying to install the Guidance Automation Toolkit under Vista, you might encounter this error:
The installer has encounter an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869.
This is an RTFM issue. ;) According to the documentation of December 2006, it mentions that this error is because of the UAC (User Account Control) of Vista. They also provide the work around: Run the MSI installer from a VStudio Command prompt that has elevated privileges (Run as Admin).

To install the Service Factory on Windows Vista

1. On the taskbar, click Start, point to All Programs, point to Microsoft Visual Studio 2005, and then click Visual Studio Tools.

2. Right-click Visual Studio 2005 Command Prompt, and then click Run as administrator.

3. Using the Change Directory (cd) command, navigate to the folder where the .msi file is located. For example: C:>cd users\me\downloads.

4. Run msiexec.exe using the following syntax.

msiexec /I "GuidanceAutomationToolkit.msi"

5. Complete the remainder of the installation as described in Installing the Service Factory.



the path to these set of instructions can be found on the CHM file:
Web Services Software Factory - December 2006
----Installing the Service Factory

--------How to: Install the Service Factory on Windows Vista

Thursday, March 15, 2007

GUID should contain 32 digits

If you are calling a Store procedure that accepts GUID's as parameters, you will need to initialize those parameters to a valid GUID, before executing the ADO command.

This is the error you will find on the event log:

Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

to solve this, you can either initialize the GUID to Empty:
GUID paramGUID = new GUID.Empty();
or set the parameter to the string:
GUID paramGUID = new GUID("00000000-0000-0000-0000-000000000000");

Wednesday, March 14, 2007

Required Permissions on Web Service Factory

If you get this error, when trying to deploy your ASMX web service factory, it could be because of the trust permission. To fix this problem, open your web.config and anywhere inside the <>,
add the following:
< level ="Full" originurl="">
and it should work.

Server Error in '/XYZServices.Host' Application.
-------------------------------------------------------------------------

Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2738437
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57

[FileLoadException: Could not load file or assembly 'Microsoft.Practices.ObjectBuilder, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Practices.ObjectBuilder, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +580
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +45
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +199
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +37
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +445
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +77
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +596
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +76
System.Web.Compilation.BuildManager.GetVPathBuildResultWithAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +52
System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath) +36
System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context) +44
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +71
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +328
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +146

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210



Monday, March 12, 2007

Intellisense on Infopath 2007

This is a very useful post from the Infopath team blog about enabling IntelliSense on your Visual Studio IDE.

Enabling InfoPath InteliSense Documentation in VSTA and Visual Studio.

Sunday, March 11, 2007

How to pre-compile an ASMX web service

Usage:

aspnet_compiler -? to view options. The ones I used are:

-v

Virtual path of app (i.e. “/MyApp”)

-p

Physical directory of the app

-keyfile

Location of strong name key file (snk)

-f

Overwrite previous content

So for example, we have a web service named SoxAuditWss, if we need to move this web service to the QA machine, we could pre-compile it by using the following command:

aspnet_compiler
-v /SoxAuditWss
-p "C:\vsprojects\Services\SOXAuditWSS"
-f "C:\vsprojects\Services\bin"
-keyfile "C:\vsProjects\Services\BTS\yourkeyhere.snk"

Dont forget to add the Key to the compilation step. This is necessary if you are moving this web service to a different machine.



Thursday, March 08, 2007

Exam 70-235

I have passed the Microsoft exam 70-235. Now I have bragging rights to Biztalk, having passed all 3 exams. :D

70-230: Designing and Implementing Solutions with Microsoft® BizTalk Server 2000, Enterprise Edition.

74-135: Developing EBiz Solutions Using Microsoft BizTalk Server 2004

70-235: TS: Developing Business Process and Integration Solutions using Microsoft® BizTalk® Server 2006

Monday, March 05, 2007

Hidden Emoticons

This is a cool initiative from Microsoft. It is not like those old spams about forwarding a message to all of your friends to get money from Microsoft, or to send email to stop charging for the use of Hotmail.

Read it at the MSN messenger site: http://im.live.com/Messenger/IM/Home

My favorite is the American Red Cross. *red+u , but I think I will be selecting one of each every week this month...
Text Code Cause
*red+u American Red Cross
*bgca Boys & Girls Club
*naf National AIDS Fund
*mssoc National Multiple Sclerosis Society
*9mil ninemillion.org
*sierra Sierra Club
*help StopGlobalWarming.org
*komen Susan G. Komen for the Cure
*unicef The US fund for UNICEF

Thursday, March 01, 2007

Returning GUID from STP

Calling a store procedure to return a GUID:

PROCEDURE lookupGetEquipmentGUIDFromDomainName
@piDomainName nvarchar(50)
AS
BEGIN
SET NOCOUNT ON;

SELECT UPPER(EquipmentGUID) as EquipmentGUID
FROM Equipment
WHERE DomainName = @piDomainName
END


on the ADO.NET, make sure to get the .ToString of the object before converting it to a GUID type.

try
{
oConn.Open();
string s =
oCMD.ExecuteScalar().ToString();
outEquipment.EquipmentGuid = new Guid(s);
}


This will assign the GUID coming back to a type GUID in the object.

Monday, February 26, 2007

SQL 2005 - Database diagram

This error always get me and it reminds me of something Brian has said on one of his agile presentations: First time it occurs, fix it. Second time is coincidence. Third time, refactor it (or something like that...) This is like the 4th time I get this error, so I'm writting it in here so that it get indexed and will help me remember how to fix it.

If you tried to restore a SQL 2000 database backup into a SQL 2005. You will find out that the database diagram does not upgrade easily. If after restoring the database, you click on the database diagrams and get this error:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

There are 3 solutions to this problem:
a. if the default compatibility is other that SQL 2005(90), then set the compatibility level back to sql 2005. This is done by right click on the database then select properties --> Options.



b. Execute the following command on the query analyzer window
ALTER AUTHORIZATION ON DATABASE::your_dbname_here TO sa
then after running this command, you can go ahead and add a new database diagram.

c. If you right-click the database you are interested on. Then select properties, select Files you will see that there is no owner specified on the text box for this database. Enter a valid userID (i.e. sa) in the box. Then the database diagram will start working.

Friday, February 23, 2007

How to Setup Windows Sharepoint Services 3.0

Download the Windows Sharepoint Services 3.0 from the Microsoft Site here. If you are installing it on a Windows 2003 machine, you might get this error:

Setup is unable to proceed due to the following error(s):
-This product requires at least Windows Worflow Foundation version 3.0.4203.2, which is part of the .NET Framework 3.0.
-This product requires ASP.NET v2.0 to be set to 'Allow' in the list of Internet Information Services(IIS) Web
Correct the issue(s) listed above and re-run setup.



Go ahead and download the .NET 3.0 redistributable here.

after installing it and correcting the IIS issue. Run the WSS setup again and select Advanced setup. Then you will come to an screen where you can specify the Server type. From the documentation, this is the difference between Web Front End and Stand-Alone:

Web Front End – only install components required to render content to users. Can add servers to form a SharePoint farm.

A Web server accepts HTTP requests from client computers and passes them to an application server, a database server, or some other computer for processing. When the additional processing is performed, the Web server sends the result back to the client as a Web page. A Web server cannot be used for data storage, search, or as an application server.

Stand-alone – Install all components on a single computer (includes embedded database engine). Cannot add servers to create a SharePoint farm.

A stand-alone, or basic, installation configures a single computer with all the necessary files and settings to create a fully-functioning Windows SharePoint Services implementation, including Web server, application server, and database. An embedded database engine is installed and configured to provide data storage capability. Although the embedded database engine is based on Microsoft SQL Server architecture, it has the following limitations:

  • Lack of enterprise features support.
  • Limited to one CPU.
  • One gigabyte (GB) memory limit for the buffer pool.
  • Databases have a 4 GB maximum size

For the developer machine, choose the stand alone option. After the installation finishes, start the configuration wizard. You might be prompted to start IIS, Sharepoint Admin Service, Sharepoint Timer Service, Click YES on that prompt.

Once this setup is done, you will have a Sharepoint site working on your local machine. You can now create sites with workflows on it and specify different options. It seems that the only workflow you can create is Parallel workflows. I will need to do a little bit more researching on this.

Thursday, February 22, 2007

Delete all RSS feeds from IE 7 on Vista

Annoying. If you need to delete all of the RSS feeds setup on your IE7, you will have to select each entry, right click, select delete, select OK. A quicker way is to go straight to the folder:

C:\Users\awing\AppData\Local\Microsoft\Feeds

and delete them from there.

Tuesday, February 20, 2007

BizUnit and Visual Studio Team Suite

To get BizUnit working, download the latest version of BizUnit from gotDotNet. This is version
2.2 at this point.

workspaces.gotdotnet.com/bizunit

Once you install this application (make sure you add the .MSI extension to the file you download). You will need to recompile the bizUnit libraries.



a. Load the BizUnit solution
b. Open the BiztalkSteps project.
c. Open the HostConductorStep.cs file
d. Go to the Execute method and change the credentials to match your environment.



as you can tell the first item is the userID and the second is the password:
creds[0] = "thunderbolt\\administrator";
creds[1] = "1*ehorizon";

e. Now right click on the BiztalkSteps project and rebuild it.
f. Rebuild the Microsoft.Services.BizTalkApplicationFramework.BizUnit project.

This should all be the binaries that you need to run the BizUnit.

Additionally, there are 3 more projects included in the solution:
a. LoadGenSteps
b. MQSeriesSteps
c. OutlookReadStep

For the LoadGenSteps, if you dont have the Load Generation Tool, then when you try to compile the LoadGenSteps project will give you this error:
Error 52 The type or namespace name 'LoadGen' could not be found (are you missing a using directive or an assembly reference?) C:\Program Files\Microsoft Services\BizUnit 2.2\Src\TestStepLibraries\LoadGenSteps\LoadGenExecuteStep.cs 21 7 LoadGenSteps
and this other error:
Error 53 The type or namespace name 'LoadGenStopEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Program Files\Microsoft Services\BizUnit 2.2\Src\TestStepLibraries\LoadGenSteps\LoadGenExecuteStep.cs 102 53 LoadGenSteps

To fix this download the LoadGen tool from the Microsoft site. Install it and then recompile.

For the OutlookReadSteps, when you try to compile this project you will get this error:
Error 51 The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' (are you missing an assembly reference?) C:\Program Files\Microsoft Services\BizUnit 2.2\Src\TestStepLibraries\OutlookReadStep\OutlookReadStep.cs 25 35 OutlookReadStep
You can just ignore this for now, since outlook might not be installed on the local machine.

Now we are ready to write unit test against any of the artifacts for Biztalk. Create your Test project and add a reference to the BizUnit assembly:

Microsoft.Services.BizTalkApplicationFramework.BizUnit

On the TestInitialize read the SETUP.XML. Inside each of the TestMethod read the TEST#.XML containing your settings for that particular test.

Your code will look something like this:
using Microsoft.Services.BizTalkApplicationFramework.BizUnit;

[TestInitialize]
public void Setup()
{
// Stopping and Starting BizTalkHostInstance
BizUnit bizUnit = new BizUnit(_PathLocation + "Test_Setup.xml", BizUnit.TestGroupPhase.TestGroupSetup);
bizUnit.RunTest();
}

[TestMethod]
public void ValidateDiscount_Rejected()
{
// Stopping and Starting BizTalkHostInstance
BizUnit bizUnit = new BizUnit(_PathLocation + "Test_1_DiscSystem.xml");
bizUnit.RunTest();
}
For BizUnit to work, it reads the configuration files. Each configuration file will contain the same regions into it:
a. TestSetup
b. TestExecution
c. TestCleanup

[TestInitialize]
this will stop and start the host, to make sure that we are using the latest biztalk assembly. A typical configuration file for the setup will look like this:



[TestMethod]
this is the configuration file that will execute the actual unit test. Noticed that you can use any XPath queries inside the ValidationStep. This XPath queries will be your asserts into the values inside the message.




Friday, February 16, 2007

I have won the lottery, South African Lottery that is.

Yes you read it right, I have won the South African NATIONAL Lottery. Please read the section in RED if you would like to participate in next year's drawing, because I have won this year World Cup. :D

Ahhh, maybe I have won this lottery as a gesture of gratitude for all of my help, regarding the frozen African account from the Royal family. Which I helped liberated by providing my Credit card and Bank account number.

And they said that there is no such a thing as free money… :D [<--my notes]


FROM NATIONAL ONLINE LOTTERY HQ.


SOUTH AFRICAN 2010 WORLD CUP LOTTERY AWARD. <--WTF?
LOTTERY HEADQUARTERS: 31, BRITON COURT,
KEMPSTON PARK, JHB.
TICKET NUMBER: 74454774
SERIAL NUMBER: 144-66584
BATCH NUMBER: BT-4478474121P

DRAWS NUMBERS: 6, 7, 11, 21, 26, 37, 44.

AWARD FINAL NOTIFICATION:

We are pleased to inform you of the release, of the long awaited results of the South African 2010 World cup Bid award INTERNANTIONAL LOTTERY PROMOTION held in Zurich, Switzerland on the 12th AUGUST 2006.You were entered as dependent clients with: Reference SERIAL NUMBER: 144-66584 and Batch number BT-4478474121P.

Your email address attached to the ticket number: 74454774 that drew the lucky winning number, which consequently won the sweepstake in the first category, in four parts. You have been approved for a payment of US$2,000,000.00 (Two million United States Dollars) in cash credited to file reference number: IPL/4249859609/WP1.This is from a total cash prize of US ($400,000,000.00) shared among the first 200 Hundred and lucky winners in this category world-wide. <--This beats the MegaMillions.!!!


All participants were selected through a computer ballot system drawn from (100,000,00) companies and individual emails address, as part of our international promotion program.
Due to mixed up of some names and addresses, we ask that you keep this award personal, till your claims has been processed and your funds remitted to you. This is part of our security measures to avoid double claiming or unwarranted taking advantage of the situation by other participants or impersonators, You are therefore directed to contact your claim agent immediately on receipt of this massage for quickened and urgent release of your wining fund. His contact information is as follows: <--Massage? Hummm which site did I go to…. ;)


NAME: MR. James Zulu. <--Related to Mr. Zulu?

TEL: +27-73-135-8128
EMAIL: jameszulu700@yahoo.com


He is your agent, and responsible for the processing and transfer of your winnings to you. YOUR SECURITY FILE NUMBER IS Z-90237-Y67/U4 (keep personal) Remember, your winning must be claimed not later than (1 MONTH) From the date of acknowledgement receipt. Failure to claim your fund will be added to the next 10 Million Dollars lottery promotion. Furthermore, should there be any change in your address, do inform your claims agent as soon as possible. Once again, Congratulations.


FILL THE DETAILS BELOW:

REMEMBER TO QUOTE YOUR REFERENCE SERIAL NUMBERS:

1.TEL:
2.SEX:
3.AGE:
4.NAME:
6.ADDRESS:
7.COUNTRY:
8.OCCUPATION:
9. SERIAL NUMBERS:
10.BATCH NUMBERS:
11TICKET NUMBERS:

FILL AND SEND IMMEDIATELY TO YOUR CLAIM AGENT OFFICE FOR IMMEDIATE TELEGRAPHIC TRANSFER OF YOUR PRIZE MONEY TO YOUR NOMINATED BANK ACCOUNT IN YOUR COUNTRY. <-- Telegraph is dead.... hummm

Yours Sincerely,

MR. Koya Williams.

Monday, February 12, 2007

Vista User Access Control (UAC)

When installing Vista for the first time, you will need to install a whole bunch of development tools. The easier way to install all of the dev tools, is to Turn off the UAC (User Access Control) temporarily, while installing all software. Then once you are done installing them, turn it back on.

This is how you access this feature:

Control Panel --> User Accounts --> User Accounts


Friday, February 09, 2007

Exposing Orchestration as Web Service

Created a very simple orchestration and then deploy it as a web service. Inside the orchestration, on the message assignment calculate the age of the customer based on a distinguished property (BirthYear). Then place this calculated field back into the message for the Age element.

Here is the schema being used:

This is the simple orchestration to test this




On the construct shape, this is the code inside the assignment shape:
outMsg = InMsg;
iAge = System.DateTime.Now.Year - InMsg.BirthYear ;
outMsg.Age = iAge;


Configuration basic:

The port is setup as a One-Way port with Public - no limit for the access restrictions.




On the IIS manager, removed all of the restrictions



when publishing the orchestration, select the following settings:




the Namespace in here is the same namespace than the schema used inside the orchestration. However this is not a requirement for the Orchestration to work.



Once this orchestration is published. Trying to call it from a GUI client (web studio, Windows forms, etc...) you might get several distinct errors on the Application Event Log.

a. Isolated Host
When trying to call it, if you get this error in the Event Log:

The Messaging Engine failed to register the adapter for "SOAP" for the receive location "/SimpleWeb_Proxy/SimpleWeb_Main_IncomingPort.asmx". Please verify that the receive location exists, and that the isolated adapter runs under an account that has access to the BizTalk databases.

This error, tells you that you have not configure the isolated host correctly. The account used, is not part of the Isolated Host User Group.

b. Routing Failure
Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5778
Date: 2/11/2007
Time: 1:04:37 PM
User: N/A
Computer: QSI_TEST
Description:
The Messaging engine failed to process a message submitted by adapter:SOAP Source URL:/SimpleWeb_Proxy/SimpleWeb_Main_IncomingPort.asmx. Details:The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


The message will be suspended. Looking at the Hub Group you can see why this message is being suspended: 0xC0C01B4e(Routing Failure Report).

Right click on the Routing Failure Entry, and then select Troubleshoot Routing Failure, then select Find failed service instance.



If you look at the service details of the message, you can see that the Message Type is empty.



When the message type is empty or not defined, it might be because the pipeline define in the receive location was not set to be an XML pipeline. Change the pipeline and it should work.

Monday, February 05, 2007

Biztalk Pattern Wizard - Beta 1

So Jon Flanders, has put the new pattern wizard for Biztalk 2006 installation on Codeplex. http://www.codeplex.com/PatternWizard. This wizard will allow you to create some of the the most commonly used Enterprise Patterns in Biztalk 2006.



awesome job.!!

Thursday, February 01, 2007

Exporting BAM Activities from Excel 2003

When creating a BAM activity. I wanted to export it to XML.



I get this error: Invalid procedure call or argument



I have read in this BAM FAQ ,that this is problem is due partly because of a security patch from Microsoft.
http://msdn2.microsoft.com/en-us/library/aa972199.aspx


However, when I followed the instructions to get the patch installed, I get this error message:

Installation Error: File not Found
A required installation file SKU111.CAB could not be found




However, looking at my installation CD, I can't seem to find that particular CAB file. Then I found the Microsoft Knowledge Base 896885 addressing this issue. It has to do with the installation CD that was used to install the product. Apparently the customer here installed the office product with the retail version, and I am running Enterprise version.

Office Professional Enterprise Edition 2003 SKU011.CAB
Office Professional 2003 (Retail) SKU111.CAB
Office Professional 2003 w/ InfoPath (Retail) SKU1E3.CAB

Running the LISTool did not fix the problem. I had to re-installed with my Enterprise version of Office in order to get Excel patch correctly, so that I can export the BAM activities to XML. What a pain.