Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to production server to deploy changes 1

Status
Not open for further replies.

glgcag1991

Programmer
Oct 15, 2007
72
US
This is a total newbie question, but I'm trying to set up a dev environment so I can take over developing an existing app that is in production.

What is the typical set up for deploying changes to an app when my production server is in a DMZ and secured? Since my dev server is on the LAN I can work on it in Visual Studio and publish my changes from there. Since I don't have a connection to the production server via the LAN, only across a VPN, what should I do? I'm new to this so using the built in Visual Studio tools is ideal, but I assume I'm just going to have to copy the asp.net files or something (which I've never done and have no idea how to do!)

Any help is appreciated!

 
.net is xcopy deployable, so just copy the files out to the server. How you go about this up to you. Worst case (but probably the most common) is to manually copy the files to the production server and update the config files. best case scenario is using a automated build tool which compiles and copies the to the production server for you.

you should definitely have a staging server between your local development environment and production. running a website locally using VSs web server (casini) is totally different than running the website on IIS on a public facing production server.

A staging server would mimic (as closely as possible) the production environment and allow you to test the website to ensure there are no configuration/security problems.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Thank you Jason for the reply.

Xcopy was one of the options I looked at, but I'd have to have a path to the server on the other network, so I'll have to look at how I can do that. Otherwise, I guess I could ftp the web app files up to the prod server and copy them over once I'm logged into the server.

I have also heard about deploying a single file via a precompiled web app. Have you ever done this? My understanding is that it is the complete asp.net web app precompiled and that I just drop the app file into the proper directory on the production server and it updates. It sounds pretty cool, but I'm wondering if there are gotchas.

Lastly, and this is a total newbie question, developing on my local machine seems to be messy in general- sql server installed locally, iis installed locally, etc. Is it a bad idea to develop ON my staging server? In other words, Visual Studio is local, but I'm developing on an IIS/SQL server on my network.

Again, thanks for the insight.
 
a web app compiles the code into a single binary, but you still need the templates, js, css files etc. There isn't a magic single file cure all. (And if MS offered one I would be very skeptical.)

Is it a bad idea to develop ON my staging server?
The biggest problem I find is the multi-dev experience. even a team of 1. by having your *development* tools on your local box you can develop and test much easier. it's also easier to build scripts for automated tasks if you are not scouring the network for various resources just to develop a application.

A Staging environment isn't meant to develop on. It's meant to mimic the experience of the production environment, without fear of trashing production.

application development is messy. the key is to find a set of tools to easy the process of creating software which tie all these various technologies together.

You don't need a full blown sql server or IIS server on your local box to develop. use SqLite or SqlExpress as the database. SqLite is awesome for simple databases and local testing. SqlExpress is very similar to SqlServer the limiting factor is usually hardware limitations, not features. VS comes with casini to run asp.net applications. Later this year MS is releasing IIS Express which is what SqlExpress is to SqlServer. this will also aid in local development.

I finish with this recommendation. read The Pragmatic Programmer. I read this over the holidays and I wish I read this when I first started programming. The book provides guidance for becoming a master of your craft. This book will provide you with starting points for various topics: source control, "tool belt", testing, automation, etc.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
jmeckley, thanks for the advice!

It makes sense what you are saying about the staging server and you're right- developing on my local workstation is a hot mess! I usually end up doing a lot of work once I get it up on my staging server because my local machine is not set up the same. I guess that's the way it goes!

I'm going to get The Pragmatic Programmer to read- thanks for the recommendation!

All the best,

Greg
 
I usually end up doing a lot of work once I get it up on my staging server because my local machine is not set up the same.
correct. typically the changes from local development to staging will be much greater than staging to production.
One way to simplify deployment is via automation. there are open source ad $ tools which aid in the process of creating build scripts to automate much of the manual process.
* compile
* test
* configure
* copy
* install

I looked into final builder; at the moment the price is prohibitive. I'm experimenting with VS config templates and psake to consolidate all the required files for staging/release. I would also like the script to deploy to the server and install configure the website and/or windows services. Not quite there yet.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Final Builder looks nice and it's not too pricey. Once I'm up to speed developing I may put it in a budget.

Thanks!
 
if you do have a budget (or proposed) i would also recommend resharper (R#). if you can only purchase a single tool to aid in development it should be R#. I can't say enough good things about this VS add-on. without R# VS feels like notepad.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
The only bummer about ReSharper is that I code in VB.NET not C#. (I'm a VBA/Access programmer converting to ASP.NET so VB.NET is very similar to what I'm used to.)

 
R# has come a long way. a good portion of VB is supported as well as a number of asp.net/webforms features.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top