box / box-windows-sdk-v2

Windows SDK for v2 of the Box API. The SDK is built upon .NET Framework 4.5

Home Page:https://developer.box.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I'm not able to get access token using both CCGAuth and boxJWT

Abdullateef91 opened this issue · comments

  • I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
  • I have checked that the [API documentation][api-docs] doesn't solve my issue.
  • I have searched the [Box Developer Forums][dev-forums] and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
  • I have searched [Issues in this repo][github-repo] and my issue isn't already reported.

Description of the Issue

When comes to Authorization, it exits the code have checked all connections. Internet everything working correctly but haven't getting Authorization. Have tried both method using Client Credentials Grant and Java Web Token

Reported in box community but didn't get any reply
[dev-forums]:
https://support.box.com/hc/en-us/community/posts/11130432017811-The-program-7116-WFA-ImagesBox-exe-Program-Trace-has-exited-with-code-0-0x0-

Hi @Abdullateef91 ,
can you share the entire stack trace and error you are getting ? Have you covered all steps mentioned in these guides: JWT guide, CCG guide. Make sure you have selected all proper scopes and your app is approved by admin.
@lukaszsocha2

Hi @lukaszsocha2,
Yeah I have been through all steps mentioned in both guidelines, and also had approved that.

Stack Trace:
'WFA_ImagesBox.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\WFA_ImagesBox.exe'. Symbols loaded.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\Oracle.ManagedDataAccess.dll'.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\Npgsql.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\MySql.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\Box.V2.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\Newtonsoft.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

The thread 0xaac has exited with code 0 (0x0).
The thread 0x75b0 has exited with code 0 (0x0).
The thread 0x3514 has exited with code 0 (0x0).

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PrivateAssemblies\Runtime\Microsoft.VisualStudio.Debugger.Runtime.Desktop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\BouncyCastle.Crypto.dll'. Module was built without symbols.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\Microsoft.IdentityModel.Tokens.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\Microsoft.IdentityModel.Logging.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\System.IdentityModel.Tokens.Jwt.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\Users\abdul.lateef\source\repos\WFA_ImagesBox\WFA_ImagesBox\bin\Debug\Microsoft.IdentityModel.JsonWebTokens.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WFA_ImagesBox.exe' (CLR v4.0.30319: WFA_ImagesBox.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[37752] WFA_ImagesBox.exe: Program Trace' has exited with code 0 (0x0).
The program '[37752] WFA_ImagesBox.exe' has exited with code 0 (0x0).

Does the same error occur when using developer token?

var config = new BoxConfigBuilder("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET", new Uri("http://localhost")).Build();
var session = new OAuthSession("YOUR_DEVELOPER_TOKEN", "N/A", 3600, "bearer");
var client = new BoxClient(config, session);

yes, sorry for late reply. I have checked on console application, if it runs on static void task then it can connect in both ways but now when I try to use database in it. Then it ended with the above-mentioned errors.

It is resolved, issue was on my side, I have made console application and make sure that all my libraries are on .NET Framework 4.5 and have done all my work on task with static method. it works fine. Thanks for listening to me and your precious time @lukaszsocha2.