Announcement

Collapse
No announcement yet.

GetUrl Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GetUrl Error

    Hello,

    I have a script to retreive the day type (Blue, White, Red) from EDF site.

    This is work on Mozilla, Edge, Chrome:

    https://particulier.edf.fr/bin/edf_r...peAlerte=TEMPO

    The result is : {"JourJ":{"Tempo":"BLEU"},"JourJ1":{"Tempo":"ND"}}

    When i put this on my script:

    sub Main(parm as object)
    dim result as object
    Dim DataStr, DataStr1 as string
    DataStr1 = "/bin/edf_rc/servlets/ejptemponew?Date_a_remonter=2017-12-23&TypeAlerte=TEMPO"
    DataStr = hs.GetURL("https://particulier.edf.fr", DataStr1, True,80)

    hs.writelog ("test tempo ",DataStr)
    End Sub
    Last edited by jfla; December 22, 2017, 12:07 PM.

    #2
    Hello,

    I find my problem


    I tested the command CURL in powershell

    the problem is the same.
    https://particulier.edf.fr/bin/edf_r...peAlerte=TEMPOhttps://particulier.edf.fr/bin/edf_r...tempodaysnew?T ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
    + CategoryInfo : InvalidOperation : (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebEx
    ception
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands. InvokeWebRequestCommand
    Now i set the protocol TLS 1.2 as default ( only for this session)

    The url command is OK

    PS C:\Users\Jean> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    PS C:\Users\Jean> curl https://particulier.edf.fr/bin/edf_r...peAlerte=TEMPO


    StatusCode : 200
    StatusDescription : OK
    Content : {"PARAM_NB_J_BLEU":205,"PARAM_NB_J_BLANC":28,"PARAM_NB_J_ROU GE":18}
    RawContent : HTTP/1.1 200 OK
    X-Content-Type-Options: nosniff
    X-Frame-Options: SAMEORIGIN
    Vary: User-Agent
    X-XSS-Protection: 1; mode=block
    Strict-Transport-Security: max-age=15768000
    Content-Length: 67
    Conte...
    Forms : {}
    Headers : {[X-Content-Type-Options, nosniff], [X-Frame-Options, SAMEORIGIN], [Vary, User-Agent],
    [X-XSS-Protection, 1; mode=block]...}
    Images : {}
    InputFields : {}
    Links : {}
    ParsedHtml : mshtml.HTMLDocumentClass
    RawContentLength : 67
    Solution For Powershell BUT don't WORK with hs.GetUrl

    https://docs.microsoft.com/en-us/off...-online-server

    How to setup protocol Tls 1.2 working with hs.GetUrl?

    Help me, Thanks

    Jean-Francois.
    Last edited by jfla; December 23, 2017, 05:31 PM.

    Comment


      #3
      http://board.homeseer.com/showpost.p...50&postcount=1
      Attached Files
      Visit zee e-maison : http://www.e-maison.com

      Comment


        #4

        Comment


          #5
          Hello, Pierre

          It's OK Now

          Thanks



          But we MUST Enable strong cryptography in .NET Framework 4.5 or higher
          AND
          Disable earlier versions of SSL and TLS in Windows Schannel

          By default, Entry doesn't exist in win10 registrery

          Use this link to add to registrery:

          https://www.fastvue.co/wp-content/up...LS_regfile.zip

          And follow the instructions in this link:

          https://docs.microsoft.com/en-us/off...-online-server

          Jean-Francois.

          Comment


            #6
            Hi,

            Better solution:

            https://stackoverflow.com/questions/...ll-connections

            I put HS3 on another PC under WIN10 Fall Creator

            My script don't work again

            I apply the solution from stackoverflow, i reboot, and now, it's OK

            Jean-francois.

            Comment

            Working...
            X