[dss-developer] Help needed on JSON Api request with c#/VB.net

Siegfried Rings - VISAM GmbH Rings at visam.de
Thu Feb 25 15:25:04 CET 2016


i'm developing an app in a Microsoft's  Dotnet language(vb.net, c# would
also match).

i can login, get a token and get some infos.


If the function is simple (like GetName() from apartment it works:

Dim url As String = ""
url = "https://" & adress & Port & "/json/apartment/getName"
url &= "?token=" & Token

        Dim Antwort As String = ""
        Request = CType(WebRequest.Create(url), HttpWebRequest) 'anfordern
        If Request IsNot Nothing Then
            Try
                Dim IoStream As System.IO.Stream =
Request.GetResponse.GetResponseStream
                Dim StrRead As System.IO.StreamReader = New
System.IO.StreamReader(IoStream)
                Antwort = StrRead.ReadToEnd
                StrRead.Close() : StrRead = Nothing
                IoStream.Close() : IoStream = Nothing
            Catch wex As WebException
                MsgBox(wex.ToString)
            End Try
        End If


i got the correct json answer back.
But if i have a function with one or more parameter, it fails:


Dim url As String = ""
url = "https://" & adress & Port & "/json/apartment/device/getOutputValue"
url &= "?dsid=" & DeviceID & "&offset=0"
url &= "?token=" & Token

i got a "403" error message from the server

any hints or example in a .NET language ?




-- 
Beste Grüße aus Neuwied,

Siegfried Rings
Softwareentwicklung

 
VISAM GmbH
Irlicher Str. 20
D-56567 Neuwied (Germany)

Tel. : +49 (0) 2631 / 941288-0
Fax : +49 (0) 2631 / 941288-9

Mail: Rings at visam.de
Web: www.visam.de
 

Vertretungsberechtigter Geschäftsführer: Uwe Abresch
Registergericht: Amtsgericht Montabaur
Registernummer: HRB 14033

___________________________________________________________________


Hiermit widerspreche ich der Nutzung oder Übermittlung meiner
persönlichen Daten für Werbezwecke gemäß Par. 28 Abs. 3
Bundesdatenschutzgesetz.

( Unsolicited commercial email is not permitted at this address.)

___________________________________________________________________

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren,
jegliche anderweitige Verwendung sowie die unbefugte Weitergabe dieser
Mail ist nicht gestattet.

 

(This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure, distribution or otherwise use of the
material or parts thereof is strictly forbidden. )

 ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı




More information about the dss-developer mailing list