Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change I make to code behind not updating when I publish my web application

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.

like image 981
Spacemancraig Avatar asked Aug 18 '11 18:08

Spacemancraig


2 Answers

enter image description here

project-->Property's--> Package / product web--> Items to deploy --> All files in this project folders

now publish your project. your new files also added in publish folder. . .

like image 69
karthi Avatar answered Sep 21 '22 05:09

karthi


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.

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.

like image 33
Adam Tuliper Avatar answered Sep 20 '22 05:09

Adam Tuliper