Vidar
Vidar

Reputation: 6673

Developing ASP.Net Applications remotely and best practice? (Guidance needed)

Just a newbie question really.

Can you edit a website (in Visual Studio) on a server from your PC by going:

File -> Open Web Site -> File System -> My Network Places -> Entire Network -> Microsoft Windows Network -> FooDomain -> FooServer -> Foo_Public_Shared_Folder (which is actually a web applicaiton in C:\Inetpub\wwwroot\foobarWebApp).

I suspect it is bad practice to edit a website that is pubished on a server like this - or at least highly unusual?

Would I be right in saying that you should create a new website on your local PC then build and publish to the server in question?

One last point as well -if you need to make a copy of a published website and make some enhancements without losing the original - how can you do this i.e. you don't have the original Visual Studio project only the published site (i.e. this could be made by some web site authoring/wizard tool).

Hopefully that makes some kind of sense. Any help on this would help me a ton!

Upvotes: 2

Views: 131

Answers (3)

Jay
Jay

Reputation: 1356

@Vidar - I sometimes edit certain files directly against the FTP site but only development and test servers, never production. The files I typically edit this way are web.config, web.sitemap and maybe global.asax.

Upvotes: 0

mclark1129
mclark1129

Reputation: 7592

Actually, a better approach is to use Web Application Projects. They are slightly more complex than Web Sites but are far more fully featured. The publish feature with WAP works way better than the one in Web Sites and will much more easily let you work off a local copy, and then only publish to a live site when you are ready (using FPSE or in VS2010 msdeploy). When working locally, VS will spawn a local development server for you to test in order to view your code, you don't need to install IIS or anything to use it.

HTH,

Mike

Upvotes: 0

Justin Niessner
Justin Niessner

Reputation: 245399

  1. You should never edit a live site directly in Visual Studio. If you make a change that breaks the code, you take your whole site down. Always edit a local copy and then publish to the production site.

  2. All you have to do to make a working copy of the website is copy the root folder of the application to your local machine. You can then choose File -> Open Website... in Visual Studio and point it at the local folder.

Upvotes: 1

Related Questions