Buongiorno a tutti,
sto cercando di accedere ad una pagina del programma business central di Office365 e pensavo di scontrarmi subito con problemi di accesso di user e password.
Invece per il momento sono bloccato con gli stupidissimi cookie
Mi avvisa con questa pagina
sapete dirmi come abilitare il browser per consentire i cookie ?
di seguito la bozza per il download della pagina !!
download:
Sub DownloadWithHttpJob
Dim stringa As String ="https://businesscentral.dynamics.com/50ed3af1xxxxxxxxxxxxx"
Dim Job As HttpJob
Dim cookies
Job.Initialize("Job", Me)
Job.Username = "miauser@vdominio.com"
Job.Password ="miapassword"
Job.Download(stringa)
Job.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0")
Wait For(Job) JobDone(Job As HttpJob)
If Job.Success Then
'work with result
Log("Sono dentro il job")
Log(Job.GetString)
End If
Job.Release
Log("fine")
End Sub
Purtroppo , prima della riga
Job.Download(stringa)
Non è gradita , mi segnala :
error:
Error occurred on line: 302 (HttpJob)
java.lang.NullPointerException: Cannot invoke "okhttp3.Request$Builder.addHeader(String, String)" because "this.builder" is null
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpRequest.SetHeader(OkHttpClientWrapper.java:489)
at b4j.example.main$ResumableSub_DownloadWithHttpJob.resume(main.java:126)
at b4j.example.main._downloadwithhttpjob(main.java:83)
at b4j.example.main._appstart(main.java:73)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at b4j.example.main.start(main.java:38)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
in java.base/java.lang.Thread.run(Thread.java:1589)
Ricordo un post di Erel cui indicava come attivare i cookie, ma non riesco a ritrovarlo :-(
Hello Community, Well, I was working with PHP files for a project on the server side, when I ran into a problem. After changing the PHP file or changing MYSQL, the string received from the server as a Result is the same as the previous string and has not changed. Due to the caching of...