From: Darren Brinksneader on 2 Mar 2010 10:09 The follow HTML runs fine on a local computer: <html> <body> <script type="text/vbscript"> Set objSysInfo = CreateObject("ADSystemInfo") strSite = objSysInfo.SiteName document.write(strSite) </script> </body> </html> But when the HTML is served via IIS on server 2008 I get the following error: ---------------------- Message: ActiveX component can't create object: 'ADSystemInfo' Line: 5 Char: 1 Code: 0 ----------------- HTML source view looks the same: ----------------------------------------- <html> <body> <script type="text/vbscript"> Set objSysInfo = CreateObject("ADSystemInfo") strSite = objSysInfo.SiteName document.write(strSite) </script> </body> </html> ------------------------ Any thoughts?
From: Dan on 2 Mar 2010 10:51 "Darren Brinksneader" <DarrenBrinksneader(a)discussions.microsoft.com> wrote in message news:2F416B28-9E20-4590-9131-98564B49C8BE(a)microsoft.com... > The follow HTML runs fine on a local computer: > > <html> > <body> > <script type="text/vbscript"> > Set objSysInfo = CreateObject("ADSystemInfo") > strSite = objSysInfo.SiteName > document.write(strSite) > </script> > </body> > </html> > > But when the HTML is served via IIS on server 2008 I get the following > error: > > ---------------------- > > Message: ActiveX component can't create object: 'ADSystemInfo' > Line: 5 > Char: 1 > Code: 0 > ----------------- > > HTML source view looks the same: > > ----------------------------------------- > > <html> > <body> > <script type="text/vbscript"> > Set objSysInfo = CreateObject("ADSystemInfo") > strSite = objSysInfo.SiteName > document.write(strSite) > </script> > </body> > </html> > > ------------------------ > > Any thoughts? That is all client side code, and this has nothing to do with IIS settings. In the first case, the script is being executed in the browser under the My Computer security zone. In the second case, it will be under a different security zone, with different permissions. It looks like the browser doesn't have permission to create the ADSystemInfo object in the browser in the second case. -- Dan
|
Pages: 1 Prev: IIS and HTTP File Download Sites Next: IIS Password change pages 64bit |