posted on Wednesday, August 24, 2005 5:32 PM
by
richardSlade
No event handlers when linking from another virtual directory
Have a bit of a problem. I'm sure that I will get it solved, but it is proving to be rather tricky. Perhaps there is something obvious that I have missed. After all, my bleary eyes were tired and crumpled from the days coding. Here is what is happening, what we have in place and how I replicate my strange situation.
We have 2 development web servers, load balanced with sticky concurrent sessions.
We have many web projects in one solution, but in this example problem I only need 2 projects.
Each project is published to both web servers
The web servers are both set up in the same way
Each of the two projects sits under a separate virtual directory (E.g.
www.mysite.com/Project1 and
www.mysite.com/Project1/Project2)
Project 1 uses NT Authentication and so does not allow anonymous access
Project 2 allows anonymous access
The problem
From www.mysite.com/Project1 there are a set of links. One of these links takes the users to www.mysite.com/Project1/Project2 . On the project 2 section, there are some buttons with normal .net event handlers behind them. If I navigate directly to www.mysite.com/Project1/Project2 then all works fine. However, if I navigate to www.mysite.com/Project1 , click on the link to project 2, then all of the buttons on project 2 have lost the event handlers. The buttons do nothing more than reload the page. Even more strangely, after I see that project 2 is not working, if I copy the url, close the browser and re-open it, pasting in the url that was not working (project2) then all works fine.
So, in the morning, I guess I'm just going to run a whole series of tests, and will hopefully be able to post how this was solved, and probably the silly thing that I haven't yet thought of. However, if someone else has ever seen anything like this, please feel free to share the love and let me know what on earth it could be. Solution to follow (one hopes)....