« Previous Next »

Thread: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

Last post 04-17-2008 6:55 AM by MagnusF. 12 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (13 items)

Sort Posts:

  • 11-16-2007, 6:23 AM

    • MagnusF
    • Not Ranked
    • Joined on 11-16-2007, 5:49 AM
    • Posts 8

    IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    I am about to shift my development from XP to Vista X64 Ultimate and was trying to setup one of our older webapps on IIS7.
    This webapp is a mixed project with both C#/ASP.NET and old classic ASP pages that call COM+ objects created in VB6.
    These VB6 COM objects then use ADODB to connect to a SQLServer2005 database and returns ADODB.Recordset's to the ASP page for further presentation in the response page.

    I have registred all the VB6 DLL's under "Component services" just as we always have done on XP and Win2003 X64 (where our app works fine)

    But on Vista and IIS7, I get a permission error on the CreateObject line.

    Can anyone help me out here? I think I have tried everything by now, including giving "Everyone" full permission to the DLL files.

    I'm about to lose my mind here, this is so frustrating.

  • 11-16-2007, 8:12 AM In reply to

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    First, a lesson on Windows permissions and groups.  Granting Full Control to a group only affects the accounts in that group.  The group "Everyone" is just a group.  It isn't "Every account on the system" and in fact does not, by default, include anonymous user or ASP.NET process accounts.  So granting Full Control to Everyone and then accessing a DLL under an account that isn't in the group means that your efforts were not only wasted, but potentially dangerous in terms of security.  Always assign access to an account or a group that contains only the accounts you want to have access.

    You can use Filemon for Systernals, now owned by Microsoft, to check what account is trying to access what file.

    If you enable a request trace you may find more information, checking the event logs will likely reveal something and checking the ASP FAQ at www.aspfaq.com will help.  But you're probably right about the permissions, you just missed the correct account, most likey the anonymous user account.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 11-16-2007, 10:08 AM In reply to

    • MagnusF
    • Not Ranked
    • Joined on 11-16-2007, 5:49 AM
    • Posts 8

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    Thanks for the information Jeff.

    I changed the permission and now I get error 'ASP 0196 : 80040154' instead.
    I get the text "If you want to use LocalServer-components set AllowOutOfProcComponents in the metabase" (Translated into english from swedish, so the english error text might look something different).

    As far as I understand it, our VB6 DLL's should be in-process.. What to do? I never had to change anything like this on Win2003, I just had to registred the DLL's under "Component Services" and everything worked.

    Any ideas?

     

     

  • 11-16-2007, 10:49 AM In reply to

    • MagnusF
    • Not Ranked
    • Joined on 11-16-2007, 5:49 AM
    • Posts 8

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    BTW, the only users I have on my Vista machine is my own login account, "IUSR_<SystemName>" and "Guest"

    Also, I have tried Filemon but I dont see how I can get the account being used for the calls. Shouldnt it be the "IUSR_" account?

  • 11-16-2007, 12:56 PM In reply to

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 11-16-2007, 1:15 PM In reply to

    • MagnusF
    • Not Ranked
    • Joined on 11-16-2007, 5:49 AM
    • Posts 8

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    I already checked that page, and every other page found by google on this topic I think. I'm also back on my original error now, with permission error.
    The previous post I did where I thought I had come further simply wasn't the case after all.

    I would love to see a complete guide on how to configure this but havent found one so far. Something like, how to register COM objects for use with classic ASP on IIS7.

    I'm kind of novice on the "Component Services" part. The thing that bugs me the most is the fact that everything works fine on a Win2003 X64 machine with the exact same settings for these COM objects.

    There is obviously something with either IIS7 or Vistas security that I dont understand here.

    BTW: I created to most simple COM object in VB6 and gave every user and every group full access to the DLL, I registred it in "Component Services" and created a simple classic ASP file that tried to instance it using "server.createobject("test.testobj")... SAME ERROR,  'ASP 0178 : 80070005'.

    Classic ASP works for normal things, but as soon as I try to create an object using "server.createobject" I get the permission error.

  • 04-17-2008, 5:15 AM In reply to

    • gabruu
    • Top 500 Contributor
    • Joined on 04-17-2008, 9:14 AM
    • Posts 18

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    magnus have you found a solution yet? i got the same problems here....
    classic asp ajax library
    http://www.webdevbros.net/ajaxed/
  • 04-17-2008, 6:04 AM In reply to

    • MagnusF
    • Not Ranked
    • Joined on 11-16-2007, 5:49 AM
    • Posts 8

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    Yes, but it wasnt pretty.

    And since I have a swedish version of Vista, I dont know the exact name for the settings in the english version. But if you select properties for your COM+ application and select the "security" tab there should be a checkbox at the top "Force access check for this application" (Directly translated from the swedish text I see here). I think it started to work when I unchecked that one. I got this working in november last year so I dont remember exactly what I did.

     

  • 04-17-2008, 6:24 AM In reply to

    • gabruu
    • Top 500 Contributor
    • Joined on 04-17-2008, 9:14 AM
    • Posts 18

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    hey thanks for your very quick answer... the problem is that i dont see my DLL there .. i am registering it with regsvr32

    should i do something else?

    classic asp ajax library
    http://www.webdevbros.net/ajaxed/
  • 04-17-2008, 6:30 AM In reply to

    • MagnusF
    • Not Ranked
    • Joined on 11-16-2007, 5:49 AM
    • Posts 8

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    You should not register the DLL with regsvr32, instead you create a new "application" in Component services (enter "comexp.msc" in the "run" window of Windows) under COM+ applications.

     Component services -> Computers -> This computer -> COM+ applications

    Create a new empty application there and follow the guide, at the end of the wizard you are asked to select your DLL file.

  • 04-17-2008, 6:37 AM In reply to

    • gabruu
    • Top 500 Contributor
    • Joined on 04-17-2008, 9:14 AM
    • Posts 18

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    just in this moment i figured it out :) now i know at least where to look ... unfortunately it still does not work .. i guess i have to play around with the settings ..

     are there any other things i need to bear in mind .. e.g. settings in iis, etc.?

    classic asp ajax library
    http://www.webdevbros.net/ajaxed/
  • 04-17-2008, 6:49 AM In reply to

    • gabruu
    • Top 500 Contributor
    • Joined on 04-17-2008, 9:14 AM
    • Posts 18

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    i got it!! first i created a "library application" .. but it should be "server application". my own component runs fine.. i have to check the ones from 3rd parties now.

    MagnusF thanks a lot!! you've been a great help!! greetings from vienna to sweden where the beer & co. is sooo expensive ;)

     

    classic asp ajax library
    http://www.webdevbros.net/ajaxed/
  • 04-17-2008, 6:55 AM In reply to

    • MagnusF
    • Not Ranked
    • Joined on 11-16-2007, 5:49 AM
    • Posts 8

    Re: IIS7 and Classic ASP, error 'ASP 0178 : 80070005' when calling "CreateObject"

    Glad I could point you in the right direction. :)
    Good luck now!

Page 1 of 1 (13 items)
Microsoft Communities