链接:https://documentation.devexpress.com/#eXpressAppFramework/CustomDocument113245

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.

    Note

    If 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.

    1. Create a subfolder in the bin folder. The subfolder name should be the culture code (for instance, "de" for the German language).
    2. Copy the required satellite assemblies to the subfolder.
    3. 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
    Note

    You 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.

    Note

    Only 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.

Note

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发布网页的更多相关文章

  1. Rafy 框架-发布网页版用户手册

    前段时间把 Rafy 的用户手册由 CHM 格式转换为了网页格式,而且发布到了 github.io 上,即方便文档的实时更新,也方便大家查看. Rafy 用户手册网页版地址: http://zgynh ...

  2. 利用花生壳和IIS发布网页过程

    老早利用做过类似的事情,但最近又忘了怎么弄的了,还是自己给自己总结下,省得以后到处找了. [动态域名绑定] 如果具有公网IP地址,申请一个免费的花生壳动态域名,再下一个花生壳客户,使用已经申请好的动态 ...

  3. 用IIS进行部署,发布网页,运行DEMO

    因项目需要,正在学习如何部署IIS服务,并发布网站,发布以后,运行网页,具体步骤如下: 一.IIS的部署 在进行部署前,需要将一些必要的配置选好,如图: 打开选项,进行设置,将箭头部分进行勾选 在wi ...

  4. 关于用IIS在.net平台发布网页的一些坑

    说明:由于需要显示页面的表格的内容,要用pageOffice插件,而装pageoffice之前需要装.net3.5,直接导入. 为什么要分别装.net4.5和.net3.5 ? 都要装?  问题:刚才 ...

  5. 福利到!Rafy(原OEA)领域实体框架 2.22.2067 发布!

    距离“上次框架完整发布”已经过去了一年半了,应群中的朋友要求,决定在国庆放假之际,把最新的框架发布出来,并把帮助文档整理出来,这样可以方便大家快速上手.   发布内容 注意,本次发布,只包含 Rafy ...

  6. WIN8+VS2013编写发布WCF之二(部署)

    上文简介了如何建立WCF工程并且调试,下面说一下如何部署. 本文将陆陆续续讲述三种部署方式,随着项目的进展将不断补全. 声明: 用管理员身份打开VS2013,发布前请将程序的.net版本改成与服务器相 ...

  7. Labview学习之程序Web发布

    Labview学习之程序Web发布 1. LabVIEW Web服务器     在LabVIEW开发环境中,自身带了一个已连接好的Web服务器.LabVIEW Web服务器除了与其他Web服务器一样能 ...

  8. WIN8+VS2013编写发布WCF、一(编写)、二(部署)、三(调用)

    原文://http://www.cnblogs.com/tntboom/p/4348483.html 引言:上学期因为写服务器用WCF,所以连查资料再瞎调试勉强成功了,但是这学期又到了用WCF的时候, ...

  9. C#做完一个网站怎么发布?

    前段时间在局域网上发布了一个自己做的网站,发布过程中遇到了不少问题.下面就发布过程和发布过程中遇到的问题与(你)大家一起分享一下,希望对(你)大家有所帮助吧! 在将ASP.NET网站发布到服务器之前需 ...

随机推荐

  1. 剑指offer-第二章排序之年龄排序

    题目:对某个公司的人的年龄(0-99)进行排序,该公司的总人数为几万人.要求时间复杂度为O(n),可以辅助O(n)的空间. 思路:实现函数为void SortAge(int ages[],int le ...

  2. Java中Volatile关键字详解

    一.基本概念 先补充一下概念:Java并发中的可见性与原子性 可见性: 可见性是一种复杂的属性,因为可见性中的错误总是会违背我们的直觉.通常,我们无法确保执行读操作的线程能适时地看到其他线程写入的值, ...

  3. android去掉EditView的默认焦点问题

    在EditText的父级控件中找一个,设置成 <LinearLayout android:layout_width="0dp" android:layout_height=& ...

  4. XAMPP 的安装配置

    --转载时请保留下面,以供大家加我MSN,增强交流,共同学习.--姜庭华  msn: jaimejth@live.cn--博客:http://blog.csdn.net/jaimejth 软件下载在以 ...

  5. pageX,clientX,offsetX,layerX的区别

    pageX,clientX,offsetX,layerX的区别 在各个浏览器的JS中,有很多个让你十分囧的属性,由于各大厂商对标准的解释和执行不一样,导致十分混乱,也让我们这些前端攻城狮十分无语和纠结 ...

  6. linux xampp eclipse xdebug 无法进入断点

    一.xampp 版本 1.8.3-5 xampp安装后会自动集成xdebug,目录一般为 /opt/lampp/lib/php/extensions/***-debug-***目录 关于php 与ph ...

  7. [Everyday Mathematic]20150213

    设 $f:\bbR\to\bbR$ 三阶可微, 试证: 存在 $\xi\in (-1,,1)$, 使得 $$\bex \frac{f'''(\xi)}{6}=\frac{f(1)-f(-1)}{2}- ...

  8. 读取raw目录中的文件数据

    try { InputStream is2 = getResources().openRawResource(R.raw.info); InputStreamReader isr2 = new Inp ...

  9. 为什么大型网站前端使用PHP后台逻辑用Java

    前两周参加完 ThinkInLamp 的 PHP 架构师大会,听鸟哥一上午的分享,感慨很多,PHP 业界虽然方向不明荒废了两三年的时间,终究还是又重新崛起了. 其实包括 Java 的重启问题,现在也已 ...

  10. 排列组合+组合数取模 HDU 5894

    // 排列组合+组合数取模 HDU 5894 // 题意:n个座位不同,m个人去坐(人是一样的),每个人之间至少相隔k个座位问方案数 // 思路: // 定好m个人 相邻人之间k个座位 剩下就剩n-( ...