global.asax 在本地计算机上工作,但在我发布到服务器后不起作用 [英] global.asax works on local computer but not after i publish to server

查看:29
本文介绍了global.asax 在本地计算机上工作,但在我发布到服务器后不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让我的 global.asax 文件发布到我们的 ftp 站点?

How can I get my global.asax file to publish to our ftp site?

我在我的项目中添加了一个 global.asax 文件(使用 asp.net 和来自 vs2010 的 c#),它在我的本地机器上运行良好.然后当我发布到我们的 ftp 站点时.然后从ftp文件夹复制到站点文件夹覆盖旧文件.它不起作用.我使用的是 Windows Server 2008 R2 Enterprise.

I have added a global.asax file to my project (using asp.net with c# from vs2010) which works great on my local machine. Then when I publish to our ftp site. Then copy from the ftp folder into the site folder overwriting old files. It doesn't work. I am using Windows Server 2008 R2 Enterprise.

推荐答案

检查 Global.asax 文件的构建操作"是否在文件属性中设置为内容".将部署设置为 content 的所有文件.

Check that the "Build action" of the Global.asax file is set to "Content" in the file properties. All files set to content will be deployed.

这篇关于global.asax 在本地计算机上工作,但在我发布到服务器后不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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