Automating deployment of BizTalk artifacts

Topics: Server Deployment
Jun 30, 2009 at 9:48 AM

Hello All,

I have a couple of biztalk applications which I would have to add to the custom daily build & deployment application.

Will this framework help in automating the process of build & deployment through an existing Deployment application? if so are there any tutorials on using APIs from the framework to automate build & deployment?

We are using BizTalk 2006 R2. We will need to have the BT applications build & deployed from our custom deploy application.

Currently, we just export/import msi files in BizTalk Admin.

Thanks,
Sukal

Coordinator
Jun 30, 2009 at 3:10 PM

Hi Sukal,

Yes.  The Deployment Framework is built on MSBuild, so you can absolutely add it to your automated build process.  The output will be an MSI that you can automatically install on your dev server.  Note that our MSI's use a two-phase install approach -- the MSI delivers the files to the box, and then MSBuild is used to drive the actual undeployment/deployment, so you would need to automate the MSI install and then an MSBuild execute.

I don't have the full command lines handy, but if you install the Deployment Framework and run an MSI build from the VS IDE, you'll see the command-line.  Your best bet is to look at the included sample solution.  The documentation is somewhat out-of-date, so that will also give you good information albeit somewhat incomplete.

Thanks,
Tom

Jul 2, 2009 at 8:20 AM

Hello Tom,

Thanks for your quick response.

However, I am still a bit confused as to how the framework goes about with the automated deployment. Are you suggesting that we will not have to deploy the biztalk application first in order to generate the MSI(by exporting)?

What we would really like is that:

1. The application gets the latest code from TFS and builds it.(Not an issue)

2. It should then create the MSI for the biztalk applications (Without having to deploy first). (This is where we are not clear on how to proceed)

3. Deploy/install it on to the dev server. (Using BTSTask)

If you could just give a brief note on how to proceed using the framework to achieve the same, it would be great.

 

Thanks,

Sukal

Coordinator
Jul 2, 2009 at 2:34 PM
On item 3 -

Deploying it to the Dev server, as you say, is not actually in the scope of the deployment framework at this point.

However, the MSIs that are generated are completely capable of silent installation.  So, it is a fairly straightforward extension to use either TFS Deployer, or just PSExec at the end of your build, to cause:
1) Old build to be undeployed
2) Old build to be uninstalled
3) New build to be installed
4) New build to be deployed

However, samples for doing this are not yet in the framework.  We'd like to get them there.  I've done this kind of thing for clients with both TFS Deployer as well as integrated directly into a particular build type via psexec or similar technology.

Scott

On Thu, Jul 2, 2009 at 3:20 AM, sukalm <notifications@codeplex.com> wrote:

From: sukalm

Hello Tom,

Thanks for your quick response.

However, I am still a bit confused as to how the framework goes about with the automated deployment. Are you suggesting that we will not have to deploy the biztalk application first in order to generate the MSI(by exporting)?

What we would really like is that:

1. The application gets the latest code from TFS and builds it.(Not an issue)

2. It should then create the MSI for the biztalk applications (Without having to deploy first). (This is where we are not clear on how to proceed)

3. Deploy/install it on to the dev server. (Using BTSTask)

If you could just give a brief note on how to proceed using the framework to achieve the same, it would be great.

 

Thanks,

Sukal

Read the full discussion online.

To add a post to this discussion, reply to this email (biztalkdeployment@discussions.codeplex.com)

To start a new discussion for this project, email biztalkdeployment@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
scott colestock
612.559.0580
Coordinator
Jul 2, 2009 at 3:20 PM

Sukal, the answer to your question is yes.  With the Deployment Framework you do NOT have to deploy your BizTalk app and then export it.  Instead, you build your BizTalk solution (VS or command-line) and then call a Deployment Framework MSBuild target to directly generate an MSI from your build output (VS or command-line).  Try out the included sample and you'll see how that works.  Please let us know if you have any questions once you've tried it out.

