简体   繁体   English

部署ASP.NET Web应用程序

[英]Deploying ASP.NET web application

I will be deploying my web application this weekend on a testing server. 我本周末将在测试服务器上部署我的Web应用程序。 I have already had a couple of attempts at putting it up and have found trouble with: 我已经尝试了几次尝试并且发现了以下问题:

  • Database connection 数据库连接
  • Authentication 认证
  • Masterpage references 主页参考

What major/minor pitfalls have you found and how would I go about avoiding or fixing them? 你找到了哪些主要/次要的陷阱,我将如何避免或修复它们?

Or is there a one stop fix all for deploying web applications? 或者是否有一站式解决方案来部署Web应用程序?

Hai Kieran, 海基兰,

Just have a look at this it may give you some idea Deploying Tips for asp.net web application 看看这个可能会给你一些想法为asp.net web应用程序部署技巧

Let me know if you have any issues while deploying..... 如果您在部署时遇到任何问题,请告诉我.....

In the end, easy deployment should be part of the architectural-level design. 最后,轻松部署应该是架构级设计的一部分。 It's one of those things that can be tricky to shoe-horn in at the end of a project. 这是在项目结束时可能很棘手的事情之一。 In addition to just getting the site running, you also need to include things like versioning, configuration changes, build process, support for multiple servers (if appropriate), etc. 除了让网站运行之外,您还需要包括版本控制,配置更改,构建过程,支持多个服务器(如果适用)等内容。

A few guidelines: 一些指导原则:

  1. Centralize as many of your configuration parameters as you can 集中尽可能多的配置参数
  2. Use a build process that lets you switch from local to production mode 使用可让您从本地模式切换到生产模式的构建过程
  3. Flag config parameters with "debug" or "production", to make it easy to know which is which 使用“debug”或“production”标记配置参数,以便于了解哪个是哪个
  4. It's generally a good idea to pre-build a site in your dev environment, and deploy in binary form 在您的开发环境中预构建站点并以二进制形式部署通常是个好主意
  5. There are add-ins for Visual Studio that can help simplify / streamline the process Visual Studio的加载项可以帮助简化/简化流程
  6. Consider using image-based deployment for larger multi-server environments 考虑对较大的多服务器环境使用基于映像的部署
  7. Consider using a staging environment, where things are 99% the same as your production site 考虑使用暂存环境,其中99%与生产站点相同
  8. Don't forget to include IIS configuration details as part of your deployment process 不要忘记在部署过程中包含IIS配置详细信息

In case it's of any interest, I cover deployment issues in my book: Ultra-Fast ASP.NET . 如果有任何兴趣,我会在我的书中介绍部署问题: Ultra-Fast ASP.NET

Well this week we have been testing and deploying our ASP.NET web application onto a web farm using IIS 7. 那么本周我们一直在使用IIS 7测试和部署我们的ASP.NET Web应用程序到Web场。

We want to keep session state and to have a web farm persist it to a SQL database. 我们希望保持会话状态并让Web场将其持久保存到SQL数据库。 The gotcha that have got us is that all objects that are put into the session must be serializable when using SQL Server for session state. 得到我们的问题是,当使用SQL Server进行会话状态时,放入会话的所有对象都必须是可序列化的。 Grr! 儿!

Edit: Come on Velocity ! 编辑:加油速度 This allows us to use a WCF service as session state in a web farm configuration. 这允许我们在Web场配置中将WCF服务用作会话状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM