Accessing WebServices from a web app hosted inside Outlook XP

Discussion in 'ASP .Net Web Services' started by Jay B, Sep 26, 2003.

  1. Jay B

    Jay B Guest

    Ok, it turns out that "outlook:" moniker is actually
    causing our problem.

    When you first load a page into Outlook XP, the
    document.URL value is the same as in the Outlook address
    bar, for example: "outlook:My Test App".

    This is the code from webservice.htc that sees the problem:

    function ensureWsdlUrl(szService)
    {
    if (szService.indexOf("://") > 0)
    return szService;
    var baseUrl = element.document.URL;
    var qi = baseUrl.lastIndexOf("?");
    var url2 = qi > 0 ? baseUrl.substr(0, qi) : baseUrl;
    return url2.substr(0, baseUrl.lastIndexOf("/"))
    + "/" + szService + (szService.indexOf(".")
    >=0 ? "" : ".asmx?wsdl");

    }


    This looks to be a bug with Outlook XP, rather than the
    webservice.htc.

    I'm curious as to what the recommended workaround to this
    problem is.

    I could always output the actual URL of each page in a
    javascript variable, and then modify webservice.htc to
    check that variable, but I really don't want to have to do
    that.

    Any ideas?

    Jay B


    >-----Original Message-----
    >We have an application suite that some of our clients

    access through Outlook
    >XP (i.e. Under Outlook Today they create a folder, and

    set its homepage to
    >the URL of the app suite).
    >
    >When they do this, all of our webservices seem to fail on

    them. They seem
    >to be failing the PrincipalPermission Role Demand, for

    some reason. Other
    >people have reported SOAP errors, as well.
    >
    >They are being authenticated fine using the Windows

    Integrated
    >Authentication on the aspx pages. I swear I've actually

    seen the webservice
    >return data, despite the errors popping up as well..

    which has me wondering
    >whether they're passing the Role Demand once, but it's

    checking a second
    >time at some point when they aren't in the proper

    Principal?
    >
    >I'm also wondering if the "outlook:" moniker may be

    causing a problem in the
    >WebService.htc?
    >
    >If anyone can shed any kind of light on this, it would be

    much appreciated.
    >
    >Jay B
    >
    >
    >.
    >
     
    Jay B, Sep 26, 2003
    #1
    1. Advertising

  2. Jay B

    Jay B Guest

    Well, I expected at least some kind of acknowledgement
    from SOMEONE of the problem, and perhaps an official
    answer... seems like there's very little help going on in
    these newsgroups unless you're an MSDN Subscriber. Which
    makes it real nice for some of us developers who's IT
    staff maintains a death grip on MSDN Subscriber
    information...


    Anyway..

    I've chosen to solve this problem by rendering a small
    registered client script block during page load that
    checks the document.URL for the 'outlook:' moniker, and if
    present, resets the document.URL to the value of the
    absolute uri. It's an additional web hit, and it
    increases the size of every one of our pages, but hey,
    it's another MS bug we have to work around.

    internal string OutlookXPFixScript( )
    {
    return "if( document.URL.substr
    (0,8) == 'outlook:' )\n{\n\tdocument.URL = \'" +
    Request.Url.AbsoluteUri + "\';\n}\n";
    }

    Jay B


    >-----Original Message-----
    >Ok, it turns out that "outlook:" moniker is actually
    >causing our problem.
    >
    >When you first load a page into Outlook XP, the
    >document.URL value is the same as in the Outlook address
    >bar, for example: "outlook:My Test App".
    >
    >This is the code from webservice.htc that sees the

    problem:
    >
    >function ensureWsdlUrl(szService)
    >{
    >if (szService.indexOf("://") > 0)
    >return szService;
    >var baseUrl = element.document.URL;
    >var qi = baseUrl.lastIndexOf("?");
    >var url2 = qi > 0 ? baseUrl.substr(0, qi) : baseUrl;
    >return url2.substr(0, baseUrl.lastIndexOf("/"))
    >+ "/" + szService + (szService.indexOf(".")
    >>=0 ? "" : ".asmx?wsdl");

    >}
    >
    >
    >This looks to be a bug with Outlook XP, rather than the
    >webservice.htc.
    >
    >I'm curious as to what the recommended workaround to this
    >problem is.
    >
    >I could always output the actual URL of each page in a
    >javascript variable, and then modify webservice.htc to
    >check that variable, but I really don't want to have to

    do
    >that.
    >
    >Any ideas?
    >
    >Jay B
    >
    >
    >>-----Original Message-----
    >>We have an application suite that some of our clients

    >access through Outlook
    >>XP (i.e. Under Outlook Today they create a folder, and

    >set its homepage to
    >>the URL of the app suite).
    >>
    >>When they do this, all of our webservices seem to fail

    on
    >them. They seem
    >>to be failing the PrincipalPermission Role Demand, for

    >some reason. Other
    >>people have reported SOAP errors, as well.
    >>
    >>They are being authenticated fine using the Windows

    >Integrated
    >>Authentication on the aspx pages. I swear I've actually

    >seen the webservice
    >>return data, despite the errors popping up as well..

    >which has me wondering
    >>whether they're passing the Role Demand once, but it's

    >checking a second
    >>time at some point when they aren't in the proper

    >Principal?
    >>
    >>I'm also wondering if the "outlook:" moniker may be

    >causing a problem in the
    >>WebService.htc?
    >>
    >>If anyone can shed any kind of light on this, it would

    be
    >much appreciated.
    >>
    >>Jay B
    >>
    >>
    >>.
    >>

    >.
    >
     
    Jay B, Oct 1, 2003
    #2
    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. mehul
    Replies:
    0
    Views:
    772
    mehul
    May 3, 2004
  2. Mukesh
    Replies:
    3
    Views:
    556
    Steven Cheng[MSFT]
    Jul 10, 2007
  3. Replies:
    5
    Views:
    457
    Brandon Gano
    Jul 23, 2007
  4. vbocan
    Replies:
    1
    Views:
    740
    Gregory A. Beamer
    Nov 11, 2009
Loading...

Share This Page