Thanks,
Tom

Jul 6, 2009 at 10:05 AM

Hello Tom & Scott,

After having gone through the documentation and trying out the sample apps, here is what I found which would probably help my case... Please let me know if I am headed in the right direction.

In order to have the MSI generated automatically from TFS source code.. we could be using the Automated WiX generation. In that case:

1) Will I be required to include the WiX setup in all BizTalk Applications?

2) Will this build the MSI which is readily deployable to dev server, using BTSTask? Or will there be any other manual config changes needed?

Any documentation on step-wise procedure in implementing the same would be really appreciated.

Thanks,

Sukal

Coordinator
Jul 8, 2009 at 5:25 AM
#1 - Not quite sure what you are asking here.  The scripts which generate WiX are generally maintained with each BizTalk project you have.

#2 - The MSI deploys the content, and then provides a CMD file (wired to a start menu shortcut) to actually kick off the deployment process.

Check out the existing sample and documentation.  It isn't perfect, but should get you started.

On Mon, Jul 6, 2009 at 5:05 AM, sukalm <notifications@codeplex.com> wrote:

From: sukalm

Hello Tom & Scott,

After having gone through the documentation and trying out the sample apps, here is what I found which would probably help my case... Please let me know if I am headed in the right direction.

In order to have the MSI generated automatically from TFS source code.. we could be using the Automated WiX generation. In that case:

1) Will I be required to include the WiX setup in all BizTalk Applications?

2) Will this build the MSI which is readily deployable to dev server, using BTSTask? Or will there be any other manual config changes needed?

Any documentation on step-wise procedure in implementing the same would be really appreciated.

Thanks,

Sukal

Read the full discussion online.

To add a post to this discussion, reply to this email (biztalkdeployment@discussions.codeplex.com)

To start a new discussion for this project, email biztalkdeployment@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
scott colestock
612.559.0580
Coordinator
Jul 8, 2009 at 5:41 AM

1) You are required to include the <project>.Deployment folder in every project, as you see in the sample.
2) Once the project is configured with the Deployment Framework, it will be able to create MSI's from Visual Studio or MSBuild.  If you run the Build MSI process in Visual Studio for the sample, you'll see the command line in the Output window.  The MSI is not deployed with BTSTask.  If you have not generated and installed an MSI from the sample, I'd suggest that you give that a try.

Thanks,
Tom

Jul 14, 2009 at 6:04 PM
Edited Jul 20, 2009 at 6:20 PM

We are also working a simlar project.  I am attempting to use this framework as part of a continuous integration process.  I have the framework functioning correctly through the IDE but now I am attempting to automate the process using TFS Build/MSBuild.

Let me ask some specific questions reagarding the automated build process which I still find pretty unclear after reading the documentation and looking at the sample project.  We can build our Biztalk solution, and create the msi using the IDE.  I can also create the MSIs by doing the build through the IDE and running the BuildDebugMsi.bat script.  The problem arises as soon as we move the drop location from inside the project to a location on the build server using TFS Build.  If I attempt to call the BuildDebugMsi batch scritpt from my .proj build script it fails becuase of missing assemblies.  I have also attempted to run msbuild.exe on the btdfproj file unsuccessfully from the build script.

What step(s) am I missing?  Any suggestions are greatly appreciated.

Thanks,

Scott

Coordinator
Jul 14, 2009 at 6:15 PM

It sounds like you don't have the BizTalk developer tools/sdk installed on your build server.  In BizTalk 2009 there is a new MSBuild option in the installer that gives you just what you need for command-line builds.  In previous versions you need to have VS 2005 and BizTalk installed on the build server.

Jul 20, 2009 at 4:00 PM
Edited Jul 21, 2009 at 7:14 PM

