question

johnsonaskot avatar image
johnsonaskot asked

Bug? C#/iis7

It seems like the Echo disconnects immediately after sending the request to the web server without even waiting for it's response causing my server to throw a 500 error. My handler for the request never even gets called. If I mimick the Echo's request to my webserver and don't check the cert information, it works fine. I don't think it's a cert issue as I tried setting it to a different cert and the Echo gives me an error of unable to reach the service, but when I set it back to the correct one the error is "There was a problem communicating with the requested application." Something else that's strange, right after that it sends another post to my web server with some json that contains the word "ERROR" and I'm not sure what that's about. Any information is appreciated. Message was edited by: johnsonaskot
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

James Chivers avatar image
James Chivers answered
Hello, and welcome to the forum :) Can you see from your server logs where the initial POST from Alexa is landing after you invoke the Skill via your Echo? When you successfully mimic the inbound request (I'm assuming with curl or suchlike), can you confirm that the Skill Endpoint URL is definitely the same as what you've set in the Skill configuration in the developer portal? You say "My handler for the request never even gets called", but the second POST from Alexa must be reaching your Endpoint URL, because you're seeing the error message. That second POST should contain a body like: {"version":"1.0","session":{"new":false,"sessionId":"amzn1.echo-api.session.xxxxx","application":{"applicationId":"amzn1.echo-sdk-ams.app.yyyyy"},"user":{"userId":"amzn1.account.zzzzzzzz"}},"request":{"type":"SessionEndedRequest","requestId":"amzn1.echo-api.request.aaaaaaa","timestamp":"2015-07-04T02:17:02Z","reason":"ERROR"}} ...and will be sent to the exact same Skill Endpoint URL as the first failed attempt, which why it's weird that you're not seeing them both. If you're throwing a 500 on the first POST from Alexa, then I'd guess that Alexa is reaching your server, it's just that for some reason the server isn't routing the request correctly to your handler(s). Hope that makes sense :) Let me know about the first POST details and we can see about debugging.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

johnsonaskot avatar image
johnsonaskot answered
I just decided to write my own http daemon in C# since I couldn't figure it out. I wrote the daemon in about 1/8th the time I spent messing with iis garbage today lol. Thanks for the response, good luck!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

James Chivers avatar image
James Chivers answered
I guess that's one way to address the problem :) Onward!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JamesQMurphy avatar image
JamesQMurphy answered
By any chance were you using WCF? I had a similar issue. Turns out that when you using WCF with SSL (HTTPS), you need to add to the WCF binding configuration. Let me know if you want the full WCF config.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

johnsonaskot avatar image
johnsonaskot answered
Nope, was using asp.net. I appreciate it though :)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.