Skip to content
This repository has been archived by the owner on Oct 18, 2018. It is now read-only.

How to use auto-wired instance/key configuration from receiver? #57

Closed
diegohb opened this issue Apr 30, 2016 · 2 comments
Closed

How to use auto-wired instance/key configuration from receiver? #57

diegohb opened this issue Apr 30, 2016 · 2 comments

Comments

@diegohb
Copy link

diegohb commented Apr 30, 2016

Hello i've tried the following requests to see this work but continue to get the error "Could not find a valid configuration for WebHook receiver 'Pipedrive' and instance '#'. The setting must be set to a value between 32 and 128 characters long."

I've tried looking at all the different samples and tracing the code down and I can't really figure out why it won't match up under any configuration.

Requests:

POST /api/webhooks/incoming/pipedrive/1?code=bbbbaaaaaaaabbbbbb94583d6cf4cf1c0c7f767
HTTP/1.1
Host: localhost:30617
Content-Type: application/json

POST /api/webhooks/incoming/pipedrive/1 HTTP/1.1
Host: localhost:30617
Content-Type: application/json

POST /api/webhooks/incoming/pipedrive/bbbbaaaaaaaabbbbbb94583d6cf4cf1c0c7f767
HTTP/1.1
Host: localhost:30617
Content-Type: application/json

Configuration:
<add key="MS_WebHookReceiverSecret_Pipedrive" value="aaa, 1=bbbbaaaaaaaabbbbbb94583d6cf4cf1c0c7f767, 2=3bbbbbbbbbbbb33333333333fffffffffd" />
and also tried just value = key (third POST request).

code:
var receiverConfig = await this.GetReceiverConfig(pRequest, Name, pID, 32, 128);

and await EnsureValidCode(pRequest, pID);

@diegohb
Copy link
Author

diegohb commented Apr 30, 2016

The immediate question is what would I loose by accessing Configuration setting directly in the receiver using ConfigurationManager.AppSettings and just parsing this out myself to validate the instance and code if I wanted to enforce ?

@HenrikFrystykNielsen
Copy link
Contributor

Diego,

When you start up the server, you can see what is registered in the log output. That should hopefully tell you what is going on.

Let me know whether that helps!
Henrik

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants