0

i created some code to get a folder from box.NET using the method GetFolder( ) of the CloudStorage object. but when i ran it gave a NullReferenceExeption and i dont know what is the problem. the code work fine for Dropbox. by the way there is no problem with Box.NET credential since i managed to successfully open the connection to Box.NET.

Any help will be appreciated

Peter
  • 2,551
  • 1
  • 14
  • 20
  • The `box-api` tag should be added to this question. There's a suggested edit already in progress, so I can't add it at the moment. – neontapir Jul 11 '12 at 19:00

2 Answers2

3

If you're still looking into the problem, I just had to debug it myself.

I kept overlooking the problem as the goof is so minor, but check out BoxNetStorageProviderServices.cs.

OnNameBase assumes a url will arrive as http rather than https. The string replace then changes the url from https://www.box.com/dav/blahblah to httpss://www.box.com/dav/blahblah.

After adding a tiny bit of logic, everything works great.

vgoff
  • 10,980
  • 3
  • 38
  • 56
Scott
  • 31
  • 2
0

Which library are you using? There is a Box C# library that Box provides the basic tools to get you using the Box apis: https://github.com/box/box-csharp-sdk

You will also get more help from a broader Box community if you tag this question with the box-api tag.

Peter
  • 2,551
  • 1
  • 14
  • 20