943,625 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Marked Solved
  • Views: 7921
  • ASP RSS
Jul 1st, 2004
0

Problems with Windows Script Encoder & #include directive

Expand Post »
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?
Similar Threads
Reputation Points: 12
Solved Threads: 0
Newbie Poster
brob5000 is offline Offline
22 posts
since Jul 2004
Jul 13th, 2004
0

Re: Problems with Windows Script Encoder & #include directive

remove the @language directive if you are using vbscript.
Reputation Points: 10
Solved Threads: 1
Light Poster
RobUK is offline Offline
32 posts
since Jul 2004
Jul 14th, 2004
0

Re: Problems with Windows Script Encoder & #include directive

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.
Reputation Points: 12
Solved Threads: 0
Newbie Poster
brob5000 is offline Offline
22 posts
since Jul 2004
Jul 14th, 2004
0

Re: Problems with Windows Script Encoder & #include directive

I think you can strip the language directive on the includes (after encoding).
Reputation Points: 10
Solved Threads: 1
Light Poster
RobUK is offline Offline
32 posts
since Jul 2004
Jul 14th, 2004
0

Re: Problems with Windows Script Encoder & #include directive

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.
Reputation Points: 10
Solved Threads: 1
Light Poster
RobUK is offline Offline
32 posts
since Jul 2004
Jul 14th, 2004
0

Re: Problems with Windows Script Encoder & #include directive

I will give that a try. Thanks!
Reputation Points: 12
Solved Threads: 0
Newbie Poster
brob5000 is offline Offline
22 posts
since Jul 2004
Jul 15th, 2004
0

Re: Problems with Windows Script Encoder & #include directive

The -xl switch on the encoder to exclude the @ language directive worked! Thanks!
Reputation Points: 12
Solved Threads: 0
Newbie Poster
brob5000 is offline Offline
22 posts
since Jul 2004
Jul 16th, 2004
0

Re: Problems with Windows Script Encoder & #include directive

No problems!
Reputation Points: 10
Solved Threads: 1
Light Poster
RobUK is offline Offline
32 posts
since Jul 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: run sql statement in asp
Next Thread in ASP Forum Timeline: Excel to Web in Real Time?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC