HighTechTalks DotNet Forums  

MSScriptControl randomly fails when running from .Net code on IIS

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss MSScriptControl randomly fails when running from .Net code on IIS in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?U3RldmVX?=
 
Posts: n/a

Default MSScriptControl randomly fails when running from .Net code on IIS - 07-26-2007 , 11:18 AM






We have been seeing an unusual and intermittent problem with some .Net 1.1
..aspx pages running on IIS 4.0 on a pair of load-balanced Windows 2000 SP4
servers. Basically we are using the class MSScriptControl (v.1.0 Interop
DLL) in our code to load and run custom VBScript dynamically on pages. This
has been working fine for years until the last few weeks when we have been
getting periods of a few days where the AddCode() method just throws an
exception unexpectedly. This is very strange as we haven’t changed anything
in the build.

What is even stranger, is that when it is failing, we can run a test windows
application on the same server that will load and run exactly the same script
in exactly the same way, while the .aspx page doing the same thing on IIS
always fails...and then all of a sudden everything is working fine again!

System specs:
IIS 4.0
Windows 2000 (5.00.2195), Service Pack 4
.NET Framework v1.1.4322

Here is the code in question:
------------------------------------------------------

m_ScriptControl = new MSScriptControl.ScriptControlClass();

m_ScriptControl.Language = "VBScript";
m_ScriptControl.AllowUI = false;
m_ScriptControl.UseSafeSubset = true;

String sBase = this.m_Survey.ServerObjectModel;
sBase += "\n" + m_Survey.GetServerVBScriptObjectModel();

try
{
m_ScriptControl.AddCode( sBase );
}
catch
{
m_sError = "Failed to parse survey object model. \n" +
m_ScriptControl.Error.Source + "\nLine: " + m_ScriptControl.Error.Line + ".
Col: " + m_ScriptControl.Error.Column + ".\n" +
m_ScriptControl.Error.Description + "\n" + sBase;

m_ScriptControl = null;
}
--------------------------------------------
When the AddCode() method fails, we always get error at line 0, column 0,
with empty strings for the Error.Source and Error.Description properties.
It’s almost as if something is stopping this method from executing, which
leads me to suspect the anti-virus software, which is McAfee VirusScan
Enterprise + Anti-Spyware Module 8.0.0.

Any thoughts on this problem would be greatly appreciated.

Thanks,

Steve


Reply With Quote
  #2  
Old   
pavelmaxim@yahoo.com
 
Posts: n/a

Default Re: MSScriptControl randomly fails when running from .... - 08-15-2007 , 11:12 AM






It is possible that a 'Request execution timeout (in seconds)' that is not set long enough for the method execution (default IIS setting is 110 seconds) to cause that vb script error.You can check this setting in site properties, ASP.NET Configuration settings, tab Application.
Change it to a much longer period.

Hope this helps.
Pavel

Reply With Quote
  #3  
Old   
pavelmaxim@yahoo.com
 
Posts: n/a

Default Re: MSScriptControl randomly fails when running from .... - 08-15-2007 , 11:12 AM



It is possible that a 'Request execution timeout (in seconds)' that is not set long enough for the method execution (default IIS setting is 110 seconds) to cause that vb script error.You can check this setting in site properties, ASP.NET Configuration settings, tab Application.
Change it to a much longer period.

Hope this helps.
Pavel

Reply With Quote
  #4  
Old   
pavelmaxim@yahoo.com
 
Posts: n/a

Default Re: MSScriptControl randomly fails when running from .... - 08-15-2007 , 11:12 AM



It is possible that a 'Request execution timeout (in seconds)' that is not set long enough for the method execution (default IIS setting is 110 seconds) to cause that vb script error.You can check this setting in site properties, ASP.NET Configuration settings, tab Application.
Change it to a much longer period.

Hope this helps.
Pavel

Reply With Quote
  #5  
Old   
pavelmaxim@yahoo.com
 
Posts: n/a

Default Re: MSScriptControl randomly fails when running from .... - 08-15-2007 , 11:12 AM



It is possible that a 'Request execution timeout (in seconds)' that is not set long enough for the method execution (default IIS setting is 110 seconds) to cause that vb script error.You can check this setting in site properties, ASP.NET Configuration settings, tab Application.
Change it to a much longer period.

Hope this helps.
Pavel

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.