views:

92

answers:

3

I have an ASP.Net web application that is deployed to a number of different customer's servers and hosted within IIS (6 or 7 depending on the site). The system is based around a set of fairly complex ASP.Net (aspx) pages. Due to rapidly changing requirements we often have to add forms to the system. At the moment we use a fairly clumsy approach of adding the form to the project and redeploying the whole project to the customer server.

I'm looking to build a mechanism that will allow us to go into the configuration screen of our system and call a webservice hosted on our central web server which will provide a list of forms (perhaps packaged up in some way similar to a Java WAR file) that the customer can choose to install. The installation would somehow add the form to the customer's IIS making it available within their system. The idea is for a sort of aspx form app store were our customers can choose which forms they need and install them and rather than us having to take time out to perform multiple deployments we just deploy once to our central webserver.

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

A: 

It seems like you are interested in finding a way to deploy only the changes! It is typically not a good idea to deploy only the changes since it is quite easy to miss a file or two and then the whole application crashes. I think you should focus more on build and deploy automation which will help you to deploy to multiple servers using a click of a button.

azamsharp
I see what you are saying but what I want is to have customers able to download the forms that they need rather than deploy all forms to every one hence the 'app store' like functionality. Build and deployment automation is not going to help me do that.
colethecoder
+2  A: 

If you're using Web Application Projects this isn't so easy to do because all your forms 'code-behind' will be compiled into a single DLL. Each time you add a new form, the site application assembly would need to be re-deployed to the /bin folder.

If you were using the 'new-style' project-less web applications as introduced in Visual Studio 2005 it'd maybe be possible to do what you're looking for because you can compile each page into its own DLL (Fixed naming and single page assemblies on the Publish Web Site dialogue). I've tried this in the past and it's a bit hit and miss to be honest. Also not having a proper project file is a total pain for larger more complex projects.

Another approach would be to put all your markup and 'code-behind' in the same .aspx file instead of having .aspx.cs code-behind files. I think that would make them self contained units of code that would compile on the fly, but the problem here is that all of the site would need to be built that way...I think.

Those are the out of the box methods available in Visual Studio (2008). If you need anything more complex then you're going to have to design some infrastructure to make it happen unfortunately.

Kev
Thanks for that, I had a suspicion I would have to build something but wanted someone to confirm that so I didn't feel like I was 're-inventing the wheel'!
colethecoder
+1  A: 

Actually you don't have to redeploy an entire web application when you're justing changing or adding a web form to a pre-existing application. Publish the site as normal, then just grab the .aspx page that has been added, etc. Now grab the associted .dll's that have been touched when the page was added, created. This could be something as simple as just the sites .dll or you could be including a busines .dll anda data access .dll. But by no means do you need to move all of the files when most have not been changed.

For a pre-configured setup with this system, you can use a tool like nAnt and create a build script which will build on the files needed, and then package those files into a self extracting zip file which would place the files, .dlls into the correct paths on the targeted web server.

God luck with your project, and hope this helps some.

Chris