发布网站,仅将cs文件转换为dll [英] Publishing a website, converting only cs files into dlls

查看:70
本文介绍了发布网站,仅将cs文件转换为dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要发布一个网站,但是我需要将代码隐藏(cs文件)编译成dll'...我在VS的开发人员命令提示符下用这行代码完成了这个:

 Aspnet_compiler -pC:\ SiteLocation-v -f C:\DestinationFolder 

但是这行转换dll中的所有文件(cs文件和html文件),我不需要转换成html文件dll'的...如果我尝试在visual studio 2012中使用Publish网站选项,不知何故它只是不会在服务器上运行,它就像它没有将我的cs文件转换为dll'的...当我把它放在服务器我不断得到这个消息:

由于发生内部服务器错误,无法显示该页面。

我对这类问题有点新意,所以任何帮助都会如果您使用Visual Studio 2012,请按以下方式进行操作:



BUILD - > 发布选择 - > 个人资料 - >选择< new>在组合框中



然后将发布方法设置为FTP

填写其他字段:

服务器:您网站的ftp地址/喜欢:ftp://yoursite.com或ftp://ftp.yoursite.com

网站路径:主目录的地址,用于定位您的站点/默认设置为''/''

用户名,密码:用户&传入需要在FTP连接中进行身份验证



目标网址:您可以省略此字段。



发布



希望能帮到你!

Well i need to publish a website, but 1st i need to compile codebehind (cs files) into dll''s...i did this with this line of code in Developer command prompt of VS:

Aspnet_compiler -p "C:\SiteLocation" -v -f C:\DestinationFolder

However this line convert all files in dll (cs files and html files) and i dont need html files converted into dll''s...and if i try using Publish website option in visual studio 2012, somehow it just wont work on server, its like it doesnt convert my cs files into dll''s...and when i place it on server i constantly get this msg:

The page cannot be displayed because an internal server error has occurred.

i am kinda new with this type''s of issues, so any help would be appreciated.

解决方案

if you use Visual Studio 2012 follow this:

BUILD -> Publish Selection -> Profile -> select <new> in combo box

then set Publish Method to FTP
fill other field:
Server : ftp address of your site / like: ftp://yoursite.com or ftp://ftp.yoursite.com
Site Path: address of the main directory to locate your site / default set to ''/''
Username , Password : user & pass in needed to be authenticated in FTP connection

Destination URL : you can omit this field.

press Publish

hope to help you!


这篇关于发布网站,仅将cs文件转换为dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