Retrieve Data from another webpage besides XML

Discussion in 'ASP General' started by Vanessa, Sep 13, 2005.

  1. Vanessa

    Vanessa Guest

    I have a question, is that any other way to retrieve data from another
    webpage besides using XML object? Because I am using XML object now but give
    me so much problems.

    If I used MSXML2.ServerXMLHTTP object, it gives me time out error:
    msxml3.dll error '80072ee2'
    The operation timed out

    If I used Microsoft.XMLHTTP object, it will hang IE!

    In both cases, I have to wait for half an hour or more in order for the XML
    object to be working again.

    Actually both webpages that's communicating are hosted at the same machine.
    The main site (ex. aa.domain.com) points to particular folder under it, while
    another one (ex. bb.domain.com) points to another folder which is two levels
    up to the first one.

    Please help!!
    Vanessa, Sep 13, 2005
    #1
    1. Advertising

  2. Vanessa

    Curt_C [MVP] Guest

    If both sites/pages are in your control why not rethink the way you are
    approaching? Perhaps have both use a shared INCLUDE file, so they may share
    the content?

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com



    "Vanessa" wrote:

    > I have a question, is that any other way to retrieve data from another
    > webpage besides using XML object? Because I am using XML object now but give
    > me so much problems.
    >
    > If I used MSXML2.ServerXMLHTTP object, it gives me time out error:
    > msxml3.dll error '80072ee2'
    > The operation timed out
    >
    > If I used Microsoft.XMLHTTP object, it will hang IE!
    >
    > In both cases, I have to wait for half an hour or more in order for the XML
    > object to be working again.
    >
    > Actually both webpages that's communicating are hosted at the same machine.
    > The main site (ex. aa.domain.com) points to particular folder under it, while
    > another one (ex. bb.domain.com) points to another folder which is two levels
    > up to the first one.
    >
    > Please help!!
    >
    Curt_C [MVP], Sep 13, 2005
    #2
    1. Advertising

  3. Vanessa

    Curt_C [MVP] Guest

    yes you can pass a QS in the URL, but you can't dynamically build it, since
    it's processed BEFORE the asp code... if thats fine then this should work
    fine.

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com



    "Vanessa" wrote:

    > Curt,
    >
    > Thanks for the quick response! Can we pass querystring in INCLUDE?
    > Server.Execute can do it but can't send querystring.
    >
    > The reason we have two folders for our websites becuase each one is
    > connecting to a different database. And here is supposed to do:
    >
    > at test.asp at aa.domain.com
    >
    > .....
    > do something
    > .....
    > Response.Buffer = True
    > PostURL = "http://bb.domain.com/xml/whatever.asp?ID=123&state=2&update=N"
    > Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    > xml.Open "POST", PostURL, False,"",""
    > xml.Send
    > dataNeeded = xml.responseText
    > Set xml = Nothing
    > ....
    > process something based on values of dataNeeded from bb.domain.com
    > ....
    >
    >
    > So do you think INCLUDE will work instead of XML object in this flow?
    >
    > Thanks alot!!!!
    >
    >
    > "Curt_C [MVP]" wrote:
    >
    > > If both sites/pages are in your control why not rethink the way you are
    > > approaching? Perhaps have both use a shared INCLUDE file, so they may share
    > > the content?
    > >
    > > --
    > > Curt Christianson
    > > site: http://www.darkfalz.com
    > > blog: http://blog.darkfalz.com
    > >
    > >
    > >
    > > "Vanessa" wrote:
    > >
    > > > I have a question, is that any other way to retrieve data from another
    > > > webpage besides using XML object? Because I am using XML object now but give
    > > > me so much problems.
    > > >
    > > > If I used MSXML2.ServerXMLHTTP object, it gives me time out error:
    > > > msxml3.dll error '80072ee2'
    > > > The operation timed out
    > > >
    > > > If I used Microsoft.XMLHTTP object, it will hang IE!
    > > >
    > > > In both cases, I have to wait for half an hour or more in order for the XML
    > > > object to be working again.
    > > >
    > > > Actually both webpages that's communicating are hosted at the same machine.
    > > > The main site (ex. aa.domain.com) points to particular folder under it, while
    > > > another one (ex. bb.domain.com) points to another folder which is two levels
    > > > up to the first one.
    > > >
    > > > Please help!!
    > > >
    Curt_C [MVP], Sep 14, 2005
    #3
  4. Vanessa

    Vanessa Guest

    Thanks Curt!

    But I need to pass the querystring dynamically into the URL (in a loop
    actually), so I guess INCLUDE can't be used. :(

    Any more help from anyone? please help me out on this....

    will be liked this:

    at test.asp at aa.domain.com

    ......
    do while <not end of loop>
    do something to get value or to define value of ID and CurrentState for
    example
    .....
    Response.Buffer = True
    PostURL = "http://bb.domain.com/xml/whatever.asp?ID=" &ID&
    "&CurrentState=" &CurrentState
    Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    xml.Open "POST", PostURL, False,"",""
    xml.Send
    dataNeeded = xml.responseText
    Set xml = Nothing
    ....
    process something based on values of dataNeeded from bb.domain.com
    ....
    loop

    "Curt_C [MVP]" wrote:

    > yes you can pass a QS in the URL, but you can't dynamically build it, since
    > it's processed BEFORE the asp code... if thats fine then this should work
    > fine.
    >
    > --
    > Curt Christianson
    > site: http://www.darkfalz.com
    > blog: http://blog.darkfalz.com
    >
    >
    >
    > "Vanessa" wrote:
    >
    > > Curt,
    > >
    > > Thanks for the quick response! Can we pass querystring in INCLUDE?
    > > Server.Execute can do it but can't send querystring.
    > >
    > > The reason we have two folders for our websites becuase each one is
    > > connecting to a different database. And here is supposed to do:
    > >
    > > at test.asp at aa.domain.com
    > >
    > > .....
    > > do something
    > > .....
    > > Response.Buffer = True
    > > PostURL = "http://bb.domain.com/xml/whatever.asp?ID=123&state=2&update=N"
    > > Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    > > xml.Open "POST", PostURL, False,"",""
    > > xml.Send
    > > dataNeeded = xml.responseText
    > > Set xml = Nothing
    > > ....
    > > process something based on values of dataNeeded from bb.domain.com
    > > ....
    > >
    > >
    > > So do you think INCLUDE will work instead of XML object in this flow?
    > >
    > > Thanks alot!!!!
    > >
    > >
    > > "Curt_C [MVP]" wrote:
    > >
    > > > If both sites/pages are in your control why not rethink the way you are
    > > > approaching? Perhaps have both use a shared INCLUDE file, so they may share
    > > > the content?
    > > >
    > > > --
    > > > Curt Christianson
    > > > site: http://www.darkfalz.com
    > > > blog: http://blog.darkfalz.com
    > > >
    > > >
    > > >
    > > > "Vanessa" wrote:
    > > >
    > > > > I have a question, is that any other way to retrieve data from another
    > > > > webpage besides using XML object? Because I am using XML object now but give
    > > > > me so much problems.
    > > > >
    > > > > If I used MSXML2.ServerXMLHTTP object, it gives me time out error:
    > > > > msxml3.dll error '80072ee2'
    > > > > The operation timed out
    > > > >
    > > > > If I used Microsoft.XMLHTTP object, it will hang IE!
    > > > >
    > > > > In both cases, I have to wait for half an hour or more in order for the XML
    > > > > object to be working again.
    > > > >
    > > > > Actually both webpages that's communicating are hosted at the same machine.
    > > > > The main site (ex. aa.domain.com) points to particular folder under it, while
    > > > > another one (ex. bb.domain.com) points to another folder which is two levels
    > > > > up to the first one.
    > > > >
    > > > > Please help!!
    > > > >
    Vanessa, Sep 15, 2005
    #4
  5. I concur with Curt on this.

    It sounds like you have some code in that whatever.asp page that returns
    some values needed by the calling page, right? So encapsulate that code in a
    function, place the function in an INCLUDE file, and include the file in
    whatever page needs to use that function.

    Another possibility is to create a Web Service. You should Google that so
    you can see if you are able to utilize that functionality. It's not too hard
    to do, but there is a learning curve involved.

    Bob Barrows

    Vanessa wrote:
    > Thanks Curt!
    >
    > But I need to pass the querystring dynamically into the URL (in a loop
    > actually), so I guess INCLUDE can't be used. :(
    >
    > Any more help from anyone? please help me out on this....
    >
    > will be liked this:
    >
    > at test.asp at aa.domain.com
    >
    > .....
    > do while <not end of loop>
    > do something to get value or to define value of ID and
    > CurrentState for
    > example
    > .....
    > Response.Buffer = True
    > PostURL = "http://bb.domain.com/xml/whatever.asp?ID=" &ID&
    > "&CurrentState=" &CurrentState
    > Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    > xml.Open "POST", PostURL, False,"",""
    > xml.Send
    > dataNeeded = xml.responseText
    > Set xml = Nothing
    > ....
    > process something based on values of dataNeeded from bb.domain.com
    > ....
    > loop
    >
    > "Curt_C [MVP]" wrote:
    >
    >> yes you can pass a QS in the URL, but you can't dynamically build
    >> it, since
    >> it's processed BEFORE the asp code... if thats fine then this should
    >> work
    >> fine.
    >>
    >> --
    >> Curt Christianson
    >> site: http://www.darkfalz.com
    >> blog: http://blog.darkfalz.com
    >>
    >>
    >>
    >> "Vanessa" wrote:
    >>
    >>> Curt,
    >>>
    >>> Thanks for the quick response! Can we pass querystring in INCLUDE?
    >>> Server.Execute can do it but can't send querystring.
    >>>
    >>> The reason we have two folders for our websites becuase each one is
    >>> connecting to a different database. And here is supposed to do:
    >>>
    >>> at test.asp at aa.domain.com
    >>>
    >>> .....
    >>> do something
    >>> .....
    >>> Response.Buffer = True
    >>> PostURL =
    >>> "http://bb.domain.com/xml/whatever.asp?ID=123&state=2&update=N"
    >>> Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    >>> xml.Open "POST", PostURL, False,"",""
    >>> xml.Send
    >>> dataNeeded = xml.responseText
    >>> Set xml = Nothing
    >>> ....
    >>> process something based on values of dataNeeded from bb.domain.com
    >>> ....
    >>>
    >>>
    >>> So do you think INCLUDE will work instead of XML object in this
    >>> flow?
    >>>
    >>> Thanks alot!!!!
    >>>
    >>>
    >>> "Curt_C [MVP]" wrote:
    >>>
    >>>> If both sites/pages are in your control why not rethink the way
    >>>> you are approaching? Perhaps have both use a shared INCLUDE file,
    >>>> so they may share the content?
    >>>>
    >>>> --
    >>>> Curt Christianson
    >>>> site: http://www.darkfalz.com
    >>>> blog: http://blog.darkfalz.com
    >>>>
    >>>>
    >>>>
    >>>> "Vanessa" wrote:
    >>>>
    >>>>> I have a question, is that any other way to retrieve data from
    >>>>> another webpage besides using XML object? Because I am using XML
    >>>>> object now but give me so much problems.
    >>>>>
    >>>>> If I used MSXML2.ServerXMLHTTP object, it gives me time out error:
    >>>>> msxml3.dll error '80072ee2'
    >>>>> The operation timed out
    >>>>>
    >>>>> If I used Microsoft.XMLHTTP object, it will hang IE!
    >>>>>
    >>>>> In both cases, I have to wait for half an hour or more in order
    >>>>> for the XML object to be working again.
    >>>>>
    >>>>> Actually both webpages that's communicating are hosted at the
    >>>>> same machine. The main site (ex. aa.domain.com) points to
    >>>>> particular folder under it, while another one (ex. bb.domain.com)
    >>>>> points to another folder which is two levels up to the first one.
    >>>>>
    >>>>> Please help!!


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Sep 15, 2005
    #5
  6. Vanessa

    Vanessa Guest

    Thank You Bob and Curt, I have tried this today and it works!
    This really free me from the hassle and the pain of using XMLHTTP. Thanks!

    "Bob Barrows [MVP]" wrote:

    > I concur with Curt on this.
    >
    > It sounds like you have some code in that whatever.asp page that returns
    > some values needed by the calling page, right? So encapsulate that code in a
    > function, place the function in an INCLUDE file, and include the file in
    > whatever page needs to use that function.
    >
    > Another possibility is to create a Web Service. You should Google that so
    > you can see if you are able to utilize that functionality. It's not too hard
    > to do, but there is a learning curve involved.
    >
    > Bob Barrows
    >
    > Vanessa wrote:
    > > Thanks Curt!
    > >
    > > But I need to pass the querystring dynamically into the URL (in a loop
    > > actually), so I guess INCLUDE can't be used. :(
    > >
    > > Any more help from anyone? please help me out on this....
    > >
    > > will be liked this:
    > >
    > > at test.asp at aa.domain.com
    > >
    > > .....
    > > do while <not end of loop>
    > > do something to get value or to define value of ID and
    > > CurrentState for
    > > example
    > > .....
    > > Response.Buffer = True
    > > PostURL = "http://bb.domain.com/xml/whatever.asp?ID=" &ID&
    > > "&CurrentState=" &CurrentState
    > > Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    > > xml.Open "POST", PostURL, False,"",""
    > > xml.Send
    > > dataNeeded = xml.responseText
    > > Set xml = Nothing
    > > ....
    > > process something based on values of dataNeeded from bb.domain.com
    > > ....
    > > loop
    > >
    > > "Curt_C [MVP]" wrote:
    > >
    > >> yes you can pass a QS in the URL, but you can't dynamically build
    > >> it, since
    > >> it's processed BEFORE the asp code... if thats fine then this should
    > >> work
    > >> fine.
    > >>
    > >> --
    > >> Curt Christianson
    > >> site: http://www.darkfalz.com
    > >> blog: http://blog.darkfalz.com
    > >>
    > >>
    > >>
    > >> "Vanessa" wrote:
    > >>
    > >>> Curt,
    > >>>
    > >>> Thanks for the quick response! Can we pass querystring in INCLUDE?
    > >>> Server.Execute can do it but can't send querystring.
    > >>>
    > >>> The reason we have two folders for our websites becuase each one is
    > >>> connecting to a different database. And here is supposed to do:
    > >>>
    > >>> at test.asp at aa.domain.com
    > >>>
    > >>> .....
    > >>> do something
    > >>> .....
    > >>> Response.Buffer = True
    > >>> PostURL =
    > >>> "http://bb.domain.com/xml/whatever.asp?ID=123&state=2&update=N"
    > >>> Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    > >>> xml.Open "POST", PostURL, False,"",""
    > >>> xml.Send
    > >>> dataNeeded = xml.responseText
    > >>> Set xml = Nothing
    > >>> ....
    > >>> process something based on values of dataNeeded from bb.domain.com
    > >>> ....
    > >>>
    > >>>
    > >>> So do you think INCLUDE will work instead of XML object in this
    > >>> flow?
    > >>>
    > >>> Thanks alot!!!!
    > >>>
    > >>>
    > >>> "Curt_C [MVP]" wrote:
    > >>>
    > >>>> If both sites/pages are in your control why not rethink the way
    > >>>> you are approaching? Perhaps have both use a shared INCLUDE file,
    > >>>> so they may share the content?
    > >>>>
    > >>>> --
    > >>>> Curt Christianson
    > >>>> site: http://www.darkfalz.com
    > >>>> blog: http://blog.darkfalz.com
    > >>>>
    > >>>>
    > >>>>
    > >>>> "Vanessa" wrote:
    > >>>>
    > >>>>> I have a question, is that any other way to retrieve data from
    > >>>>> another webpage besides using XML object? Because I am using XML
    > >>>>> object now but give me so much problems.
    > >>>>>
    > >>>>> If I used MSXML2.ServerXMLHTTP object, it gives me time out error:
    > >>>>> msxml3.dll error '80072ee2'
    > >>>>> The operation timed out
    > >>>>>
    > >>>>> If I used Microsoft.XMLHTTP object, it will hang IE!
    > >>>>>
    > >>>>> In both cases, I have to wait for half an hour or more in order
    > >>>>> for the XML object to be working again.
    > >>>>>
    > >>>>> Actually both webpages that's communicating are hosted at the
    > >>>>> same machine. The main site (ex. aa.domain.com) points to
    > >>>>> particular folder under it, while another one (ex. bb.domain.com)
    > >>>>> points to another folder which is two levels up to the first one.
    > >>>>>
    > >>>>> Please help!!

    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >
    >
    Vanessa, Sep 22, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bennett Haselton
    Replies:
    3
    Views:
    478
    Didier Kuttel
    Aug 19, 2003
  2. Jim Bancroft
    Replies:
    5
    Views:
    556
    =?Utf-8?B?QnJhZCBRdWlubg==?=
    Aug 13, 2004
  3. Replies:
    7
    Views:
    21,590
    PennyHeeren
    Aug 22, 2008
  4. mxywp
    Replies:
    1
    Views:
    284
    Paul Rubin
    Oct 22, 2006
  5. WhiskyRomeo

    redirecting from another page besides the login page

    WhiskyRomeo, Jan 18, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    103
    WhiskyRomeo
    Jan 18, 2005
Loading...

Share This Page