I have been able to successfully build and deploy a sample .NET core application using the publishing instructions in this post - https://support.appharbor.com/discussions/problems/90387-is-net-cor.... However, I was never able to get my database working properly. If I add my AppHarbor sequelizer connection string to my application manually then everything works fine. So it would seem the transformation is not taking place or not taking place correctly. I have added the alias "DefaultConnection" as seen in my connection string below to the configuration variables but no luck. Is this known to not be working currently or is there something else I need to do to my publishing configuration?
"ConnectionStrings": { "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=AppHarborTest;Trusted_Connection=True;MultipleActiveResultSets=true" }
#1 Posted by rune Support staff on 08 Jun, 2017 11:51 PM
Hi,
So the part that's missing is specifically related to the configuration -- it'll be injected into the application's environment variables after a platform update scheduled for early next week.
However, if you're using ASP.NET Core on top of desktop .NET framework (e.g. .NET 4.7 or earlier) you may want consider using the old
ConfigurationManagerto inject the regularappSettingsinto your app. These will continue to be injected in theweb.configfile, and any other config files, so might be useful if you're migrating several projects with for instance a mix of web and background workers. You'd need a custom configuration provider for it and there's a good example here.If you're using ASP.NET Core on top of the .NET Core framework it'd probably make more sense to wait until the update next week -- I'll post an update to this discussion as soon as we do which I can see you're also subscribed to updates to already!
Best,
Rune
rune closed this discussion on 08 Jun, 2017 11:51 PM.
Vale R. Trujillo re-opened this discussion on 09 Jun, 2017 01:24 AM
#2 Posted by Vale R. Trujill... on 09 Jun, 2017 01:24 AM
Sounds good! Thank you very much Rune!
#3 Posted by rune Support staff on 10 Jun, 2017 12:36 AM
Of course, happy to help!
Have a great weekend,
Rune
rune closed this discussion on 10 Jun, 2017 12:36 AM.