Problems with Windows Script Encoder & #include directive

Thread Solved

Join Date: Jul 2004
Posts: 22
Reputation: brob5000 is an unknown quantity at this point 
Solved Threads: 0
brob5000's Avatar
brob5000 brob5000 is offline Offline
Newbie Poster

Problems with Windows Script Encoder & #include directive

 
0
  #1
Jul 1st, 2004
When using the windows script encoder to encode ASP files that include other ASP files that are also encoded using the windows script encoder, I receive an IIS ASP compiler error message indicating that the @ language directive can only be used once when the interpreter encounters the second @ langauage symbol in the first file that is included.

Can you guys help?
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 32
Reputation: RobUK is an unknown quantity at this point 
Solved Threads: 1
RobUK RobUK is offline Offline
Light Poster

Re: Problems with Windows Script Encoder & #include directive

 
0
  #2
Jul 13th, 2004
remove the @language directive if you are using vbscript.
Rob - DMOZ Editor
Web Design Forums - Free website critiques. Web design + SEO Advice
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 22
Reputation: brob5000 is an unknown quantity at this point 
Solved Threads: 0
brob5000's Avatar
brob5000 brob5000 is offline Offline
Newbie Poster

Re: Problems with Windows Script Encoder & #include directive

 
0
  #3
Jul 14th, 2004
Thanks for the suggestion. I do not have any @language directives in my scripts prior to passing them through the windows script encoder. The windows script encoder adds the @language directive to the encoded file because the output of the windows script encoder is an "encoded" VBScript file.

At the top of any encoded file, you will find "<% @ LANGUAGE = VBScript.Encode %>"

I also thought about removing the directive afterwards, but according to the documentation on the windows script encoder (Documentation), if any modifications are made to the encoded file, it will not decode properly -- "After a script is encoded, changing any part of the resulting file will render it inoperable, thus ensuring the absolute integrity of your encoded script." -Microsoft

Ben Roberts
Azalea Technology, LLC.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 32
Reputation: RobUK is an unknown quantity at this point 
Solved Threads: 1
RobUK RobUK is offline Offline
Light Poster

Re: Problems with Windows Script Encoder & #include directive

 
0
  #4
Jul 14th, 2004
I think you can strip the language directive on the includes (after encoding).
Rob - DMOZ Editor
Web Design Forums - Free website critiques. Web design + SEO Advice
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 32
Reputation: RobUK is an unknown quantity at this point 
Solved Threads: 1
RobUK RobUK is offline Offline
Light Poster

Re: Problems with Windows Script Encoder & #include directive

 
0
  #5
Jul 14th, 2004
Actually, when encoding entire directories, use the /xl switch... this stops the encoder from adding the language directive.

You can then add it in manually for non-includes.
Rob - DMOZ Editor
Web Design Forums - Free website critiques. Web design + SEO Advice
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 22
Reputation: brob5000 is an unknown quantity at this point 
Solved Threads: 0
brob5000's Avatar
brob5000 brob5000 is offline Offline
Newbie Poster

Re: Problems with Windows Script Encoder & #include directive

 
0
  #6
Jul 14th, 2004
I will give that a try. Thanks!
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 22
Reputation: brob5000 is an unknown quantity at this point 
Solved Threads: 0
brob5000's Avatar
brob5000 brob5000 is offline Offline
Newbie Poster

Re: Problems with Windows Script Encoder & #include directive

 
0
  #7
Jul 15th, 2004
The -xl switch on the encoder to exclude the @ language directive worked! Thanks!
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 32
Reputation: RobUK is an unknown quantity at this point 
Solved Threads: 1
RobUK RobUK is offline Offline
Light Poster

Re: Problems with Windows Script Encoder & #include directive

 
0
  #8
Jul 16th, 2004
No problems!
Rob - DMOZ Editor
Web Design Forums - Free website critiques. Web design + SEO Advice
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum


Views: 7273 | Replies: 7
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC