Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 721257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:51:09+00:00 2026-05-14T05:51:09+00:00

I am attempting to create seperate workflow instances as applications in IIS7 using the

  • 0

I am attempting to create seperate workflow instances as applications in IIS7 using the Microsoft.Web.Administration dll. When it attempts to add the Application to the Site ApplicationsCollection I get a COM error: “Invalid application path\r\n”

using (ServerManager manager = new ServerManager())
            {
                var site = manager.Sites.Where(x => x.Name == Properties.Settings.Default.WorkflowWebsiteName).Single();

                StringBuilder stringBuilder = new StringBuilder()
                    .Append(m_workflowDefinition.AccountId)
                    .Append("/")
                    .Append(m_workflowDefinition.WorkflowDefinitionId)
                    .Append("/")
                    .Append(m_workflowDefinition.Version)
                    .Append("/");

                string virtualPath = stringBuilder.ToString();
                string physicalPath = Properties.Settings.Default.ApplicationPoolString +
                                      virtualPath.Replace("/", "\\");

                if (!Directory.Exists(physicalPath)) Directory.CreateDirectory(physicalPath);

                //Create the workflow service definition file
                using (StreamWriter writer = new StreamWriter(Path.Combine(physicalPath, m_workflowDefinition.WorkflowName + WORKFLOW_FILE_EXTENSION)))
                {
                    writer.Write(m_workflowDefinition.Definition);
                }

                //Copy dependencies                    
                string dependencyPath = m_workflowDefinition.DependenciesPath;
                CopyAll(new DirectoryInfo(dependencyPath), new DirectoryInfo(physicalPath));

                //Create a new IIS application for the workflow   
                var apps = site.Applications.Where(x => x.Path == virtualPath);
                if (apps.Count() > 0)
                {
                    site.Applications.Remove(apps.Single());
                }
                Application app = site.Applications.Add(virtualPath, physicalPath);

                app.ApplicationPoolName = "Workflow AppPool";
                app.EnabledProtocols = PROTOCOLS;

                manager.CommitChanges();
            }

The value assigned to virtualPath is like: “something/something/something” and for physicalPath it is “c:\inetpub\wwwroot\Workflow\something\something\something”. Any ideas?

Any help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:51:10+00:00Added an answer on May 14, 2026 at 5:51 am

    Try changing your “something/something/something” path to “/something/something/something”. The IIS administration call needs the extra slash at the beginning of the path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently attempting to create a tabbed interface in a web application, and based
I am attempting to create a small application to collect data received from an
I'm attempting to create my first real C# application - a small pet project
I'm attempting to load a dll into MSSQL with: USE dbname GO CREATE ASSEMBLY
I'm attempting to create a custom calendar control that inherits from ASP.Net's built in
I am attempting to create new membership users in an Ektron CMS400.NET-based website by
I am attempting to pass information from a task created within a workflow to
I'm attempting to authenticate a user against ADAM using a user I created in
I'm attempting to split up my WCF web services into a few services instead
I am attempting to create the the business and data layers for my big

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.