Author Topic: Problem with SimpleWebSerwer  (Read 1857 times)

gribanin

  • Newbie
  • *
  • Posts: 3
    • View Profile
Problem with SimpleWebSerwer
« on: April 14, 2019, 03:33:40 PM »
Hello from Ukraine, i try to use simplewebserwer in my project, web browser crome. Crome request "ERR_INVALID_HTTP_RESPONSE" what a problem? Sorry for my English :D

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Problem with SimpleWebSerwer
« Reply #1 on: April 14, 2019, 05:05:55 PM »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Problem with SimpleWebSerwer
« Reply #2 on: April 14, 2019, 11:06:43 PM »

gribanin

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Problem with SimpleWebSerwer
« Reply #3 on: April 15, 2019, 04:17:33 AM »
Hello Godra, yes i check this post and set all of instruction.

gribanin

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Problem with SimpleWebSerwer
« Reply #4 on: April 15, 2019, 04:23:27 AM »
Hello Archie, i put StopPoint in my program and try to connect http://127.0.0.1:8082 , program not stopped in this point,  when i try connect to my local ip http://192.168.2.90:8082 my program stopped in this point. I remove StopPoint in program and try to connect http://192.168.2.90:8082 and have response "ERR_INVALID_HTTP_RESPONSE" from browser.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Problem with SimpleWebSerwer
« Reply #5 on: April 15, 2019, 10:52:37 PM »
I tried it with default settings and updated header, and it did show the AHMI form initially but 10 seconds later, after first refresh, the Chrome added "https" to it and couldn't connect (as the attached pictures show).

Not sure how to resolve this.

prof-nova

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem with SimpleWebSerwer
« Reply #6 on: April 16, 2019, 05:50:52 AM »
Make a try with internet explorer and compatibility view settings

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Problem with SimpleWebSerwer
« Reply #7 on: April 16, 2019, 09:32:55 PM »
This header seems to work for both, Chrome and Firefox:

Code: [Select]
            Dim header As String =
                "<html xmlns : msxsl = ""urn:schemas-Microsoft - com: xslt""  meta content=""en-us"" http-equiv=""Content-Language"" /> " & _
                 "<meta content=""text/html; charset=utf-16"" http-equiv=""Content-Type"" /> " & _
                 "<meta http-equiv=""Location: https://""/> " & _
                 "<meta http-equiv=""Strict-Transport-Security"" value=""max-age=31536000""/> " & _
                 "<meta http-equiv=""refresh"" content=""" & CStr(m_RefreshTime) & """> "

What I did was to leave all the settings of the SimpleWebServer at their default and type only the IP address in the browser (as the previously posted pictures show).

The connection did show as Not Secure but was continuously refreshing.
« Last Edit: April 16, 2019, 09:44:21 PM by Godra »