简体   繁体   中英

How to initialize some classes in a subdirectory in web application

I am working on an existing web application, I created a folder called Portal under the Web project, this folder was converted to an Application in IIS, it now has its own web.config. In the Web project there is a Global.asax, and it initializes some classes I now need to use from the folder that was converted to Application, the problem is that the folder is not picking up the initializations from the web (parent) global asax. Is there a way either to add a second global asax or any other way to initialize stuff for the portal (sub folder application) when the application starts?

This is by no means an answer but i suggest u do not skip reading these links. there might be something in it for everyone. It would be challenging for multiple Applications to share the same Session..

Using ServerManager to create Application within Application

http://codeidol.com/asp/c-sharp-asp-xml-ado.net/Configuration-and-Deployment/Initializing-Web-Applications-Using-Global.asax/

Apart from those links i can only leave u with some theory without any practical examples and see if u can work your way through.

You can also use the post method to communicate the application object among different doamins

Use a controller action to manually POST the application object to the other domain, the POST will take place via an SSL connection

You can use database to store and retrive the application object, application object get created when first time website surfed.

You can also use hidden fields.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM