Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - ASP.NET Core deployment to IIS error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP.NET Core deployment to IIS error

 Post Reply Post Reply
Author
pbrowne View Drop Down
Newbie
Newbie
Avatar

Joined: 22 January 2020
Location: Australia
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote pbrowne Quote  Post ReplyReply Direct Link To This Post Topic: ASP.NET Core deployment to IIS error
    Posted: 24 January 2020 at 1:09am
I'm getting the following error on my ASP.NET Core 3.1 site:

"The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app. "

The site is just following the Microsoft tutorial at http://docs.microsoft.com/en-us/aspnet/core//ef-rp/intro?view=aspnetcore-3.1&tabs=visual-studio - https://docs.microsoft.com/en-us/aspnet/core/data/ef-rp/intro?view=aspnetcore-3.1&tabs=visual-studio

I have set "ASPNETCORE_ENVIRONMENT": "Production" in launchSettings.json...so not sure where else I need to set this or if that is the real problem.  Any ideas?

See http://parakeetbay.com/Students - http://parakeetbay.com/Students
Back to Top
pbrowne View Drop Down
Newbie
Newbie
Avatar

Joined: 22 January 2020
Location: Australia
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote pbrowne Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2020 at 2:01am
OK, I also included <EnvironmentName>Production</EnvironmentName> in theen publish profile .pubxml.  This has correctly set the environmentVariable in web.config:  However the problem persits.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\ContosoUniversity.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
        <environmentVariables>
          <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
        </environmentVariables>
      </aspNetCore>
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 6937ada6-9807-49f9-a251-8a1a99a61009-->
Back to Top
pbrowne View Drop Down
Newbie
Newbie
Avatar

Joined: 22 January 2020
Location: Australia
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote pbrowne Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2020 at 7:40am
Got it sorted, it was related to a missing local express db which is not available in this hosting.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Poole
Status: Offline
Points: 9631
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2020 at 8:19am
This forum is a Pubic Forums for generic questions on ASP.NET where others in the community can answer them.

Technical Support Requests are logged through our secure online Customer Support Portal, which provides our Customer Services Team with vital information about your account.

Visit the Support Portal at www.webwiz.net/clientarea/support-portal
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.


Become a Fan on Facebook Follow us on Twitter Connect with us on LinkedIn Community Forums Web Wiz Blogs Web Wiz News
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2020 Web Wiz Ltd. All rights reserved.