BTDF / DeploymentFramework

The Deployment Framework for BizTalk is the most powerful and customizable, yet easy-to-use toolkit for deploying and configuring your BizTalk solutions.
MIT License
53 stars 24 forks source link

bug: failure to return the correct physicalPath value #443

Open Fool387Enigma opened 6 years ago

Fool387Enigma commented 6 years ago

I found what appears to be a bug, that being a failure to return the correct physicalPath value (e.g. the incorrect value of 'C:\Program Files (x86)\EAI_Core for BizTalk 1.0.0\', vs. the correct value of 'C:\Program Files (x86)\EAI_Core for BizTalk 1.0.0*1.0*'). The Deploy function assumes that the value of in the btdfproj file should determine the location of the directory for a web application's content. is first used for constructing the MSI, enabling it to locate the web application content relative to the BTDF solution/project. It does not follow that the value would correlate to the location where web application content is installed by the MSI.

I observed that when my application was installing to the folder 'C:\Program Files (x86)\EAI_Core for BizTalk 1.0.0*1.0*', the web application being deployed in IIS pointed to the wrong folder, 'C:\Program Files (x86)\EAI_Core for BizTalk 1.0.0\'. The problem was caused by the btdfproj file's element having a value of '....\EAICore_Proxy', and the fact that when the MSI is installed the current directory of MSBuild execution is the Deployment directory, 'C:\Program Files (x86)\EAI_Core for BizTalk 1.0.0\1.0\Deployment'. The element value of '....\EAICore_Proxy' is resolved to an absolute path, and then used as the directory for the web application. In my test case, the result was a path that was one level too far up the path tree.

The submitted remediation for bug this breaks the assumption that determines the location of the directory of the web application. Instead, the directory containing the web application is searched for. However, in an effort to not break MSI installation progress, the remediation approach will default to using the value of physical path if the name of the web application folder cannot be found. Additionally, a warning is logged. The user may manually correct the web application folder location in IIS.

fix: Added a function, FindWebApplicationPath, that finds the correct physicalPath (e.g. 'C:\Program Files (x86)\EAI_Core for BizTalk 1.0.0**1.0**\EAICore_Proxy') given a starting point (e.g. 'C:\Program Files (x86)\EAI_Core for BizTalk 1.0.0\1.0\Deployment') and the physicalPath value from the btdfproj file (e.g. '....\EAICore_Proxy').

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.