Question

Hi I am creating an application where user wants to create and upload multiple websites inside asp .net website. like www.mywebsite.com/Websites/Website1 www.mywebsite.com/Websites/Website2 www.mywebsite.com/Websites/Website3 www.mywebsite.com/Websites/Website4

If I upload static website(No database connectivity) to Website1,Website2,Website3 folder it is working fine but If upload website have database in App_Data folder and connection string in web.config folder it is giving me error like : 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.

Does anyone knows how to solve this issue???

Thanks.

Was it helpful?

Solution 2

Thanks all for your suggestions and comments... Few more requirements added to project and goal changed... Now How I am doing (Thought it would be helpful for someone else):

1) Now I am using single Master page for my main website and for multiple websites. 2) Now using single web.config for all the websites(main as well as sub-websites). Because as I have mentioned in my question... static websites are working fine but only problem in database driven websites.

I am not sure that this is the best practice(Who cares when you have no choice :p) but .. It has solved my problem

Last but not Least Thanks @Douglas Thomas and @Shirish ... I have tried this convert to application method on my local IIS and it worked perfectly but now as I have accomplished by other way ... I do not need to contact hosting company [ Some times they made me Angry ] every single time I upload new sub website.

OTHER TIPS

For this Just add virtual directory and put web.config and aspnet_client in that folder and then browse virtual directory..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top