IIS deployment question

Status
Not open for further replies.

svdsinner

Ars Legatus Legionis
15,152
Subscriptor
(NOTE: IIS Deployment topics are among my weakest. I haven't been 100% up on them since ASP 1.1 many long years ago. Feel free to talk to me like a rookie.)

So, I've got an IIS app that powers a few important web-services. It is in Visual Studio as an old-school ASP.NET Website.

One of the functions of the web-services is to point apps to various audio files that are also hosted in the same Visual Studio Project.

Overtime, the media content has grown and grown, so the vast majority of the file size of the website it the media files, and the actual code files are miniscule in comparison.

Unfortunately, because it is an old-school ASP.NET Website, deploying the site through VS begins with deleting all files and then copying the current files back into the proper inetpub directory. As the media content has grown, this has made the down-time while application updates are deployed get longer and longer and longer. (It now is taking 2-4 minutes of downtime for a full deploy.)

(NOTE: Obviously, in a perfect world, we would never detect any bugs in production that require us to shoot out a patch during the times when downtime is bad, but it happens a few times a year. I want to minimize the impacts of fixing those types of problems. Unfortunately, this app is in that middle-ground of value where it is important enough that unneeded downtime is bad, but not important enough to justify a cluster/webfarm-style solution.)

I'd like to figure out a solid, MS supported method to deploy faster by NOT deleting and re-copying all the media files that only rarely change. I'm trying to figure out the least-effort way to do this.

  • I think I would get the desired effect if I changed it from a ASP.NET Website to an ASP.NET Web Application, which uses a deployment tool that is supposed to only copy changed files.
  • When nothing but media changes, I can (and already do) simply use robocopy to update the files without causing any downtime.
  • I think I could break things into separate solutions: One for the code, and the other for the media. Not sure that this wouldn't cause ancillary problems, because the app expects the media to be in a sub-directory of the website.
  • I believe there are solutions where you can XCopy deploy all the compiled .dlls, etc. I'd prefer to avoid those, since if I'm not around, a random other-developer might need to deploy the site, and rock-standard is always better to prevent problems when somebody else is trying to do your job.


Suggestions?
 

jgv999

Wise, Aged Ars Veteran
154
It might make sense to move the media into a separate directory, and then use an IIS Virtual Directory to point to the new location. This way you could do the deployment without the media.

So if you have

C:\WebsiteRoot\App\File1
C:\WebsiteRoot\App\File2
C:\WebsiteRoot\App\Media

You would change it to be:
C:\WebsiteRoot\App\File1
C:\WebsiteRoot\App\File2
C:\Websupport\App\Media

And in IIS create a Virtual Directory called "Media" and point it to:
C:\Websupport\App\Media

I don't use the web deployment wizard that much, but I don't think it will mess with Virtual Directories. You might also have to tweak the code a bit if you your app updates the media directory.

Edit: Nevermind, I see that you will have some changed media as part of the project. So this would just result in the media not getting updated as part of the deployment which is not what you want.
 

Dracorat

Ars Tribunus Militum
2,798
svdsinner":38u5kwj6 said:
I think I could break things into separate solutions: One for the code, and the other for the media. Not sure that this wouldn't cause ancillary problems, because the app expects the media to be in a sub-directory of the website.
This is the correct solution. It also shouldn't cause a problem - you can configure each to be an application even if the second is "deeper" in the tree under the first.

svdsinner":38u5kwj6 said:
I believe there are solutions where you can XCopy deploy all the compiled .dlls, etc. I'd prefer to avoid those, since if I'm not around, a random other-developer might need to deploy the site, and rock-standard is always better to prevent problems when somebody else is trying to do your job.
Of course, XCopy can be scripted - hint hint.
 

svdsinner

Ars Legatus Legionis
15,152
Subscriptor
jgv999":1exgr5ku said:
Edit: Nevermind, I see that you will have some changed media as part of the project. So this would just result in the media not getting updated as part of the deployment which is not what you want.
Actually, I wouldn't consider it a negative to deploy the media in a completely separate step.

An ideal solution would deploy every changed file (media and code) and nothing but changed files, but a two step solution (code and media separate) would be 99% as good.
 

svdsinner

Ars Legatus Legionis
15,152
Subscriptor
Dracorat":1g4tmvte said:
svdsinner":1g4tmvte said:
I believe there are solutions where you can XCopy deploy all the compiled .dlls, etc. I'd prefer to avoid those, since if I'm not around, a random other-developer might need to deploy the site, and rock-standard is always better to prevent problems when somebody else is trying to do your job.
Of course, XCopy can be scripted - hint hint.
I'd only consider scripting if I can run the script straight from the MSBuild that runs via Visual Studio.

I might be paranoid, but I always assume that anything what-so-ever non-standard in a deployment is highly likely to be screwed up by a "fill-in"and work hard to make any process that someone else might do for me as rock-solid standard as possible. Sadly, many fill-ins across the years have repeatedly justified this paranoia. :(
 
Status
Not open for further replies.