Add WCF Service in IIS

Topics: IIS and Web Services
Sep 11, 2014 at 8:15 AM
Edited Sep 11, 2014 at 8:22 AM
Hi,

I'm new to BTDF. In my project I have configured WCF service in receive location.
how to deploy that using BTDF,

please find the below code I have added in Deployment.btdfproj,

<IncludeVirtualDirectories>True</IncludeVirtualDirectories>

<ItemGroup>
<VDirList Include="*">
  <Vdir>GESServiceVD</Vdir>
  <Physdir>D:\Projectname\GES\GESService\GESServiceVD</Physdir>
  <AppPool>GESAppPool</AppPool>
  <AppPoolNetVersion>v4.0</AppPoolNetVersion>
</VDirList>
</ItemGroup>

<UsingTask TaskName="DeploymentFramework.BuildTasks.PublishWcfServiceArtifacts" AssemblyFile="BizTalkDeploymentFramework.Tasks.dll" />

<Target Name="AfterBuild">
<PublishWcfServiceArtifacts ServiceDescriptionPath="D:\Projectname\GES\GESService\GESServiceVD\App_Data\TempWcfServiceDescription.xml" OutputPath="D:\Projectname\GES\GESService\GESServiceVD" />
</Target>

I have moved the entire web service project folder from wwwroot to your BizTalk solution folder next to your schemas, maps, etc. project folders. Then I Added Existing Project to add the web service project into the BizTalk solution.

GESService is the webservice project folder name and GESServiceVD is the VirtualDirectory folder name.

looks like this,
Projectname
 GES
   GESService
       GESServiceVD
          App_Data
             Temp
                 BindingInfo.xml
                 WcfServiceDescription.xml
          BizTalkDemo_Process1_Process_InboundReceivePort.svc
          Web.config
once I deploy, I'm getting the below error,

"D:\Projectname\GES\GES.Deployment\Deployment.btdfproj" (Deploy target) (1) ->
(DeployVirtualDirectory target) ->
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: The "CreateVirtualDirectory" task failed unexpectedly. [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: System.NotSupportedException: The given path's format is not supported. [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath) [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at System.IO.Path.GetFullPath(String path) [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at DeploymentFramework.BuildTasks.CreateVirtualDirectory.Execute() [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1754,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [D:\Projectname\GES\GES.Deployment\Deployment.btdfproj]

Anyone please help me on this.
Coordinator
Sep 12, 2014 at 5:14 AM
Edited Sep 12, 2014 at 5:15 AM
Physdir should be a relative path based at the Deployment Framework project folder (.btdfproj location). Probably ..\GESService\GESServiceVD.

Also, the PublishWcfServiceArtifacts task and AfterBuild target normally go into the .csproj of the web service.

Version 6.0 of the Deployment Framework has a greatly improved IIS deployment model and includes a sample application for IIS deployment. Since you are new to the Deployment Framework, you should strongly consider starting out with v6.0. It's "beta" today but very stable and usable for production work.

Thanks,
Tom