-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net Core implementation that works with Lambda Serverless? #20
Comments
+1 would be great to get this to work with the recently added C# support in Lambda |
Another +1. I've been using the Slight.Alexa version thats been ported to Core... but it's incomplete at the moment. |
I have a .Net core (netstandard) port of this in a fork that initially is working for me but I will test further before declaring success beyond It works on my machine ™️ - I will also verify it works in core on Azure and AWS Lambda |
verified it is working on azure just now, up next AWS Lambda verification (but if it works on .net core it should on another) |
@tonysurma I couldn't find any nuget feed with your version of this lib (for .net core) so I allowed myself to create one: https://www.myget.org/feed/ami/package/nuget/AlexaSkillsKit.Net (if any of you need it, you can reference it). Quite useful, because local dll can't be referenced in easy way in VSCode. |
@szymczakk Happy to amend the "official" NUGet package definition so it can be used from .NET Core if you can educate me a bit about what I need to do. (My head is still on .NET Framework 4.6 and I haven't had time to learn about porting stuff to .NET Core.) Is the package definition you published on MyGet available somewhere for me to look at? |
@stefann42 yes it is! I moved the version to 1.6 (no reason other than it needed to be a different version. in .NET Core it comes from the csproj now so you can see the details here (I literally copied over what you had done from the nuspec to the csproj). I also chose the right netstandard so it will work with .NET Core and the version of .NET Framework you had previously targeted so it is compatible and should work without change in existing .NET 4.6 deployments. The changes are all in the fork I made and I strove to make each commit 'small' so it documented the porting. Happy to help however I can and if you would like it I can make a PR with these changes and anything else you would need to convert. |
thank you @szymczakk for posting that. I hadn't gotten to that step yet. I had been using a custom nuget feed entry that pointed to a local folder where I had the package (simple but it worked for me) |
@tonysurma How did you handle the request? When I create API project, and in controller get the Request it's type |
@szymczakk I made a I did that as it was the quickest/most direct port and figured most folks aren't putting Alexa into another controller so shouldn't be an issue. I was also thinking of adding another |
@tonysurma sory for bothering you, but have another question, can you look here and see what do I do wrong? By wrong I mean
as an response from service simulator in Skill config console on AWS. I got request, but response that I send to Alexa is invalid 😢 |
@szymczakk no worries, I will try to look at that a bit later. Can you see the response you are sending from your code and are you sure you got called? I ask only as I have gotten that error when tunneling or some other url issue was the cause. |
@tonysurma Yep, Im 100% sure that my server is called, because I'm attached with debugger to it, and see everything is happening. I will try to catch my whole response with Fiddler and show you ;) |
got it @szymczakk - just looked through the code and nothing stood out (looked at startup, controller, speechlet) and all looks good with no gotchas. |
@tonysurma Thats weird. I'm unable to capture my trafic with Fiddler, but I can stop execution by debugger (so my local server is called). How did you configure your server? Do you use IIS? How about certificate? Slefsigned or trusted? And do you have static IP address or you use some DynDNS (like no-ip etc) ? |
It's been a bit since I did the self hosting (I do updates now to deployed instances in Azure App Service websites) but I recall following this guide. I recall getting tripped up a couple of time and used this guide and another I can't find right now. Eventually I went to just using the site on azure and logging and other mechanisms as it was faster (especially since I tend to dev on combination of desk pc and a couple of laptops). Sorry I don't have any more insights there |
@tonysurma Ok, I found the response:
I wanted to send PS. Dont know if its important: oryginal data are
and you have to decode it to make it readable. |
hmmm, let me look and compare - hopefully there is something there |
@tonysurma I compared it with amazon specification and it's problem with respone :/ Ehhh... have to figure it out somehow 😉 |
gotcha - yeah. My response from an app on the same build of the framework looks like this (removing a few specific bits)
Definitely looks like stuff is missing in the response building. |
Hey @tonysurma ! Sory for taking it so long, but have some more info, maybe you will know how to handle it. When I debug the request it shows that the response that is generated by code is
but when I finally cought the correct resposne that is sent by server it turns out that the body of response is
I run dotnet core in kestrel and then host it on IIS on windows 10. Do you have any idea why do I got such resposne? |
Sorry but unfortunately I do not. It looks to be like it's encoding the http response itself in json which is strange and i've never seen before myself. |
Hey @tonysurma, look what I found. And this link is explaining why it wasn't working. But funny case is that your code works for you, but you don't have this function in your source. After adding
after |
Interesting, great find. I will take a look. Might be an omission from the sample project I had in my test and production projects... thanks |
Thanks again @szymczakk I had that edit in each of my projects and missed it in the SampleCore project as I never 'directly' ran the sample. I was using the SampleCore project as the basis for my projects to test and run and forgot to 'back port' that line into the sample. I pushed this now. |
Hey @tonysurma and @stefann42 any chance we could still get this merged and published to nuget? Now that we've got .net core 2.0, it'd be great to get .net core support. |
@JustMaier if @stefann42 is open to it, I can update/test my fork with netstandard 2 to ready it for merge |
@tonysurma By all means. I'm happy to accept the PR, just let me know if I need to be aware of any specifics. We don't yet use .NET Core in our production deployment so I don't have an environment to test myself. |
Now, when interfaces support is merged, I believe .Net Core support is our major priority. @tonysurma changes in your fork looks great to me. Could you, please, create a PR with your changes, so that we can include .Net Core support to the nearest library release? Just tell if you need any help in preparing PR or merging with latest changes. |
One thing to note. Current library is compatible with VS2012 for both Speechlet authors and AlexaSkillsKit.Net contributors. .Net Standard version will require .Net Core1.x SDK and VS 2017 or VS Code for development. @stefann42 are you ready for these kind of changes in our development environment? For Speechlet authors we can provide multitargeting NuGet package, ofcourse. |
I think we should start a separate branch for version 2 and make that compatible with .NET Core. We’re not ready to move off .NET Framework 4.7.
|
I have slightly different proposal, which I've tried to describe in newly created wiki Roadmap document. |
@ElvenMonky Love the Roadmap! Let's have an online meeting together next week (between Christmas and New Year's) and discuss merged PRs and strategy for moving forward. Please see https://freebusy.link/stefan for my availability and to schedule the meeting. |
thanks @ElvenMonky for noting two issues with my fork. I just addressed those and will also bring it up to date with this repository recent commits. Happy to help as you all decide on how to address .net core 2 |
Well. currently I think we can drop VS 2012 support, after already implemented code is released. |
@tonysurma we created separate branch for .Net Framework version. Please, feel free to create PR into the master branch with your changes related to .Net Standard/.Net Core support. |
the myget URL posted above doesn't work. Is it still alive?
in VS 2017.15.6.6 |
@brandonh-msft Do you mean this one https://www.myget.org/feed/ami/package/nuget/AlexaSkillsKit.Net/1.7.0 ?? This one is still working (just checked it) |
is this branch still alive? The Java version seems a lot more active. |
Development in this repository is inactive since January 2018. It seems nobody is interested. |
One of the big selling points for the ease of Alexa dev is how easy (and cheap) it integrates with lambda. Also some orgs are moving to Core as it becomes more stable. Any future plans to have this work with .Net Core for those easy Lambda projects?
The text was updated successfully, but these errors were encountered: