使用XCopy发布网页
In this lesson, you will learn how to deploy an ASP.NET XAF application using the Xcopy Deployment method. This method is named after thexcopy command-line utility, which copies files from one location to another. With this method, you simply copy the application files from the Developer Workstation to the Web Server. Instead of the xcopy utility, you can use Windows Explorer or other file manager to copy files. However, in certain cases, a command-line utility can be more convenient than graphical user interface (GUI) tools. To learn more about thexcopy command capabilities, refer to the xcopy document.
Perform the following steps at the Developer Workstation to prepare the ASP.NET application for Xcopy deployment.
Open the MySolution solution in Visual Studio. In the Solution Explorer, expand the MySolution.Web\References folder. Select assemblies whose names start with "DevExpress". If you use Entity Framework, third-party controls or modules, select their assemblies as well. In the Properties window, set the CopyLocal property to True.

Repeat this step for all module projects that are referenced in the application project (e.g. MySolution.Module andMySolution.Module.Web).
Change the Active Solution Configuration from Debug to Release.

Open the MySolution.Web\Web.config file. In the system.web section, set the compilation's debug option to false.
Xml<system.web>
<!-- ... -->
<compilation debug="false">
<!-- ... -->
</system.web>Build and run the ASP.NET application.
Check that the application performs correctly and close it.
Ensure that the MySolution\MySolution.Web folder contains application files.

If the MySolution\MySolution.Web\Bin folder contains PDB files, remove them.
Now the ASP.NET application is ready for Xcopy deployment.
Create an application folder on the Web Server (for instance, C:\Sites\MySolution). Copy the MySolution\MySolution.Web folder contents from the Developer Workstation to the newly created folder. Use the Internet Information Services (IIS) Manager to create themysolution virtual application folder linked to the c:\Sites\MySolution folder in the server file system. The IIS Manager is accessible from the server Start Menu | Administrative Tools.

As an ASP.NET application project has references to several module projects (e.g. MySolution.Module.Web and MySolution.Module), then it is required to deploy referenced assembles of these modules. Copy these assemblies from output folders of referenced module projects (i.e. MySolution\MySolution.Module.Web\Bin\Release and MySolution\MySolution.Module\Bin\Release). Assembly files from these output folders should be copied to the Bin subfolder of the application folder (e.g. C:\Sites\MySolution\Bin). You can skip overwriting files that are copied already.
NoteIf you are deploying an application to remote web hosting, you do not need to create a folder via the IIS Manager. Simply create the mysolution subfolder in the web root folder (typically, it is named wwwroot). Upload the MySolution\MySolution.Web folder contents from the Developer Workstation to the created folder (for instance via FTP). Contact hosting support if you experience problems accessing the web root folder.
If the application is localized, and pre-built satellite assemblies are used in it, do the following.
- Create a subfolder in the bin folder. The subfolder name should be the culture code (for instance, "de" for the German language).
- Copy the required satellite assemblies to the subfolder.
Check to make sure that the target language is added to the application configuration file (Web.config).
Xml<appSettings>
<!-- ... -->
<;add key="Languages" value="en;de" />
<!-- ... -->
</appSettings>The supported languages are specified via the Languages key. This key value consists of supported language codes, separated by semicolons.
If there are several localization languages, repeat these steps for each language.
Open a web browser, either locally at a Web Server or at any remote workstation that has access to a Web Server. If you launched a Web Server local browser, type "http://localhost/mysolution/" in the browser address bar. If you launched the browser on a remote workstation, type "http://localhost/mysolution/" or "http://<your_server_name>/mysolution" instead. Press ENTER. If the Web Server displays an error message stating that an assembly is missing, then the reported assembly not being copied to theMySolution.Web\Bin folder from the Developer Workstation Global Assembly Cache (GAC) when building the application.

To resolve this error, copy the required assembly to the Bin folder on the Web Server. There are two locations on the Developer Workstation where you can get the required assembly.
- %PROGRAMFILES%\DevExpress 14.2\Components\Bin\Framework
- %PROGRAMFILES%\DevExpress 14.2\Components\Bin
NoteYou can register the required assembly in the GAC, instead of copying it to the application folder. Navigate to the c:\Windows\assembly folder in Windows Explorer and drop the assembly file into it. The assembly will be registered in the GAC.
Refresh the web page, and see if there is another missing assembly. Copy it from the Developer Workstation. Repeat the process until there are no errors reported on missing assemblies.
Note that if you are browsing your application from a remote workstation using the "http://<your_server_name>/mysolution" URL, the following brief error page that does not contain a missing assembly name may be displayed.

Web server error messages may contain information meant only for developers, and not public access. That is why the display of unhandled error information is disabled in ISS by default. Launch a browser and open the application at the Web Server locally, if possible. If you have no such access, modify the application Web.config file as shown below.
<system.web>
<!-- ... -->
<customErrors mode="Off">This will give you the ability to obtain detailed error descriptions at a remote browser (usually it will be a message about a missing assembly). For security reasons, we recommend that you undo these changes in the Web.config file after successful deployment.
NoteOnly run-time assemblies from the Developer Workstation are required. Ensure that you do not accidentally copy design-time assemblies or XML files that are named after the run-time assemblies.
Finally, the application will display the following message.

