Coffeehouse Thread

7 posts

Code change are not taken into account in web app

Back to Forum: Coffeehouse
  • User profile image
    compugab

    Hi

     I'm using Windows Vista RC1 and Visual Web Developer 2005 Express SP1 with Vista support files. The user that runs Visual Web is a local admin. The files are on a file share access using a mapped drive. It's work well with XP but not with Vista.

    Went I make change to my code in Visual Web Developer 2005 Express, they are not taken into account, like if the change was not made.

    For example, I have this code:

    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Output.Write(1 + 1);
    }

    When I run it, it prints a 2 on my web page. But if I change to code for this:

    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Output.Write(1 + 2);
    }

    It still prints 2. I need to close Visual Web Developer and restart it for the change to be made.

    Thanks for an answer
    Compugab

  • User profile image
    prec

    It sounds to me like it's due to caching in your browser, try putting this in the Page_Load:

    Response.Cache.SetCacheability(HttpCacheability.NoCache);

    This is of course not recommended for real applications though.

  • User profile image
    littleguru

    Are you running Web Developer as an administrator? Right click the Web Developer link (shortcut) and click on "Run as administrator" Smiley Could help too. But the caching thing could also be the issue!

  • User profile image
    compugab

    Yes I’m running the Web Developer as administrator. I'll try the cache trick tonight went I'll be back at home

    Just in case it could help : If I directly access my web app the change are taken. Like if I go to http://www.MyServeurName.com/WebApp, the first time it's output 2, make the change, save second access it's output 3.

    Thanks for your help

  • User profile image
    compugab

    prec wrote:
    

    It sounds to me like it's due to caching in your browser, try putting this in the Page_Load:

    Response.Cache.SetCacheability(HttpCacheability.NoCache);

    This is of course not recommended for real applications though.



    Not it doesn't work. The same effect. Could it be a Visual Studio bug or a bad configuration

  • User profile image
    typemismatch

    The process isn't aware any code files changed and is keeping the old compiled .cs file - close the asp.net hosting process if you're using it and hit F5 - the rebuild will fix the problem. If you're bound to IIS do an iis reset.

    If you're using VPPs then your file hash isn't working.

    -c

  • User profile image
    compugab

    typemismatch wrote:
    The process isn't aware any code files changed and is keeping the old compiled .cs file - close the asp.net hosting process if you're using it and hit F5 - the rebuild will fix the problem. If you're bound to IIS do an iis reset.

    If you're using VPPs then your file hash isn't working.

    -c


    Cool it works. If I close ASP.NET developement server the changes are taken into account.

    Problem Solved

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.