Last post Feb 12, 2013 08:49 PM by Selden
Feb 12, 2013 07:16 PM|Selden|LINK
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?
Feb 12, 2013 08:42 PM|WinAnimesh|LINK
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..
Feb 12, 2013 08:49 PM|Selden|LINK
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.