Convert folder to application using ASP.NET

123-reg is my web host and they don't have a control panel to convert my folders to apps.

How can I do the following in ASP.NET code:

  • Open the Internet Service Manager.
  • Expand the website on the left side.
  • Select the folder for which you want to convert to app. Right click and select "Convert to Application".
  • Select the required application pool.
  • Click OK.
+3


source to share


2 answers


Writing code to control the user interface is very difficult.

You should use classes instead Microsoft.Web.Administration

- this gives you full programmatic control of IIS.



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

However, this may not be possible with your current host. It depends on what permissions you have on the machine and the level of trust the host is installed at.

+3


source


Here is a command line tool you can use, for example:



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

      

+1


source







All Articles