Cannot Connect to Remote Server

Discussion in 'ASP .Net' started by leeo, Jun 28, 2006.

  1. leeo

    leeo Guest

    This is driving me absolutely mad. We've been using this code to
    connect to a remote site:

    System.Net.ServicePointManager.CertificatePolicy = New
    cCertificatePolicy

    wr = CType(WebRequest.Create(goSettings.NHSDPBClaimsURL),
    HttpWebRequest)
    nc = New NetworkCredential(goSettings.NHSUserName,
    goSettings.NHSPassword)
    wr.Credentials = nc
    wr.ContentType = "text/xml"
    wr.Method = "POST"

    xw = New XmlTextWriter(wr.GetRequestStream(), Nothing)

    When the goSettings.NHSDPBClaimsURL in the webrequest statement is set
    to https://ebusiness.dpb.nhs.uk/claims.asp it all works absolutely
    fine. However I'm being asked to send the same data to a different
    server at the location which is referred to as
    https://195.212.12.173/claims.asp. However whenever we try this it
    simply errors when it tries to perform the GetRequestStream and says it
    can't connect to the remote server (even though we can use IE to access
    it easily. We've tried all the usual things like creating our
    certificate policy to get around any security certificates but nothing
    has worked.

    Please, if anyone has ANY suggestions can you let me know.
    leeo, Jun 28, 2006
    #1
    1. Advertising

  2. leeo

    leeo Guest

    Forget this. We've fixed the problem, and it was to do with the
    Security Policy certificate.

    Madness aborted.
    leeo, Jun 28, 2006
    #2
    1. Advertising

  3. leeo

    leeo Guest

    Forget this. We've fixed the problem, and it was to do with the
    Security Policy certificate.

    Madness aborted.
    leeo, Jun 28, 2006
    #3
    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.

Share This Page