locked
Intermittent "ambiguous" error after deployment to server RRS feed

  • Question

  • User2147096654 posted

    I have a web application (VS2012, .net 4.0) which I often update, then deploy to my web server.  It runs fine locally on my dev machine.  Occasionally after I deploy to my web server, some of the pages won't load and give an error ("xxx.vb is ambiguous") where xxx may be a user control.  When this happens, I can delete the asp.net temp files on the server, restart IIS and the error often (but not always) goes away.  But sometimes after doing that, the error will start happening for a DIFFERENT page, that was not giving the error before deleting the temp files.  And sometimes, just refreshing the page a few times will fix it.  But other times, I have to re-copy the files several times from my deployment folder to the server to get things to work.

    Then, sometimes, the probem will not reoccur for a few months, and then it will start happening again.

    This is extremely frustrating, both to me, and to the client.  Am I doing something wrong that is causing this?  Any suggestions to avoid this problem?

    Tuesday, February 12, 2013 7:16 PM

Answers

  • User-313221851 posted

    This can happen due to two reasons:

    1. Batch compilation being turned on, check the <compilation> tag under <system.web> to see if it has an attribute batch="true".

    2. Similar class names being used in different pages, usually happens when developers copy and paste a page and change the aspx page name but do not change the name of the class.

    Let me know if either of the following is true in your case...

    Hope it helps..

    - Animesh

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 12, 2013 8:42 PM

All replies

  • User-313221851 posted

    This can happen due to two reasons:

    1. Batch compilation being turned on, check the <compilation> tag under <system.web> to see if it has an attribute batch="true".

    2. Similar class names being used in different pages, usually happens when developers copy and paste a page and change the aspx page name but do not change the name of the class.

    Let me know if either of the following is true in your case...

    Hope it helps..

    - Animesh

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 12, 2013 8:42 PM
  • User2147096654 posted

    Thanks!  I didn't know about the batch attribute.  In my web.config file the Compilation item did not specify the batch attribute, so I added it and set it to "false" and we'll see.

    Regarding your other suggestion, do you think this could explain the page not working, then I just refresh the page in the browser and then it works?

    I'll post again after deploying with the batch="false" if I see any change.

     

    Tuesday, February 12, 2013 8:49 PM