It means that all assembly requirements are satisfied and the application now requires a proper connection string in its configuration file, as well as access to its database. The Set Up the Database Connection lesson describes how to resolve this issue.
If you experience any problems performing the steps in this lesson, refer to the Deployment Troubleshooting Guide lesson.
Now your application needs a connection to a database to run properly. Proceed to the Set Up the Database Connection lesson to learn how to do it. To familiarize yourself with alternative deployment methods, take one of the following lessons.
使用XCopy发布网页的更多相关文章
- Rafy 框架-发布网页版用户手册
前段时间把 Rafy 的用户手册由 CHM 格式转换为了网页格式,而且发布到了 github.io 上,即方便文档的实时更新,也方便大家查看. Rafy 用户手册网页版地址: http://zgynh ...
- 利用花生壳和IIS发布网页过程
老早利用做过类似的事情,但最近又忘了怎么弄的了,还是自己给自己总结下,省得以后到处找了. [动态域名绑定] 如果具有公网IP地址,申请一个免费的花生壳动态域名,再下一个花生壳客户,使用已经申请好的动态 ...
- 用IIS进行部署,发布网页,运行DEMO
因项目需要,正在学习如何部署IIS服务,并发布网站,发布以后,运行网页,具体步骤如下: 一.IIS的部署 在进行部署前,需要将一些必要的配置选好,如图: 打开选项,进行设置,将箭头部分进行勾选 在wi ...
- 关于用IIS在.net平台发布网页的一些坑
说明:由于需要显示页面的表格的内容,要用pageOffice插件,而装pageoffice之前需要装.net3.5,直接导入. 为什么要分别装.net4.5和.net3.5 ? 都要装? 问题:刚才 ...
- 福利到!Rafy(原OEA)领域实体框架 2.22.2067 发布!
距离“上次框架完整发布”已经过去了一年半了,应群中的朋友要求,决定在国庆放假之际,把最新的框架发布出来,并把帮助文档整理出来,这样可以方便大家快速上手. 发布内容 注意,本次发布,只包含 Rafy ...
- WIN8+VS2013编写发布WCF之二(部署)
上文简介了如何建立WCF工程并且调试,下面说一下如何部署. 本文将陆陆续续讲述三种部署方式,随着项目的进展将不断补全. 声明: 用管理员身份打开VS2013,发布前请将程序的.net版本改成与服务器相 ...
- Labview学习之程序Web发布
Labview学习之程序Web发布 1. LabVIEW Web服务器 在LabVIEW开发环境中,自身带了一个已连接好的Web服务器.LabVIEW Web服务器除了与其他Web服务器一样能 ...
- WIN8+VS2013编写发布WCF、一(编写)、二(部署)、三(调用)
原文://http://www.cnblogs.com/tntboom/p/4348483.html 引言:上学期因为写服务器用WCF,所以连查资料再瞎调试勉强成功了,但是这学期又到了用WCF的时候, ...
- C#做完一个网站怎么发布?
前段时间在局域网上发布了一个自己做的网站,发布过程中遇到了不少问题.下面就发布过程和发布过程中遇到的问题与(你)大家一起分享一下,希望对(你)大家有所帮助吧! 在将ASP.NET网站发布到服务器之前需 ...
随机推荐
- 【英语】Bingo口语笔记(33) - 面部器官系列
to play by ear Play就是玩的意思.可是,play by ear的意思并不是“玩耳朵”.这个词汇的来源和音乐有关系.它原来指的是那些会弹钢琴或某种乐器,但是却不会看五线谱的人.每当他们 ...
- 五:分布式事务一致性协议paxos的应用场景
1.应用场景 (1)分布式中的一致性 Paxos算法主要是解决一致性问题,关于“一致性”,在不同的场景有不同的解释: NoSQL领域:一致性更强调“能读到新写入的”,就是读写一致性数据库领域:一致性强 ...
- 【转】在Eclipse中使用PyDev进行Python开发
原文网址:http://www.crifan.com/eclipse_use_pydev_develop_python/ 在折腾: [记录]使用Python的IDE:Eclipse+PyDev 的过程 ...
- 大数据时代的技术hive:hive介绍
我最近研究了hive的相关技术,有点心得,这里和大家分享下. 首先我们要知道hive到底是做什么的.下面这几段文字很好的描述了hive的特性: 1.hive是基于Hadoop的一个数据仓库工具,可以将 ...
- Android堆栈分析
在开发中,与界面跳转联系比较紧密的概念是Task(任务)和Back Stack(回退栈).activity的启动模式会影响Task和Back Stack的状态, 进而影响用户体验.除了启动模式之外,I ...
- EditText 光标不显示问题
android:textCursorDrawable="@drawable/bg_txt_cursor" <?xml version="1.0" enco ...
- 开发环境配置(netbeans+ant迁移到eclipse+maven)
新公司入职,接手一个离职人员的项目,拿到的源码是以一个压缩包,用netbeans开发,ant管理:前端:jsp+extjs,后端:springmvc+hibernate+activiti+spring ...
- Initializing a Build Environment
This section describes how to set up your local work environment to build the Android source files. ...
- nagios为监控图像添加图片
1. 背景介绍 在监控web页面上显示主机都为问号,如下图所示: 本文的主要目的就是将监控的图片添加进去,让监控图像变得美观. 2. 图片的下载地址 图片的下载地址如下: https://exchan ...
- GridView導出Excel
1.aspx頁面需要添加:EnableEventValidation="false" 實例:<%@ Page Language="C#" AutoEven ...