-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Development Mode Error #7581
Comments
And try setting the ASPNETCORE_ENVIRONMENT environment variable to Development, |
Thank you for your quick response, Rick. This link did not have the answer, however, I was able to solve it. Turns out, when you deploy your web app, you must go to the appsettings.json file, and replace the "DefaultConnection" from "ConnectionStrings" with a server key generated in azure or some other database service. Indeed the log is misleading, since when the app is deployed, it is in Production mode, but the debugger notes a local default connection string, so it gets confused and assumes it is in Development mode instead. This tutorial is very complete, but I strongly recommend the writers to include this key piece of information, since it is essential for deploying the app. |
@donalatorre a link to https://docs.microsoft.com/en-us/aspnet/core/tutorials/publish-to-azure-webapp-using-vs?view=aspnetcore-2.1 should solve the problem |
Hello, |
Hi, I think your solution "...appsettings.json file, and replace the "DefaultConnection" from "ConnectionStrings" with a server key generated in azure..." could really help me. Would you be able to give me some more information about where you found the server key generated in Azure please - and also the syntax you used in the JSON file? Would really appreciate your help. Cheers |
That's the wrong approach. See https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-2.2#providers |
Thank you so much!
…On Wed, Jan 9, 2019 at 12:03 AM Rick Anderson ***@***.***> wrote:
you must go to the appsettings.json file, and replace the
"DefaultConnection" from "ConnectionStrings" with a server key generated in
azure or some other database service
That's the wrong approach. See
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-2.2#providers
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7581 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABsl_ocItyTQAtsO_SpnlU-L93qSDBd8ks5vBXgfgaJpZM4VMB8S>
.
|
Hi Dona, I having the same issue. I put the right serve connection string in my appsetting.json file but still getting the same error. can you please help me out with this. |
deploy to IIS not azure, getting the same error, anything else? |
had the same issue, turned out to be the this call that caused the trouble. use the developersigningcredentials seems to work fine. |
I think this will help
without the condition of and remove these lines if exists
then just let the app displaying the error like in development mode so you can search about it and fix it after you fix the error(s) you can remove these changes so users can not see the error :) |
Can you please help me how to find the server key generated in Azure? urgent need |
This has nothing to do with Azure deployment. That's a different article. |
i face same problem in 3.1 . any one help me? |
@abdullah-alimam, Your solution helped me a lot. Here's how my I solved my problem: I had the same problem (ASP.NET CORE 3.1) but changing "ASPNETCORE_ENVIRONMENT" did not helped. Seeing @abdullah-alimam 's answer, I found that in Startup.cs, Configure method, this code was hiding the real issue.
Then I deleted the If block and added Database error pages ( You might need to Install Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore from NuGet )
So your Startup.cs will look like this
Then you will see the real errors on the webpage. For me it was
So I had to run a GRANT SCRIPT. I just had to run this script on my SQL Server
You can see this link : https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/deploying-to-iis And my problem was solved. Hope this helps somebody. |
@abdullah-alimam's solution worked for me. Thanks |
I followed this tutorial. It worked fine in the local host. When I deployed it in my azure website, I obviously changed the reply url to the public link. So I was able to select an account, enter password, and allow the permissions, but then I got this error:
An error occurred while processing your request.
Request ID: 0HLF7H4694HLM:00000006
Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.
Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application.
I changed the environment mode to Production in my App, same error. I'm starting to suspect it has to do with something else. Any help?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: