ISA Extensions and DAO
Andrea Matta -- andma@mbox.vol.it Wednesday, December 18, 1996 Environment: VC++ 4.2-flat, NT 4.0 Server (U.S. edition) Ciao, I'm writing a CGI application that performs queries on a Access database, = using DAO. I found Mike Blaszczak's "dumpsome" example (available from http://www.nwl= ink.com/~mikeblas/ ) really useful, and it works fine. But it stops working if I move the same code inside a ISA Extension DLL, a= nd I can't understand WHY. Debugging the code I found that the line CdbDBEngine engine; throws an exception 0x80070005 (E_ACCESSDENIED) if I log on to the http se= rver as "anonymous", instead it throws an exception 0x80040154 (REGDB_E_CL= ASSNOTREG) if I log on as "administrator". Any clues? -- Andrea Matta am@POBoxes.com http://www.poboxes.com/POBoxes/?am
Dean Wiles -- deanw@isc-br.isc-br.com Thursday, December 19, 1996 [Mini-digest: 2 responses] This may not be related, but at Microsoft's Internet PDC last spring, they indicated that the Access ODBC drivers were not thread-safe and should not be used in an ISAPI extension DLL. This may have changed since then, but if not, it could create mysterious problems for your ISAPI DLL, whereas a CGI app is usually single-threaded and wouldn't care. -------------------------------------------------------------------------- Dean Wiles (deanw@mail.isc-br.com) Olivetti North America Phone: (509)927-7037 22425 East Appleway Ave Fax: (509)927-2499 Liberty Lake, WA 99019-9534 If the Son sets you free, you will be free indeed. (John 8:36) ---------- From: Andrea MattaTo: mfc-l@netcom.com Subject: ISA Extensions and DAO Date: Wednesday, December 18, 1996 4:00 AM Environment: VC++ 4.2-flat, NT 4.0 Server (U.S. edition) Ciao, I'm writing a CGI application that performs queries on a Access database, using DAO. I found Mike Blaszczak's "dumpsome" example (available from http://www.nwlink.com/~mikeblas/ ) really useful, and it works fine. But it stops working if I move the same code inside a ISA Extension DLL, and I can't understand WHY. Debugging the code I found that the line CdbDBEngine engine; throws an exception 0x80070005 (E_ACCESSDENIED) if I log on to the http server as "anonymous", instead it throws an exception 0x80040154 (REGDB_E_CLASSNOTREG) if I log on as "administrator". Any clues? -- Andrea Matta am@POBoxes.com http://www.poboxes.com/POBoxes/?am ---------- -----From: Mike Blaszczak At 14:17 12/18/96 +0200, Andrea Matta wrote: >Environment: VC++ 4.2-flat, NT 4.0 Server (U.S. edition) >I'm writing a CGI application that performs queries on a >Access database, using DAO. I found Mike Blaszczak's "dumpsome" example >(available from http://www.nwlink.com/~mikeblas/ ) really useful, >and it works fine. >But it stops working if I move the same code inside a ISA >Extension DLL, and I can't understand WHY. >Debugging the code I found that the line >CdbDBEngine engine; >throws an exception 0x80070005 (E_ACCESSDENIED) if I log on to the >http server as "anonymous", instead it throws an >exception 0x80040154 (REGDB_E_CLASSNOTREG) if I log on as "administrator". DAO can't be used in any thread other than the thread that initialized OLE for your application. In an ISAPI extension, you don't have control over which thread initializes OLE for you. You'll find it impossible to use DAO in ISAPI until an apartment-model thread compatible version of DAO is released. >Any clues? Sure: read the documentation. If you can't find what you need in the documentation, try looking in the Microsoft Knowledgebase. This fact is covered in the documentation. This symptom is explained in the knowledgebase. .B ekiM http://www.nwlink.com/~mikeblas/ I'm afraid I've become some sort of speed freak. These words are my own. I do not speak on behalf of Microsoft.
Dan Kirby -- dkirby@accessone.com Friday, December 20, 1996 Look at knowledgebase article Q151407. To get to the Microsoft Knowledgebase go to www.microsoft.com/kb DAO can only be used in the primary thread of an application. Future versions of DAO will most likely be apartment model and as a result it should work fine in an ISAPI DLL. --dan ---------- From: Andrea MattaTo: mfc-l@netcom.com Subject: ISA Extensions and DAO Date: Wednesday, December 18, 1996 4:00 AM Environment: VC++ 4.2-flat, NT 4.0 Server (U.S. edition) Ciao, I'm writing a CGI application that performs queries on a Access database, using DAO. I found Mike Blaszczak's "dumpsome" example (available from http://www.nwlink.com/~mikeblas/ ) really useful, and it works fine. But it stops working if I move the same code inside a ISA Extension DLL, and I can't understand WHY. Debugging the code I found that the line CdbDBEngine engine; throws an exception 0x80070005 (E_ACCESSDENIED) if I log on to the http server as "anonymous", instead it throws an exception 0x80040154 (REGDB_E_CLASSNOTREG) if I log on as "administrator". Any clues? -- Andrea Matta am@POBoxes.com http://www.poboxes.com/POBoxes/?am ----------
| Вернуться в корень Архива |