Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to implement a self-updating ASP.NET web application?

Wordpress has the capability to update itself (on admin user's request).

Is it possible to implement something similar using ASP.NET?

I can see web.config and bin folder causing problems.

like image 312
Arnold Zokas Avatar asked Jan 24 '23 16:01

Arnold Zokas


1 Answers

ASP.NET uses shadowcopy of dlls in your bin folder to allow you to xcopy a new set of dlls and content up to the server without those files being locked. So, dlls and web.config are not a problem.

The issue will be around having the process that runs your ASP.NET site have write access to the file system. This is generally a bad idea. You should consider putting this "auto update" functionality into the hands of a service that might run on your web server.

Check out this...

http://www.odetocode.com/articles/305.aspx

... for "What ASP.NET Programmers Should Know About Application Domains" but seriously consider the security implications of what you're suggesting. How will you stop someone from uploading evil code to your site?

like image 144
Martin Peck Avatar answered Jan 26 '23 06:01

Martin Peck