Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ISAPI Redirect Exception

Posted on 2000-02-17
8
Medium Priority
?
307 Views
Last Modified: 2013-11-20
Hi, I have written an ISAPI extension dll that host active scripting.  It seems to be working well, except for one thing.  When I redirect to a URL using...

pCtxt->ServerSupportFunction(HSE_REQ_SEND_URL,(LPVOID)(LPCSTR)st,NULL,NULL);

the very next time the extension handles a request and tries to fire an ActiveX event I get an unhandled exception (type unkown?).  If I do not do the redirect then the exception is never thrown. Can anyone help?  I can supply some more code if necessary.
0
Comment
Question by:perrizo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 2533005
'(LPVOID)(LPCSTR)st' looks a bit suspicious - of what type is 'st' and what's the prototype of the method?
0
 
LVL 1

Author Comment

by:perrizo
ID: 2533014
st is a CString.  I have used this format in another extension that was not an Active Scripting host and it seemed to work fine.  Do you think this is a problem?
0
 
LVL 86

Expert Comment

by:jkr
ID: 2533160
I think it looks like a candidate, but maybe not - at least there seems to be no information how long the string is...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 11

Expert Comment

by:mikeblas
ID: 2533412
jkr> at least there seems to be no information how long the string is...

Sure there is! The string is null-terminated!

..B ekiM
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 1600 total points
ID: 2533418
Please provide the code you're using to fire the event in the script, perrizo. Without seeing anything, it seems most likely that the IDispatch you're using to fire the event has become invalid. Maybe you're still holding on to the dispatch from the previous instance of the scripting engine.

..B ekiM
0
 
LVL 86

Expert Comment

by:jkr
ID: 2534778
>>Sure there is! The string is null-terminated!

Ooops, you're right... <blushing>

Well, the only excuse could be that I thought of it as

[in, out, string, size_is(...)]
0
 
LVL 1

Author Comment

by:perrizo
ID: 2552464
Mikeblas, You were correct... close at least.  It sent me in the correct direction.  Seems that when you call SetScriptSite VBScript.dll remembers which thread you called it from and only accepts messages from that thread.  Funny thing was that when you do a redirect IIS always issues the next call on a different thread but, most of the time on a simple WriteClient IIS tends to issue the next call on the same thread.  The problem/feature is outlined in KB article...

http://support.microsoft.com/support/kb/articles/q222/8/37.asp

Just thought you might find it interesting... thanks!
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2552890
Great!  Good luck with your project.

..B ekiM
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question