Thanks for the quick reply.  I just ended up calling the devenv.exe using MSBuild exec to build our project to avoid the problem.  What was happening is that the script that creates the MSI is looking inside the project bin directories for the assemblies but in the automated build script the drop location is outside the project folders.

Preface:  I am building an automated build/unit test/deploy/smoke test environment for continuous integration using MSBuild.

 Right now we are using a single MSBuild script  to:

  1. build
  2. unit test
  3. I am using your framework to create the MSI
  4. copying the msi to the BizTalk server,
  5. install using the msi,
  6. stopping the BizTalk service,
  7. deploying,
  8. re-start the service
  9. Run a set of smoke tests in the actual environment

Questions:  

  1. How can I create a silent installer to accept the SettingsFileGenerator.xml file?  
  2. What/how can I call the undeply/deploy from the command line?

Every piece is in place and functioning except for the silent install of the BizTalk solution and remote deploy/undeploy.  Its so close!

Coordinator
Jul 22, 2009 at 2:21 PM
If you are already doing the deployment, you must be using some sort of remote call mechanism (like PSExec or telnet or...) to initiate the deploy, correct?

If so, you can feed the name of an environment to deploy by setting an environment variable prior to doing the deploy itself.  This is how SetEnvUI feeds the environment name in when you use the start menu shortcut.

On Mon, Jul 20, 2009 at 11:01 AM, sbeamish <notifications@codeplex.com> wrote:

From: sbeamish

Thanks for the quick reply.  I just ended up calling the devenv.exe using MSBuild exec to build our project to avoid the problem.  What was happening is that the script that creates the MSI is looking inside the project bin directories for the assemblies but in the automated build script the drop location is outside the project folders.

Preface:  I am building an automated build/unit test/deploy/smoke test environment for continuous integration using MSBuild.

 Right now we are using a single MSBuild script  to:

  1. build
  2. unit test
  3. I am using your framework to create the MSI
  4. copying the msi to the BizTalk server,
  5. install using the msi,
  6. stopping the BizTalk service,
  7. deploying,
  8. re-start the service.

 

Next issue:  How can I create a silent installer to accept the SettingsFileGenerator.xml file?

I thank you for your patience and help in this matter.  I am responsible for Building and Releasing a BizTalk solution without being a BizTalk Developer.

Read the full discussion online.

To add a post to this discussion, reply to this email (biztalkdeployment@discussions.codeplex.com)

To start a new discussion for this project, email biztalkdeployment@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
scott colestock
612.559.0580
Jul 22, 2009 at 3:29 PM
You are correct. We are using PSExec to copy the msi to the deploy server, running msi using psexec. I was looking at the scripts and I need to set ENV_Settings and the last biztalk server value. It is just as simple as passing these into the deploy.bat script?


From: scolestock [mailto:notifications@codeplex.com]
Sent: Wednesday, July 22, 2009 9:22 AM
To: Beamish, Scott
Subject: Re: Automating deployment of BizTalk artidfacts [biztalkdeployment:61048]

From: scolestock

If you are already doing the deployment, you must be using some sort of remote call mechanism (like PSExec or telnet or...) to initiate the deploy, correct?

If so, you can feed the name of an environment to deploy by setting an environment variable prior to doing the deploy itself. This is how SetEnvUI feeds the environment name in when you use the start menu shortcut.

On Mon, Jul 20, 2009 at 11:01 AM, sbeamish <notifications@codeplex.com> wrote:

From: sbeamish

Thanks for the quick reply. I just ended up calling the devenv.exe using MSBuild exec to build our project to avoid the problem. What was happening is that the script that creates the MSI is looking inside the project bin directories for the assemblies but in the automated build script the drop location is outside the project folders.

Preface: I am building an automated build/unit test/deploy/smoke test environment for continuous integration using MSBuild.

Right now we are using a single MSBuild script to:

  1. build
  2. unit test
  3. I am using your framework to create the MSI
  4. copying the msi to the BizTalk server,
  5. install using the msi,
  6. stopping the BizTalk service,
  7. deploying,
  8. re-start the service.

