Announcements
Known issues updated. Learn more
Highlighted

Webhook URI response in C# / .NET

Explorer | Level 3

Good afternoon.

I'm trying to set-up a webhooks on a C#/webform solution but every tutorial I found was either in python or .NET MVC.

Would you have a link for a relevant tutorial ? I'm stuck already on the URI enabling, I cannot seem to get a call back / echo of the "challenge" params despite returning it with the appropriate headers.

And that is without even touching the whole notification part of it. Any link, doc or tutorial that isn't in python would be more than welcome !

Thanks, Malagann

1 Accepted solution

Accepted Solutions

Re: Webhook URI response in C# / .NET

Dropboxer

That error seems to indicate that Dropbox couldn't get any response from your server. Is your URL globally Internet accessible? Are you sure your handler code is set up to respond on that particular "/jaguarVoDropbox/updateJaguarMedia.aspx" route?

If that all seems to be set up right, feel free to open an API ticket with the actual URL so we can check on it for you: https://www.dropbox.com/developers/contact

Reply
Loading...
6 Replies

Re: Webhook URI response in C# / .NET

Dropboxer

I don't believe we have a webhook sample app or tutorial in C# in particular, unfortunately. I'll send this along as a request for one, but I can't promise if/when one might be written.

I'll be happy to try and offer whatever help I can though. Can you share what you have so far, and what error you're getting?

Reply
Loading...

Re: Webhook URI response in C# / .NET

Explorer | Level 3

Hello, thanks for taking the time.

I'm simply trying to get an URI on the app/dropbox page to get started.

I've set up a URI which write a response with the specified headers of the tutorial.


Code :

Response.ContentType = "text/plain";
Response.Headers.Add("X-Content-Type-Options", "nosniff");
Response.Write(Request.Params["challenge"]);
Response.End();


Perhaps I'm just terribly wrong and have completly misunderstood the tuto' (you know what they say about the error sitting between the keyboard and the chair) and I'm doing it the wrong way on the all echo back the challenge ?

So far, that's being my issue. I have no trouble navigating, downloading files with the dropbox api but the whole webhook thing is puzzling me for now.

 

Thanks !

Reply
Loading...

Re: Webhook URI response in C# / .NET

Dropboxer

Thanks! Nothing looks obviously wrong there. What error are you getting?

E.g., if something is failing when running this code, what do you get in your log? Or, if the connection from Dropbox isn't succeeding, what do you get in webhook error output on your app's page on the App Console?

Reply
Loading...

Re: Webhook URI response in C# / .NET

Explorer | Level 3

Heyo again, the code runs without error but on the app page I'm told that :


code  a écrit :

Error: Did not receive response from server.

Request:
GET http://www.XXXX.XXXXX.com/jaguarVoDropbox/updateJaguarMedia.aspx?challenge=4XbCILXJzsFyHDD6RtHwSvKYS...

Response:
(No headers)

Response Body (First 256 bytes):
(No response body)



I hide our url but if you need it could I maybe give it to you in mp ? Or hide it behind admin tag ?

Reply
Loading...

Re: Webhook URI response in C# / .NET

Dropboxer

That error seems to indicate that Dropbox couldn't get any response from your server. Is your URL globally Internet accessible? Are you sure your handler code is set up to respond on that particular "/jaguarVoDropbox/updateJaguarMedia.aspx" route?

If that all seems to be set up right, feel free to open an API ticket with the actual URL so we can check on it for you: https://www.dropbox.com/developers/contact

Reply
Loading...

Re: Webhook URI response in C# / .NET

Explorer | Level 3

Soooo.. that problem... was of course lying between the computer and the chair. I messed up, adding www. that weren't needed. Apologies for the waste of time on that ! 

 

I'm not in the office for now but I'll work on implementing the webhook tomorrow. I'd ask for tips but I haven't really try anything and my question would be too broad. Still looking around for asp.net webform help but still no luck. 

I'll open a new thread if need be. 

Thanks & sorry again.

Reply
Loading...
API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post