Home > .NET, Vs2010 > Quick & dirty deploy of a .NET 4 workflow

Quick & dirty deploy of a .NET 4 workflow

2012/08/13

In a ASP.NET 4 Web Application in Visual Studio 20120 i have added a Workflow in a separate Web Application , with a Web Reference in the main .NET 4 web site to the workflow .

There is an interesting article about to create and deploy Workflows with .NET 4 with the Windows Server App Fabric, but my WF is simple (no persistence, for example) and in my WF is provided a throwing of the errors that can be logged in the main site.

I will use the App Fabric for complex projects, but at the moment the quick & dirty deploy can be done with these steps:

  • Publish the main site
  • Go to the web app of the workflow , righ clic on the project and Publish on the File system
  • Copy the published projects on the separate Web Applications on the production server, remember to change the compilation debug=”true” in “false” in the two web.config
  • In the main web application adding a web reference is generated this piece of configuration under <system.serviceModel>
          <bindings>
          <basicHttpBinding>
            <binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
              openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
              allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
              maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
              messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
              useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <security mode="None">
                <transport clientCredentialType="None" proxyCredentialType="None"
                  realm="" />
                <message clientCredentialType="UserName" algorithmSuite="Default" />
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="http://<address>/<site>/<service>.xamlx" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IService" contract="wfServiceOperator.IService"
            name="BasicHttpBinding_IService" />
        </client>
    

change the endpoint address for the .xamlx in order to to reach the .xamlx in the other web app, and all is working .

Advertisements
Categories: .NET, Vs2010
%d bloggers like this: