What does "Deployment" mean in ASP.NET?
I'm a small developer and all of the asp.net solutions I've created run on IIS on someone's desktop computer in a small office environment.
When I develop a solution in VWD Express (2008 & 2010), I do so on my laptop and then copy/paste the files (literally) into the wwwroot folder on the computer that has been designated as the "web server" by a small office manager. When I'm finished, I setup IIS, point it to wwwroot, add the computer (server) name to everyone's intranet exception list, and bam I'm done.
开发者_Go百科So at what point does "deployment" come in?
Looking forward to your guidance.
The definition of deployment changes depending on several factors. Including which version of studio you are using and whether you are building web sites or web applications.
In it's purest form, it is the act of copying those files to the location where it will be run.
Deploying web sites is usually just copying the files. Deploying web applications usually involves compiling all of the code behind into assemblies, and copying the aspx pages and assemblies (no actual code).
However, you can build deployment scripts that go further and include things like setting up IIS, running tests, gac'ing assemblines, etc. Also scripts might include not just publishing the current site/app, but if you have dependency sites, like web services, it might include pushing those at the same time.
In my world, deployment usually means migrating the code from one environment to another. This means compiling DLLs for custom code that was written to be used with the website,e.g. there may Domain Objects or other class libraries that some of the code behind in the site uses, as well as configuring various files so that the proper database is used, hostnames may be set in a web.config and other things that are handled by various scripts. For example, going from a development to test environment or from a UAT to production environment are deployment examples.
Web Deployment Projects may be something else for you to learn more about as it is another use of the term deployment.
Software deployment is all of the activities that make a software system available for use.
Deployment asp.net website means build the website, precompile it and upload the precompiled files to the server, also deployment process will include configuring the IIS, and DB connection if exist.
But also just copying the files to the server without precompile them will work.
ASP.NET Deployment From MSDN
.NET uses bytecode (go wiki Common Language Runtime). If you upload .aspx files these will be monitored by IIS and recompiled into fresh bytecode each time you change them. It's probably a better idea only to deploy "compiled" bytecode versions, since you'll then only have one version of your source outside of source control, and if anyone tries to find some security holes it'll be a lot harder for them.
See when ever you are developing any asp.net web site or web application it should run from IIS. usually while developing you run web sit from default asp.net development server its useful until your application would be finalize (Error free and ready to produce appropriate out put). after tat user want to access that web site from browser not from asp.net development server(VS SDK). so for that you have to deploy asp.net web site on IIS so browser can access that web site trough URL for the user. as per mention above .NET uses bytecode. so when ever browser will request to IIS for any .aspx page IIS will recompiled that aspx.cs code into fresh bytecode each time. hence deploy code is a pre compile code store on IIS. and it will return without converting it. for put deploy code on IIS see Host your ASP.NET web application on IIS 8 ( Windows Server 2012 or Windows 8).
Your title says "in ASP.NET", however I think it helps to provide some background. Deployments are done for essentially all software whose production is separate from development and that should be for all software. In that context, in the past deployment does not necessarily involve compiling. In the past, for applications that are not ASP.Net software, programmers would usually do the compile of the software themselves and the compiled software would be provided. The source code would get copied to a production library and the executable files would be copied separately. Deployment is also called promotion and many years ago I have developed some simple promotion systems.
Software developed for use by a business or other organization should have a separate development (test) environment and production environment and deployment is the process of copying/moving from the development environment to the production environment. Ideally there would also be a staging environment but I don't know if that is possible for ASP.Net.
精彩评论