3

123-reg are my web host and they dont have a control panel to convert my folders to apps.

How can i do the following by ASP.NET code:

  1. Open Internet Information Services manager.
  2. Expand the web site on the left side.
  3. Select the folder for which you want to convert to the application. Right click and choose Convert To Application.
  4. Select the desired application pool.
  5. Click Ok.

2 Answers 2

3

Writing code to control UI is very difficult.

You should look at using the classes in the Microsoft.Web.Administration instead - these give you full programmatic control of IIS.

The Microsoft.Web.Administration namespace contains classes that a developer can use to administer IIS Manager. With the classes in this namespace, an administrator can read and write configuration information to ApplicationHost.config, Web.config, and Administration.config files.

This may not be possible with your current host, however. It depends on what permissions you have on the machine and the trust level the host has setup.

Sign up to request clarification or add additional context in comments.

3 Comments

Not in the UI.. even at a lower level?
Is there no way to create the app in iis programatically?
@sp-1986 - That's what the classes in the Microsoft.Web.Administration namespace do. The give you programmatic access.
2

There's a command line tool you can use, like this:

C:\Windows\System32\inetsrv\appcmd add app /site.name:"Default Web Site" /path:/MySite /physicalPath:c:\inetpub\wwwroot\MySite

1 Comment

Useful info but if he can't access the IIS Manager I'm willing to bet he doesn't have any remote desktop access at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.