How to deploy sqlce4.0 ASP. NET mvc3 website in Bin

Source: Internet
Author: User

Refer to here:

How to bin deploy SQL compact Edition 4.0 and razor web projects

With the release of vs2010 SP1 beta1, web matrix, and razor QFE, we can build Web projects containing SQL compact Edition 4.0 SDF file and ASP. net web pages with razor syntax. however, this might be a problem when you are ready to deploy your project on a server that doesn't have the Assemblies required to run SQL ce 4.0 and razor pages.

To solve this issue, we can make the project "bin deployable", similar to the way we do bin deploy an MVC project. if the hosting machine has ASP. net 3.5 or later installed, then we just need to include the required assemblies in the bin folder when deploying the project.

We can include required assemblies in a web site or web application project with a few simple steps. You right click the project node in Solution Explorer and select "add deployable dependencies ..." Context menu item.

If there isn' t SQL ce 4.0 nor razor installed on the machine, the following diwing will pop up:

If there's at least one of them installed, then the following diwing will pop up:

Visual Studio detects what components are present on the machine and the corresponding options will be enabled; you then can choose what to include in the bin folder. in the above picture, only the option for SQL Server compact is enabled on a machine with SQL Server compact 4.0 installed. if it's a website, the required assemblies will be copied to "bin" folder; if it's a WAP, they will be copied to "_ bin_deployableassemblies" folder. note that your selection will not be persisted after the dialog is closed.

Now you can deploy your web projects the same way you deploy any other web project. for a web application project (WAP), you can use deployment feature made available with vs2010. for both web site or WAP, you can use "copy Web ", or "Web deployment project" to push all the files needed to deploy to a specific directory, test it, and then copy the host.

Hope it helps!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.