I have created a web application using ASP.NET MVC3 in Visual studio (no SQL Server). Now I want to deploy it and am looking for suggestions for the easiest possible way.
As of Now what i did is(rule 1-10) http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx
我在Visual Studio中使用ASP.NET MVC3创建了一个Web应用程序(没有SQL Server)。现在我想部署它,并寻找最简单的方法的建议。截至目前,我所做的是(规则1-10)http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx
5 个解决方案
#1
11
1- bin folder in project's folder
2- Content folder
3- Scripts folder
4- Views folder
5- Global.asax
6- Web.config
7- copy from C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies directory
You should copy these files in "bin" directory before deploy website
项目文件夹中的1- bin文件夹2-内容文件夹3-脚本文件夹4-视图文件夹5- Global.asax 6- Web.config 7-从C:\ Program Files \ Microsoft ASP.NET \ ASP.NET Web Pages复制v1.0 \ Assemblies目录在部署网站之前,您应该将这些文件复制到“bin”目录中
Microsoft.CSharp.dll - reference
Microsoft.Web.Infrastructure.dll and .xml - copy
System.Web.Helpers.dll and .xml - reference
System.Web.Razor.dll and .xml - copy
System.Web.Routing.dll - reference
System.Web.WebPages.Deployment.dll and .xml - copy
System.Web.WebPages.dll - reference
System.Web.WebPages.Razor.dll and .xml - copy
#2
5
When you run application in Visual Studio 2010 with .net framework 4 and MVC 3 installed on your machine the following folders are automatically created:
在Visual Studio 2010中运行应用程序并在计算机上安装.net framework 4和MVC 3时,将自动创建以下文件夹:
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3
C:\ Program Files \ Microsoft ASP.NET \ ASP.NET MVC 3
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages.
C:\ Program Files(x86)\ Microsoft ASP.NET \ ASP.NET Web Pages。
These folders also contain an “Assemblies” folder.
这些文件夹还包含“Assemblies”文件夹。
ASP.NET MVC references following additional assemblies:
ASP.NET MVC引用遵循其他程序集:
System.Web.Mvc
Microsoft.Web.Infrastructure
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Razor
To deploy your application on shared server with no support from your hosting company you can simply copy these DLL files and paste them to your BIN folder.
要在没有托管公司支持的情况下在共享服务器上部署应用程序,您只需复制这些DLL文件并将其粘贴到BIN文件夹即可。
Make DLLs local while publishing:
发布时使DLL本地化:
If you don’t want to copy these files manually or don’t have permissions to copy and paste these files you can use this method.
如果您不想手动复制这些文件,或者无权复制和粘贴这些文件,则可以使用此方法。
The DLL files mentioned in the manual method can be included in the Bin folder when you publish your project to a production.
将项目发布到生产环境时,手动方法中提到的DLL文件可以包含在Bin文件夹中。
To include them to the Bin folder, go to your MVC application project and expand the ‘References’ node in project tree. Select above assemblies then right click and select ‘Properties’ and change ‘Local Copy’ to True as it is False by default. If Local Copy attribute is set to TRUE then selected DLL will be included in ‘Bin’ folder when you publish your project.
要将它们包含在Bin文件夹中,请转到MVC应用程序项目并展开项目树中的“引用”节点。选择上面的程序集然后右键单击并选择“属性”并将“本地副本”更改为True,因为它默认为False。如果Local Copy属性设置为TRUE,则在发布项目时,选定的DLL将包含在“Bin”文件夹中。
#3
5
In addition to all these answers about copying the mvc dll's manually. Visual Studio 2010 (with SP1) has the abiltity to do this for you.
除了关于手动复制mvc dll的所有这些答案。 Visual Studio 2010(带SP1)具有为您执行此操作的能力。
- Rightclick your mvc web project
- 右键单击您的mvc Web项目
- Click on Add Deployable dependencies
- 单击Add Deployable dependencies
- Choose one or more of the three options (asp.net mvc, asp.net webpages with razor syntax, sql server compact)
- 选择三个选项中的一个或多个(asp.net mvc,带有razor语法的asp.net网页,sql server compact)
- Publish your application.
- 发布您的申请。
Visual studio will now auto deploy the correct references in your bin folder.
Visual Studio现在将在bin文件夹中自动部署正确的引用。
#4
4
Right click the project and choose "Publish".
右键单击该项目,然后选择“发布”。
#5
2
very easy steps-
非常简单的步骤 -
- Put your application in
C:\inetpub\wwwroot
(for that first configure IIS on your system). - 将您的应用程序放在C:\ inetpub \ wwwroot中(首先在您的系统上配置IIS)。
- Now,click on windows, and write run.
- 现在,单击Windows,然后编写运行。
- A Textbox will appear, write 'inetmgr' inside it and click OK.
- 将出现一个文本框,在其中写入“inetmgr”并单击“确定”。
- Expand 'Administrator' on left side of screen by clicking on its arrow.
- 单击箭头,展开屏幕左侧的“管理员”。
- Expand Sites and then Expand 'Default Web Site'.
- 展开“站点”,然后展开“默认网站”。
- Right click your application and choose 'Add to Web Application'.
- 右键单击您的应用程序,然后选择“添加到Web应用程序”。
That's it. Icon next to your application will turn to a blue globe.
而已。应用程序旁边的图标将变为蓝色地球仪。
#1
11
1- bin folder in project's folder
2- Content folder
3- Scripts folder
4- Views folder
5- Global.asax
6- Web.config
7- copy from C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies directory
You should copy these files in "bin" directory before deploy website
项目文件夹中的1- bin文件夹2-内容文件夹3-脚本文件夹4-视图文件夹5- Global.asax 6- Web.config 7-从C:\ Program Files \ Microsoft ASP.NET \ ASP.NET Web Pages复制v1.0 \ Assemblies目录在部署网站之前,您应该将这些文件复制到“bin”目录中
Microsoft.CSharp.dll - reference
Microsoft.Web.Infrastructure.dll and .xml - copy
System.Web.Helpers.dll and .xml - reference
System.Web.Razor.dll and .xml - copy
System.Web.Routing.dll - reference
System.Web.WebPages.Deployment.dll and .xml - copy
System.Web.WebPages.dll - reference
System.Web.WebPages.Razor.dll and .xml - copy
#2
5
When you run application in Visual Studio 2010 with .net framework 4 and MVC 3 installed on your machine the following folders are automatically created:
在Visual Studio 2010中运行应用程序并在计算机上安装.net framework 4和MVC 3时,将自动创建以下文件夹:
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3
C:\ Program Files \ Microsoft ASP.NET \ ASP.NET MVC 3
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages.
C:\ Program Files(x86)\ Microsoft ASP.NET \ ASP.NET Web Pages。
These folders also contain an “Assemblies” folder.
这些文件夹还包含“Assemblies”文件夹。
ASP.NET MVC references following additional assemblies:
ASP.NET MVC引用遵循其他程序集:
System.Web.Mvc
Microsoft.Web.Infrastructure
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Razor
To deploy your application on shared server with no support from your hosting company you can simply copy these DLL files and paste them to your BIN folder.
要在没有托管公司支持的情况下在共享服务器上部署应用程序,您只需复制这些DLL文件并将其粘贴到BIN文件夹即可。
Make DLLs local while publishing:
发布时使DLL本地化:
If you don’t want to copy these files manually or don’t have permissions to copy and paste these files you can use this method.
如果您不想手动复制这些文件,或者无权复制和粘贴这些文件,则可以使用此方法。
The DLL files mentioned in the manual method can be included in the Bin folder when you publish your project to a production.
将项目发布到生产环境时,手动方法中提到的DLL文件可以包含在Bin文件夹中。
To include them to the Bin folder, go to your MVC application project and expand the ‘References’ node in project tree. Select above assemblies then right click and select ‘Properties’ and change ‘Local Copy’ to True as it is False by default. If Local Copy attribute is set to TRUE then selected DLL will be included in ‘Bin’ folder when you publish your project.
要将它们包含在Bin文件夹中,请转到MVC应用程序项目并展开项目树中的“引用”节点。选择上面的程序集然后右键单击并选择“属性”并将“本地副本”更改为True,因为它默认为False。如果Local Copy属性设置为TRUE,则在发布项目时,选定的DLL将包含在“Bin”文件夹中。
#3
5
In addition to all these answers about copying the mvc dll's manually. Visual Studio 2010 (with SP1) has the abiltity to do this for you.
除了关于手动复制mvc dll的所有这些答案。 Visual Studio 2010(带SP1)具有为您执行此操作的能力。
- Rightclick your mvc web project
- 右键单击您的mvc Web项目
- Click on Add Deployable dependencies
- 单击Add Deployable dependencies
- Choose one or more of the three options (asp.net mvc, asp.net webpages with razor syntax, sql server compact)
- 选择三个选项中的一个或多个(asp.net mvc,带有razor语法的asp.net网页,sql server compact)
- Publish your application.
- 发布您的申请。
Visual studio will now auto deploy the correct references in your bin folder.
Visual Studio现在将在bin文件夹中自动部署正确的引用。
#4
4
Right click the project and choose "Publish".
右键单击该项目,然后选择“发布”。
#5
2
very easy steps-
非常简单的步骤 -
- Put your application in
C:\inetpub\wwwroot
(for that first configure IIS on your system). - 将您的应用程序放在C:\ inetpub \ wwwroot中(首先在您的系统上配置IIS)。
- Now,click on windows, and write run.
- 现在,单击Windows,然后编写运行。
- A Textbox will appear, write 'inetmgr' inside it and click OK.
- 将出现一个文本框,在其中写入“inetmgr”并单击“确定”。
- Expand 'Administrator' on left side of screen by clicking on its arrow.
- 单击箭头,展开屏幕左侧的“管理员”。
- Expand Sites and then Expand 'Default Web Site'.
- 展开“站点”,然后展开“默认网站”。
- Right click your application and choose 'Add to Web Application'.
- 右键单击您的应用程序,然后选择“添加到Web应用程序”。
That's it. Icon next to your application will turn to a blue globe.
而已。应用程序旁边的图标将变为蓝色地球仪。