Adding an ASP.Net Form to an Existing Deployed ASP.Net Web Application

I have an ASP.Net web application that is deployed to several different client servers and hosted in IIS (6 or 7 depending on the site). The system is based on a set of fairly complex ASP.Net pages (aspx). Due to rapidly changing requirements, we often have to add forms to the system. At the moment we are using a rather clumsy approach of adding a form to a project and relocating the entire project to the client server.

I want to create a mechanism that will allow us to go to the configuration screen of our system and call a web service hosted on our central web server that will provide a list of forms (possibly packaged in something similar to a WAR file) that the client can choose to installation. The installation will somehow add the form to the IIS client, making it available on their system. The idea for a kind of aspx form app store was that our clients can choose which forms they want and install them, rather than having to waste time doing multiple deployments that we deploy once to our central web server ...

Does anyone have any ideas on how to do this? What technologies can I use to make this happen?

+2


source to share


3 answers


If you are using web application projects, this is not easy to do because all of your codewords will be compiled into one DLL. Each time you add a new form, the site application assembly must be redeployed to a folder /bin

.

If you've used the "non-standard" projectless web applications provided in Visual Studio 2005, you may be able to accomplish what you're looking for because you can compile each page into its own DLL (Fixed naming and assembling one page in a dialog Publish Web Site

) ... I've tried this in the past and it hit and miss a bit to be honest. Also, not having a proper project file is a complete pain for more complex projects.



Another approach is to put all of your markup and code-behind in the same file .aspx

instead of the .aspx.cs

code files . I think this will make them self-contained units of code that will compile on the fly, but the problem here is that the whole site has to be built this way ... I guess.

These are out of the box methods available in Visual Studio (2008). If you want something a little more complex, you'll have to build some infrastructure for that to happen, unfortunately.

+2


source


You don't actually need to redeploy the entire web application when you want to modify or add a web form to an existing application. Publish the site as usual and then just grab the added .aspx page, etc. Now grab the associated .dll that was affected when adding the page created. It could be something as simple as just the .dll sites, or you could include a business .dll and data access .dll. But you don't have to move all the files when most of them haven't changed.

For preconfigured setup with this system, you can use a tool like nAnt and create a build script that will build on the files you need, then package those files into a self extracting zip file that puts the files, .dll in the correct paths on the target web server.



Good luck with your project and hope this helps some.

+1


source


It sounds like you are interested in finding a way to deploy changes only! It is generally not a good idea to deploy only changes as it is quite easy to skip a file or two and then the whole application crashes. I think you should focus more on building and deploying an automation that helps you deploy to multiple servers with the click of a button.

0


source







All Articles