Hi everyone

I'm having a very annoying problem that I can't seem to find an answer to.

I have a rather simple web app that basically retrieves some data from a database. I'm using Visual Studio 2010 Pro. I've developed the app and deployed it to my web server and it works fine. I've been requested to make a slight change to it which means changing some of the VB code behind.

I've done the changes in Visual Studio and when I test it on Visual Studio it works fine and my changes are there and working. I've then built and published the project again to generate updated DLL files and aspx files. I've then deployed those on to the web server and restart the web site and IIS. Yet when I browse to the site it still works fine but my changes are not reflected. This is what I have tried to fix the problem.

Deleted all ASP.Net temporary files
IISReset - quite a few times
stopped and started the website
deleted the whole directory containing the web app files on the web server and recreated it with all new files from my machine which runs visual studio
Stopped and started the application pool associated with my web site

I've done all of the above yet nothing seems to have resolved the problem. What I do know is that I can probably delete the web site and re-create the entire site and app pool in IIS and that should solve the problem but surely I should not have to do that every time I updated the app!

If anyone has an answer to this I would be very grateful as this problem is driving me mad!

thank you!!
Simon

I would suspect that the browser has cached the page and is simply rendering the cached page. Try emptying the cache.

Sorry forgot that bit. I have done exactly that and I have even used different browsers.. result is still the same I'm afraid.

The other thing you may want to double check is that in the declarations at the top of the aspx page that codefile="~/therightfilename.aspx.vb and that the declaration doesn't say codebehind, that's if you are using a codefile or vice versa.

On the Default.aspx page in the top it says CodeBehind="Default.aspx.vb". Now when I build and publish the project it is compiling the vb code in to a dll.. is that correct? If that is then it definetly has the updated version of the dll file with the changes I have made.
As a test I have added a button to the default.aspx page itself, saved it, re-built and re-published the app with the new files, updated the live web site and hey presto my button appears. So it is seeing the new default.aspx file but doesn't appear to be seeing any changes made to code behind files.

Actually you should try to change the the CodeBehind to CodeFile="Default.aspx.vb" then build and republish.

just change the word "CodeBehind" to "CodeFile" at the top of the Default.aspx page. I bet that will fix it.

hi mine is already codefile but i dont know why its not working after i publish and copy the dll to the server. but when i published the same changes from another pc it works. only in my computer when i publish it will have no effect on the changes

depends on publish settings of your website \

go to property in your website property, go to MSBuildOptions

1) if u have used Fixednaming and single page assemblies then u have to update only dll files

else u have to update code files of changed files

set this propoerty in your website proporty pages MSBuildOptions

better change all the checkboxes to false.

same will be asked when u publish the project. a popup will be opened with same options.

I think it's showing the cached page, empty the cache and try again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.