Next issue: How can I create a silent installer to accept the SettingsFileGenerator.xml file?

I thank you for your patience and help in this matter. I am responsible for Building and Releasing a BizTalk solution without being a BizTalk Developer.

Read the full discussion online.

To add a post to this discussion, reply to this email (biztalkdeployment@discussions.codeplex.com)

To start a new discussion for this project, email biztalkdeployment@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
scott colestock
612.559.0580

IMPORTANT: The sender intends that this electronic message is for exclusive use by the person to whom it is addressed. This message may contain information that is confidential or privileged and exempt from disclosure under applicable law. If the reader of this message is not an intended recipient, be aware that any disclosure, dissemination, distribution or copying of this communication, or the use of its contents, is prohibited. If you have received this message in error, please immediately notify the sender of your inadvertent receipt and delete this message from all data storage systems. Thank you.

Coordinator
Jul 22, 2009 at 3:38 PM
Well, you don't pass them as command line parameters to the BAT - you set them as environment variables prior to calling the BAT.  You can do this with your own wrapping cmd/bat file, or through another mechanism you prefer.

On Wed, Jul 22, 2009 at 10:29 AM, sbeamish <notifications@codeplex.com> wrote:

From: sbeamish

You are correct. We are using PSExec to copy the msi to the deploy server, running msi using psexec. I was looking at the scripts and I need to set ENV_Settings and the last biztalk server value. It is just as simple as passing these into the deploy.bat script?


From: scolestock [mailto:[email removed]]
Sent: Wednesday, July 22, 2009 9:22 AM
To: Beamish, Scott
Subject: Re: Automating deployment of BizTalk artidfacts [biztalkdeployment:61048]

From: scolestock

If you are already doing the deployment, you must be using some sort of remote call mechanism (like PSExec or telnet or...) to initiate the deploy, correct?

If so, you can feed the name of an environment to deploy by setting an environment variable prior to doing the deploy itself. This is how SetEnvUI feeds the environment name in when you use the start menu shortcut.

On Mon, Jul 20, 2009 at 11:01 AM, sbeamish <notifications@codeplex.com> wrote:

From: sbeamish

Thanks for the quick reply. I just ended up calling the devenv.exe using MSBuild exec to build our project to avoid the problem. What was happening is that the script that creates the MSI is looking inside the project bin directories for the assemblies but in the automated build script the drop location is outside the project folders.

Preface: I am building an automated build/unit test/deploy/smoke test environment for continuous integration using MSBuild.

Right now we are using a single MSBuild script to:

  1. build
  2. unit test
  3. I am using your framework to create the MSI
  4. copying the msi to the BizTalk server,
  5. install using the msi,
  6. stopping the BizTalk service,
  7. deploying,
  8. re-start the service.

Next issue: How can I create a silent installer to accept the SettingsFileGenerator.xml file?

I thank you for your patience and help in this matter. I am responsible for Building and Releasing a BizTalk solution without being a BizTalk Developer.

Read the full discussion online.

To add a post to this discussion, reply to this email (biztalkdeployment@discussions.codeplex.com)

To start a new discussion for this project, email biztalkdeployment@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
scott colestock
612.559.0580

IMPORTANT: The sender intends that this electronic message is for exclusive use by the person to whom it is addressed. This message may contain information that is confidential or privileged and exempt from disclosure under applicable law. If the reader of this message is not an intended recipient, be aware that any disclosure, dissemination, distribution or copying of this communication, or the use of its contents, is prohibited. If you have received this message in error, please immediately notify the sender of your inadvertent receipt and delete this message from all data storage systems. Thank you.

Read the full discussion online.

To add a post to this discussion, reply to this email (biztalkdeployment@discussions.codeplex.com)

To start a new discussion for this project, email biztalkdeployment@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
scott colestock
612.559.0580
Coordinator
Jul 22, 2009 at 3:53 PM

