BUG/PRODUCTION-DOWN: UserControl running from HTML not working.
Someone please help,
I have a production down situation. For whatever reason, UserControls are
not owkring from HTML/IE. When script tries to run a UserControl's method or
use a property, IE gives an error "Object doesn't support this property or
method".
Example:
<html>
<body>
<object
id=objTest
classid="Test.dll#Test.TestControl"
style="display: none;"
VIEWASTEXT
</object>
</body>
<script language=javascript>
var objTest;
objTest = document.getElementById("objTest");
var csHello = objTest.RunTest("Hello");
alert(csHello);
</script>
</html>
I've posted this error in other formats, thinking it was something I was
doing in relation to IE/XP, but I've confirmed that even on 2000 machines,
bosting hosting the IIS and running the IE are giving the same error now for
some reason.
Something has changed, in either IE, IIS, XP/2000, and/or Visual Studio .NET
2003 that is causing this VERY simple .NET UserControl from working. As a
double check, our IIS virtual directories are set to ONLY run script. We know
of the IIS/UserControl issue that if the virtual directory is set to run
executables, that the UserControl will not run.
The strange thing is that if we run the OBJECT tag from the Visual Studio
..NET 2003 debuggger for any of our virtual directories, that the UserControls
then works correctly. But if ran from IE on its own, we get that error.
It is as if, for some reason IE will simply no longer run UserControls, even
if it "trusts" the server.
Please give advice.