Re: VB CGI program: oExcel.Workbooks.Open Locks IIS
From: David Wang [MS] (someone@online.microsoft.com)
Date: 10/07/02
- Next message: Jeff Cochran: "Re: online gaming"
- Previous message: HMY: "Modifying website"
- In reply to: Lisa Pearlson: "Re: VB CGI program: oExcel.Workbooks.Open Locks IIS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "David Wang [MS]" <someone@online.microsoft.com> Date: Mon, 7 Oct 2002 04:18:59 -0700
Lisa,
I don't know what newsgroup you are browsing. Please limit your question to
a particular newsgroup in the future to prevent massive spam like this.
To test out the theory that the identity running the VB CGI program has
problems running macros:
1. Copy what you've got below (the four lines of VB code) and paste it into
a .ASP file (it defaults to VBScript, which should work with those commands
except for the "As Excel.Application" part -- just use "Dim oExcel"). You
don't need an EXE to run VB on IIS. :-)
2. Configure the vdir containing the ASP file to use authentication (uncheck
anonymous)
3. Make a request to the ASP page with yourself running IE
This should allow the ASP page to execute as your authenticated identity...
which should then work as it does for you under debug. If you re-enabled
anonymous and disabled authentication (step #2 above), and it stops working,
then you know it's IUSR having issues running macros.
Setting Everyone as permissions is *irrelevant* in this situation, so please
undo that operation.
-- //David This posting is provided "AS IS" with no warranties, and confers no rights. // "Lisa Pearlson" <no@spam.please.za> wrote in message news:OIkiSScbCHA.1700@tkmsftngp10... I know what it is waiting on: Dim oExcel As Excel.application Dim oWb As Excel.Workbook Set oExcel = CreateObject("Excel.Application") Set oWb = oExcel.Workbooks.Open("C:\myxlfile.xls") <--- this causes it to hang!!! when I open an xls file WITHOUT a macro, it works fine.. but my file has a macro, and then it hangs. Not if I debug my application, and excel is started under my own user account permissions, but under IUSR_.. that IIS runs CGIs in, it fails.. I've set "Everyone" permission on the folder and all files, with execute permissions, .. again, my CGI script does get executed, Excel gets started, but opening the xls file causes it to hang. Any ideas? Lisa "Pat" <patfilot@online.microsoft.com> wrote in message news:fnQn9.56367$DN4.8546@sccrnsc01... > What is most likely happening is that IIS is launching the page, but the > .exe stops execution waiting on user intervention (e.g. hitting <OK>). The > call from IIS-->CGI is synchronous, so the thread that initiates the call > will wait for a response or for the .exe to die. So, when it is hung, you > should attach a debugger to one of the VB .exe's and see what it is waiting > on. > > pat > > "Lisa Pearlson" <no@spam.please.za> wrote in message > news:#Fm4l2JbCHA.1496@tkmsftngp09... > > Hi, > > > > I have made a VB application (.exe) which uses automation to interface > with > > Excel. > > It is used in a webpage as a CGI program, .. it takes parameters from the > > user, then starts up excel, enters the values, reads out the values, and > > puts the results on a webpage. > > > > This works fine with Personal webserver, but not in IIS. > > The code is something like this.. simplified: > > > > Dim oExcel as excel.application > > Dim oWB as excel.workbook > > > > Set oExcel = CreateObject("excel.application") > > Set oWB = oExcel.Workbooks.Open("C:\myfile.xls", 0, False) > > > > If I use personal webserver, it works fine, under IIS it doesn't. I have > > given the folder and all its contents "Everyone" permission, and all files > > are accessible. > > > > If myfile.xls does NOT contain macro's, it works, if it does contain > macro's > > (none that are executed automatically, but after pressing a button in the > > ***) it's fine, but with the macro, opening fails. On Error ... does not > > work.. the program just hangs in that call to open. > > I have set macro permissions to allow all, .. nothing.. > > > > Any ideas what this is caused by? > > Also, this causes Excel.exe to run under IUSR_... account. I can see it in > > the taskmanager, but kan not kill it under NT, can under XP. I tried > > oExcel.GetObject(,"excel.application") but it fails. I tried getting > windows > > handle and sending it WM_QUIT message, it fails, I tried getting its > > processId and terminate thread, it fails.. > > > > I'm using IIS 5.1, Office XP, VB6, WindowsXP. > > Please help, as I have looked and looked for days, and can't find anything > > on the net regarding this problem. I've tried the lockdown tool, to set > > permissions, makes no difference. > > > > Thanks, > > Lisa > > > > > >
- Next message: Jeff Cochran: "Re: online gaming"
- Previous message: HMY: "Modifying website"
- In reply to: Lisa Pearlson: "Re: VB CGI program: oExcel.Workbooks.Open Locks IIS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]