The specific environment variable name is ENV_SETTINGS, and it should contain the full path not to SettingsFileGenerator.xml but to the appropriate environment-specific XML file.  Those are normally exported from the SettingsFileGenerator.xml at the point in time that you choose the Deploy option from the Start/Programs/<Solution> menu.  If you need to export them from command-line in your script, you'll see the command line in ServerDeployWizard.bat in Program Files\Deployment Framework for BizTalk\5.0\Framework.

Tom

Jul 22, 2009 at 7:24 PM

I was on the right track.  When reading the .targets file in the examples it mentioned that the UI was writing out a csv file that was being read in but it appeared that the scripts were referencing an environment variable.  I should have it all up and running shortly. 

 

Thanks for all your help.  I greatly appreciate it.

 

Scott

Dec 16, 2010 at 3:24 PM

Hi guys, can anyone provide a valid MSBuild task for executing the deployment using psexec (assuming the user has enough privileges)?

Right now I am using something like this:

psexec -accepteula \\serverName "C:\Program Files\Microsoft BizTalk Server 2006\BTSTask" ImportApp -Package:"C:\Orchestrations.Setup.msi" /Environment:local -ApplicationName:"EventBroker" /Overwrite

It works from the command line, but when I use it from MSBuild it hangs up, and times out.

Anyone can think of anything I'm missing?

Thanks!

Dec 16, 2010 at 4:34 PM

I have been using winrs instead of psexec.

From: machadogj [email removed]
Sent: Thursday, December 16, 2010 10:24 AM
To: Beamish, Scott
Subject: Re: Automating deployment of BizTalk artifacts [biztalkdeployment:61048]

From: machadogj

Hi guys, can anyone provide a valid MSBuild task for executing the deployment using psexec (assuming the user has enough privileges)?

Right now I am using something like this:

psexec -accepteula \\serverName "C:\Program Files\Microsoft BizTalk Server 2006\BTSTask" ImportApp -Package:"C:\Orchestrations.Setup.msi" /Environment:local -ApplicationName:"EventBroker" /Overwrite

It works from the command line, but when I use it from MSBuild it hangs up, and times out.

Anyone can think of anything I'm missing?

Thanks!

IMPORTANT: The sender intends that this electronic message is for exclusive use by the person to whom it is addressed. This message may contain information that is confidential or privileged and exempt from disclosure under applicable law. If the reader of this message is not an intended recipient, be aware that any disclosure, dissemination, distribution or copying of this communication, or the use of its contents, is prohibited. If you have received this message in error, please immediately notify the sender of your inadvertent receipt and delete this message from all data storage systems. Thank you.

Coordinator
Dec 16, 2010 at 10:33 PM
machadogj, I don't know the context of what you are attempting to do, but server deployments with the Deployment Framework for BizTalk do not use BizTalk's MSI "Import" feature.  Are you using the Deployment Framework?
Jul 6, 2011 at 10:57 PM

i was using both psexec, winrs commands to deploy biztalk application to remote server. but when i run the serverdeploy.bat i am getting below error.

Unable to validate the given database “BizTalkMgmtDb” and server “SQL Server”. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

am i missing anything? sql server is on the different box.

we turned off the firewalls on all of these servers. it is failing when it is trying to execute AddApp btstask command.

Environment configuration: Build Server - Project build components, Deployment server -full install of biztalk. both are in the same domain. but TFS Server is in the different domain.

Coordinator
Jul 7, 2011 at 5:21 AM

Hi, it looks like when you are running the remote ServerDeploy.bat on the BizTalk server, that process is running as Network Service or Local Service vs. a domain account.  That's generally the error you'll see from a connection attempt to SQL Server with Integrated Security when running as a non-domain user.  I have never configured a remote deployment of a Deployment Framework MSI, so I don't have any direct experience with the configuration that you're describing.

