0


Please or Register to create posts and topics.

Deploying web app on Azure

12

In my case, it was this line in webconfig that was set to Development, changing it to Production fixed the problem.

<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />

 

tony and Martijn de Coo have reacted to this post.
tonyMartijn de Coo

Eugene - YOU ARE THE MAN!!!  I knew it was a dev/prod issue - I could get it all running in DEV no issues, but didn't think of the webconfig.. obvious !!

I've downloaded the latest from my paid STD/PRO account, and while called 3.1, the underlying runtime was 3.0 - so upgraded that and the identity server to 3.1 and added your web.config changes and BOOM - we have lift off - all good..

https://quickapp31.azurewebsites.net and https://quickapppro31.azurewebsites.net

thanks again, you have saved me hours and hours - if you in Adelaide Aus one day, let me buy you a beer and/or coffee

I  love eben and his starter framework, and it's kinda good he's not perfect, and we have to get our hands dirty (I've learned soo much) - I've built 3 apps with the pro version being used in business (which I can't share) and working on one using the STD which will be public next year, and the weeks of dev time he's saved (and then with peeps like you on the top) is amazing, and I can focus on the business features...

 

 

 

 

 

I'm hoping someone can help me here.  I have quickapp up and running locally without issue, but am unable to get it deployed working in Azure.  

my .net core api is deployed to azure seperately from the client app, which is also in azure. I can hit https://[base-server-url]/.well-known/openid-configuration and see the response from oauth. I can authenticate to my app the first time to login, but then if I click on any url in my app that hit the api to load data, subssequent authentication fails.

appsettings.Production.json
"ApplicationUrl": "https://api.mydomain.com",
"https_port": "443",
"DefaultUserRole": "Owner",'

web.config
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44350" /> (i don't believe that this matters?)
<environmentVariable name="COMPLUS_ForceENC" value="1" />
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />

Environment.ts
export const environment = {
production: false,
baseUrl: "https://api.mydomain.com", // Change this to the address of your backend API if different from frontend address
tokenUrl: null, // For IdentityServer/Authorization Server API. You can set to null if same as baseUrl
loginUrl: '/login',
googleClientId: '',
facebookClientId: ''

12