Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2002
    Posts
    3

    Unanswered: vbs works, asp doesn't

    I have a script which connects to an Exchange server, and calculates the size of a mailbox.

    When I run this script as asp on my own IIS, it works. When I copy it to a front-end exchange server if fails. When I copy it to a back-end exchange server it also fails. If I run the same script as vbs is runs fine, thus I arrived at the conclusion that the problem lies in the IIS running on the Exchange servers.

    The script fails on the line
    "cmd.ActiveConnection = con"

    The script is

    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <SCRIPT LANGUAGE=vbscript RUNAT=Server>

    dim con
    dim cmd

    set con = server.createObject("ADODB.Connection")
    set cmd = server.CreateObject("ADODB.Command")

    con.Provider="MSDAIPP.DSO"
    con.ConnectionString="User ID=test" & _
    ";Password=test" & _
    ";Data Source=http://exchangeserver" & _
    ".domain.co.xx/exchange/test"
    con.Open
    cmd.ActiveConnection = con
    con.Close

    set con = nothing
    set cmd = nothing

    </SCRIPT>

    </BODY>
    </HTML>

  2. #2
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    147
    Have you checked that IIS is running on the exchange server?
    There have been many posts made throughout the world.
    This was one of them.

  3. #3
    Join Date
    Dec 2002
    Posts
    3
    There is IIS on the Exchange Server, only it's the default one installed while installing Exchange, so it isn't exactly the same as a regular IIS.
    Do you know of anything specific to look for?

  4. #4
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    147
    Whats the actual error message? Perhaps its a permissions issue..

    Cheers,
    Andrew
    There have been many posts made throughout the world.
    This was one of them.

  5. #5
    Join Date
    Dec 2002
    Posts
    3
    The error message is

    Microsoft OLE DB Provider for Internet Publishing (0x80004005)
    Unspecified error

    and it occurs on the line
    cmd.ActiveConnection = con

    The con.open works.

    Don't forget - this works fine in vbs.

    Thanks,
    Caroline

  6. #6
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    147
    Yes but you need to remember that by default, anonymous WEB requests run under the context of IUSR_<MachineName> local account, whereas a VBS file would run under the current user.

    You may have different permissions on the machine that the script works on..

    I must admit I've only connected to exchange using LDAP and not the provider you are using, however my gut feeling is that it could be a permissions issue.

    Is there anywhere in exchange where you can alter permission for this type of access?

    Cheers,
    Andrew
    There have been many posts made throughout the world.
    This was one of them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •