简体   繁体   中英

Using .dll pre-compiled(deployable) web applications with a website

I would like to create a web portal that provides a user basic functionality, user authorization, statistics, etc. But on a lower level provide applications of various functionality.

Through research and lots of Google I think the best way to do this is making a web page project for the web portal and for easy source control, low coupling, and maintainability require all underneath applications to be a deploy-able dependency of the web portal. Thus! they all auto compile and upload at time of publishing the website! This seems great! BUT I cannot for the life of me figure out how to call the underlying webpages from under the .dll (deploy-able assembly).

Is this even possible? It seems it would be from what I can gather since you can compile a whole website (aspx and all) to a .dll. So how does one go about calling the web pages/applications in the .dll?

For example I'd hope to do something like this: www.webpage.com/Default.aspx (root and web portal) www.webpage.com/bin/application.dll/Default.aspx (the pre-compiled web application without routing)

Thanks!

EDIT: I want to clarify that the idea is that one development group can maintain the web portal and others can build separate independent applications that will function underneath the portal. Separate projects to be included at compile time is a must. Perhaps this functionality is not possible? The purpose of the older style web site project is because this project had been started sometime ago and is a resource for the project. If the project type introduces limitations it would be feasible to change it to a newer project type (ASP web application) if and only if it achieves my hopes as described above.

I was thinking it is a bit hacking but I could add a controller to the .dll that just provides the utility to return a whole aspx or ascx web ui component on demand to be sent to the client. There must be a better way though?

I would suggest the following...

1 Solution with 2 Projects. - a website (not web application) - a class library

The class library (ultimately compiled into a DLL) will be a project reference in your website and it will handle the bulk of the code. The website will have UI and some basic logic and of course will dictate the structure of the site, but will rely on the class library for the heavy lifting.

The beauty of this setup is centralized code and easy expandability. One of my solutions has 3 websites and a web service that share the same code base.

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