I uploaded asp.net code to C:\inetpub\wwwroot\myfolder on IIS using FTP. It won’t run properly until I change the setting from IIS Manager and click “Convert to Application”. Is there any way I can set it from the code itself as I dont have access to IIS Manager?
Update: exact error message:
Parser Error Message: It is an error to use a section registered as
allowDefinition=’MachineToApplication’ beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS.
in a hosted IIS server which provides only FTP access to the customers you have no way to convert the virtual directory into an Application.
I suggest you to test your application locally in your machine running from a virtual directory instead of an IIS Application and checking what is not working.
the web.config will work anyway, there are of course some limitations like you cannot specify the application pool and your web app will run in the application pool defined for the parent application of the virtual directory, but in many cases this should be ok anyway.
Depending on your hosting company, especially if it’s very cheap, they do not provide/create an app pool for every single hosted domain, you can double check this with them and ask them what are the other options for you to go.
I would try to debug and run locally as virtual directory first.