Client found response content type of 'application/dime', but expected 'text/xml' error

Discussion in 'ASP .Net Web Services' started by daryl@rubiconcomputing.com, Oct 4, 2005.

  1. Guest

    I have a situation where a webservice has worked fine in a development
    environment, but when placed into production has stopped working
    (although at one time it was).

    Using WSE 2.0/DIME, we wrote a simple File Transfer and retrieval
    service, which has to pass through a firewall (the only real difference
    between dev and production -- at the time).

    Originally, the error was this:

    The underlying connection was closed: Could not establish secure
    channel for SSL/TLS. Inner Exception: The function completed
    successfully, but must be called again to complete the context

    However, I located a resource on the web
    (http://weblogs.asp.net/jan/archive/2004/05/08/128394.aspx) which
    recommended this code. This change was not required on the development
    environment or test environment, but the functionality worked in
    development so I thought we were OK.

    public class MySubClassedWebService : MyWebServiceWse {
    private static PropertyInfo requestPropertyInfo = null;

    public MySubClassedWebService(){}

    protected override System.Net.WebRequest GetWebRequest(Uri uri)
    {
    WebRequest request = base.GetWebRequest(uri);

    if (requestPropertyInfo==null)
    // Retrieve property info and store it in a static member
    for optimizing future use
    requestPropertyInfo =
    request.GetType().GetProperty("Request");

    // Retrieve underlying web request
    HttpWebRequest webRequest =
    (HttpWebRequest)requestPropertyInfo.GetValue(request,null);


    // Setting KeepAlive
    webRequest.KeepAlive = false;
    return request;
    }
    }

    Unfortunately, on the production server (Windows Server 2003), it
    doesn't work unless you replace "return request; " with "return
    webRequest;" Making the change then works for calls made to the server.
    Progress! Sort of...

    This solved 1/2 the problem in that it now succeeds with any non-DIME
    calls.
    However, when a call to the web service is made to retrieve a file via
    DIME, the following error occurs. This problem occurs both on
    production and development.

    Client found response content type of 'application/dime', but expected
    'text/xml'

    I have verified the following:
    -- same version of WSE (2.0 SP2)
    -- WebService on production connection settings are correct
    -- Same problem occurred on the machine when we were running Windows
    2000

    Anyone have any suggestions?
    , Oct 4, 2005
    #1
    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. Damon Payne
    Replies:
    0
    Views:
    9,176
    Damon Payne
    Mar 8, 2005
  2. Jesús Bosch
    Replies:
    1
    Views:
    13,081
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 3, 2006
  3. Søren M. Olesen
    Replies:
    4
    Views:
    541
    Dan Rogers
    Feb 15, 2005
  4. j.edwards
    Replies:
    1
    Views:
    429
    Kenny M.
    Feb 13, 2006
  5. acssi
    Replies:
    0
    Views:
    331
    acssi
    Jan 16, 2007
Loading...

Share This Page