简体   繁体   English

从Visual Studio 2012将非MVC网站部署到IIS7(Windows 2008)服务器

[英]Deploying non-MVC website to IIS7 (Windows 2008) server from Visual Studio 2012

Is there a documentation or how-to on deploying non-MVC website from Visual Studio 2012? 是否存在有关从Visual Studio 2012部署非MVC网站的文档或操作方法?

I have seen some saying to use references (bin directory) which is all I need for Visual Studio 2012 but I haven't been able to get it to work. 我已经看到有人说使用引用(bin目录),这是Visual Studio 2012所需的全部内容,但我无法使其正常工作。 Apperantly, there's a lot about it that I don't know about so is there friendly HOWTO documentation on it? 显然,有很多我不知道的东西,所以上面有友好的HOWTO文档吗?

THanks... Pretty much appreciated. 谢谢...非常感谢。

After trials & errors, I learned a few things here. 经过反复试验,我在这里学到了一些东西。

To save yourself the troubles, use Nuget package manager and select the "Microsoft ASP.NET Web Pages 2" package and it takes care of the rest for you. 为了避免麻烦,请使用Nuget软件包管理器,然后选择“ Microsoft ASP.NET Web Pages 2”软件包,它将由您自己负责。

When you're done, your next steps is 完成后,接下来的步骤是

A) Copy over "" scripts (razor stuff) that are found inside the ""'s of your web.config file to your production server's web.config. A)将在Web.config文件的“”内找到的“”脚本(剃刀内容)复制到生产服务器的web.config。

B) Copy over the *.dll files that was installed from NuGet Manager. B)复制从NuGet Manager安装的* .dll文件。

That's it. 而已。 You're done! 你完成了! The reasons for using the packages file is cuz it update your web.config file w/ filename and PublicKey you don't know of and put *.dll files into the BIN directory. 使用packages文件的原因是因为它会使用您不知道的文件名和PublicKey更新您的web.config文件,并将* .dll文件放入BIN目录。 It takes care of it for you. 它为您照顾。 :-) :-)

I don't know of a better way to do this. 我不知道这样做的更好方法。 At least I can use the razor and *.cshtml file without the MVC on the production environment. 至少我可以在生产环境中使用没有MVC的razor和* .cshtml文件。

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

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