I assume that you've fully tested your deployment on the server the manual way, by building the Deployment Framework MSI and installing and deploying on the BizTalk server(s)?  If not, you should definitely make sure that works first.

Also, please check out the Sprinkler framework for fully automated deployments with the Deployment Framework.  It's in a beta state developed by Giulio Vian.  There are also a few other threads here about automation.

Thanks,
Tom

Jul 7, 2011 at 2:28 PM
Edited Jul 7, 2011 at 3:00 PM

Thanks for your quick reqly. I have tested manually on the deployment server using the same below credentials and it is working fine.(executing add app command and creating the application). But it is failing when i use below commands saying that " Unable to validate the given database "BizTalkMgmtDb" and server "SQL Server". 

1) winrs -r:BizTalkServer -u:Domain\user -p:password C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:DeployBizTalkMgmtDB=true;Configuration=Server;SkipUndeploy=true "btdfproj file"

2) winrs -r:BizTalkServer -u:Domain\user -p:password C:\folder\Deployment\Framework\ServerDeploy.bat "btdfproj file"

am i missing any thing in the above commands?

Coordinator
Jul 7, 2011 at 2:57 PM

Are you using one of these commands on your first BizTalk server and the other on subsequent servers?  Or are you listing both just for testing?

You should only run ServerDeploy.bat and make sure that you set the necessary environment variables first, or in the Winrs command line parameters.  BT_DEPLOY_MGMT_DB needs to be set to true or false, and you need to set any others used by your deployment.  Usually ENV_SETTINGS needs to be set to the path of your environment settings XML file.  These are normally all set by the deployment wizard based on the InstallWizard.xml in your project folder, and those specifics have been discussed in other posts here.

As far as Winrs and the remote execution, this scenario might work but is not supported.  I haven't used Winrs or tried your scenario myself, so I'm not familiar with the tool or its behaviors.  Based on the Winrs help, it does appear that you've got a valid command line.  Was psexec working any differently?

Thanks,
Tom

Jul 7, 2011 at 4:18 PM

1) winrs -r:BizTalkServer -u:Domain\user -p:password C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:DeployBizTalkMgmtDB=true;Configuration=Server;SkipUndeploy=true "btdfproj file"

2) winrs -r:BizTalkServer -u:Domain\user -p:password C:\folder\Deployment\Framework\ServerDeploy.bat "btdfproj file"

I am running above commands in the BuildServer (which does not have Full BizTalk, only project build components).

Scenario:

1) Build Server will create MSI using BTDF and TFS Build, put the msi on remote location (working)

2) Using winrm install the MSI on the remote Biztalk Server from the build server (working)

3) then deploy the application on to remote biztalk server using winrm/psexec (notworking)

PSExec is also throughing the same error "Unable to validate the given database "BizTalkMgmtDB"".

I was setting the BT_DEPLOY_MGMT_DB = true in the ServerDeploy.bat it self. But i am not parsing the env_settings. It is failing at the DeployAppDefinition: Task, When it is trying to add Application to Biztalk.

 

Coordinator
Jul 7, 2011 at 4:51 PM

Your scenario makes sense.  I am not sure why you are running both #1 and #2 commands though.  You're essentially running the same thing twice if you run both, so I'd say to run only #2.

That aside, going back to your original error message: "Unable to validate the given databaseBizTalkMgmtDb” and server “SQL Server”. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'".

That can only mean one thing -- the process that is running the deployment script is not running as a domain user.  "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'" means that SQL Server is not receiving a valid Windows domain user login from the caller.  It can't be anything else.  Why that would be the case under your Winrm/psexec remote execution, I don't know.

Maybe you could try echoing the current username environment variables to the screen in ServerDeploy.bat.  Like ECHO %USERDOMAIN% and ECHO %USERNAME%.  That might give you some insight into the user context on the remote server.

Thanks,
Tom

