发布Web应用程序时对未更新的代码进行的更改 [英] Change I make to code behind not updating when I publish my web application

查看:93
本文介绍了发布Web应用程序时对未更新的代码进行的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在VS2010中内置的ASP.net,它在iis7中运行,但是当我回到VS并更新文件后面的代码并重新发布应用程序时,它仍然像执行更改之前一样.我尝试删除并重新发布所有文件,然后重新启动应用程序池,但是它仍然不会影响应用程序的行为.

I have an ASP.net that I built in VS2010 running in iis7 however when I go back into VS and make updates to the code behind file and re-publish the application still acts as it has before I made the changes. I have tried deleting and republishing all the files and restarting the app pool but it still doesn't affect how the application behaves.

推荐答案

请勿在您的服务器上发布vb和cs文件,除非您觉得有可能公开源代码.有多个漏洞允许下载代码.

DO NOT publish your vb and cs file on there server unless you feel like having your source code potentially exposed. There have been multiple vulnerabilities that have allowed code download.

通过Visual Studio的发布"菜单将应用程序发布到文件夹中. 在服务器上,进入您的临时aspnet文件夹,例如: c:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \临时ASP.NET文件 并找到您的应用并将其删除.如果无法删除文件,请停止工作进程(w3wp.exe)或重新启动iis.

Publish the application to a folder via the visual studio publish menu. On the server, go into your temporary aspnet folder for example: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files and find your app and delete it. If you cannot delete the files stop the worker process (w3wp.exe) or restart iis.

重新发布,一切都应该很好.如果您不确定该版本是否正在执行,请在新版本中添加一些日志记录或跟踪信息.

Republish and all should be good. If you are in doubt if that version is getting executed then add some logging in the new version or trace information.

这篇关于发布Web应用程序时对未更新的代码进行的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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