The program '[7116] WFA_ImagesBox.exe: Program Trace' has exited with code 0 (0x0).
Error in connection issues. I have made two type of applications, one run with Authentication of OAuth2.0 Client Credentials Authorization and other on Java Web Token. But both exited code without any error.
Kindly check why it's happening or guide me to correct if I'm doing something wrong.
I'm coding of VB.NET Framework 4.5 Windows Application.
Client Credentials Auth:
Dim boxConfig = New BoxConfigBuilder(p_clientid, p_clientsecret).SetEnterpriseId(p_enterpriseid).Build() Dim boxCCG = New BoxCCGAuth(boxConfig) Dim adminToken = Await boxCCG.AdminTokenAsync() '' Error occurs when we execute this line, and exit the code without showing any error Dim adminClient As IBoxClient = boxCCG.AdminClient(adminToken) Dim accesstoken = adminClient.Auth.Session.AccessToken
JWT code:
Dim txt As String = File.ReadAllText("./jsonConfig.json") Dim parsejson As JObject = JObject.Parse(txt) Dim clientID As String = parsejson.SelectToken("boxAppSettings.clientID").ToString() Dim clientSecret As String = parsejson.SelectToken("boxAppSettings.clientSecret").ToString() Dim publicKeyID As String = parsejson.SelectToken("boxAppSettings.appAuth.publicKeyID").ToString() Dim privateKey As String = parsejson.SelectToken("boxAppSettings.appAuth.privateKey").ToString() Dim passphrase As String = parsejson.SelectToken("boxAppSettings.appAuth.passphrase").ToString() Dim enterpriseID As String = parsejson.SelectToken("enterpriseID").ToString() Dim boxConfig = New BoxConfigBuilder(clientID, clientSecret, enterpriseID, privateKey, passphrase, publicKeyID).Build() Dim boxJWT = New BoxJWTAuth(boxConfig) Dim adminToken = Await boxJWT.AdminTokenAsync() 'valid for 60 minutes so should be cached and re-used Dim adminClient As BoxClient = boxJWT.AdminClient(adminToken) Dim accesstoken = adminClient.Auth.Session.AccessToken
please help me out in this matter.
Thank you
投稿コメントは受け付けていません。
コメント
0件のコメント