Jul 7, 2011 at 5:52 PM
Edited Jul 7, 2011 at 6:33 PM

Yes i am using one of them, not both.

I tried the echo option in server deploy.bat it showing me the correct username and domain name. not as anonymous.

It ran below tasks successfully:

setwinver,getsoftwarepaths,exportsettings,initsettingfilepath,initializeappname,

deployappdefinition (which is failing, while executing below task)

BTSTask.exe AddApp -ApplicationName:"myapplicationame: -Description:"mydescription".

Unable to validate the given database “BizTalkMgmtDb” and server “SQL Server”.

 

Database server has following application eventlog entry: 

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: IP Address of BizTalk Server]

Please advise.

 This error i am getting only when i use remote tools like WINRS or PSEXEC from the build server. If i do the manual installation by going to biztalk server and selecting the menu deploy link it is working fine.

Coordinator
Jul 7, 2011 at 6:55 PM

When you do the manual installation, I assume that you are logging into the server as the same domain account that you use in the WinRs/PsExec command-line?  You'll find a lot of hits on Google for that error message you got from the SQL Server. I wonder if this could be related to Kerberos or delegation, sometimes known as the double-hop issue.

Sorry, I'm not sure what else I can suggest since this is not a supported scenario and I have no experience with a remote deploy using WinRs or PsExec.  I think this is something you'll have to figure out in the context of your particular Active Directory environment.

Thanks,
Tom

Jul 20, 2011 at 9:54 PM

Thanks Tom, To resolve this i wrote a custom script which does everything for me on the remote server.

1) Undeploy the Existing application

2) Uninstall the old BTDF Msi

3) Install the new BTDF msi

4) Deploy the Application

5) Export the application using btstask to create msi to install it on different server.

6) Create Binding files for DEV, QA, Production.

But onething i didnt understand in the process of exporting the application msi and Installing the msi on the different server.

The problem i am facing is, when i install the exported msi to different server it is not copying all the dll to the specified location.

All i can see is Folder name with GUID, in that cab files. There are no dll's

am i missing anything while exporting or i have to use BTDF only to install this application on Different servers?

Coordinator
Jul 21, 2011 at 4:46 AM

The BTDF MSI is designed to be installed on every BizTalk server in the group.  The script just needs to be executed with a different value for BT_DEPLOY_MGMT_DB as we discussed earlier.  On one server it should be deployed with the property set to true, and on all other servers it should be deployed with the property set to false.

There is no need to ever export an MSI from BizTalk Admin.  However, if you wish to do that anyway, you will probably want to set <IncludeCompsAndVDirsAsResources> to true in your .btdfproj.

Thanks,
Tom

Jul 22, 2011 at 1:42 AM

Thanks Tom for your quick reply. I would like to export the application using btstask after i am done with btdf installation.

What i am seeing is ,

Btsexport operation is working fine, but when i install the msi (btsexport msi) to another server it is not copying any dlls to installed location. c:\program files(x86)\appname

Coordinator
Jul 22, 2011 at 3:53 AM

I'm still curious why you've chosen to use the Deployment Framework for development machines but not for server deployments.  From what I'm understanding, you are essentially automating the BTDF MSI install and deployment on a server for no reason other than to export a native BizTalk MSI.  Then you are only using the native BizTalk MSI to install on your production servers.  Is that a correct interpretation?  I assume you know that there is nothing to install on the BizTalk servers beyond the application's BTDF MSI itself (not even the Deployment Framework).  What is causing you to avoid deploying with the BTDF MSI?  I'm just very curious more than anything else.

Unfortunately, I can't offer any meaningful help with the BizTalk-generated MSI's since they aren't necessary with or supported by the Deployment Framework.  You might try the MSDN Forums instead.  I've never used btstask to export an MSI, so I can't be much help with that.  All of the DLL's should be showing up in BizTalk admin under the application's Resources node, so the export tool should pick them up.

Thanks,
Tom