title: Deployment error: "The requested page cannot be accessed because the related configuration data for the page is invalid"
body: <p><strong>What happens?</strong></p>
  <p>I publish a website to UnoEuro on a windows server.</p>
  <p>When I do I keep getting the error message:</p>
  <blockquote>
  <p>&quot;HTTP Error 500.19 - Internal Server Error</p>
  <p>The requested page cannot be accessed because the related configuration data for the page is invalid.&quot;</p>
  </blockquote>
  <p><strong>What have I set up/tried?</strong></p>
  <p>What I've done is that I've created a .NET Core 2.1 Web API which hosts fine locally on my computer using IIS. I have then published the web api to the hosting site UnoEuro where I can see that the files are uploaded as they should be.</p>
  <p>I asked the hosting sites support, they told me to just ensure that it was deployed as self-contained but that otherwise they could not help further. It looks like there is a hosting issue of some sort related to that it cannot seem to find the webconfig file. At least that's what the error message says.</p>
  <p>Is there any form of setup I should make? A configuration I should change? Should I set up some SSL settings in the web API which I might have missed? When I started the project I told it to enforce HTTPS, but surely I should get another error message if that was the fault?</p>
  <p>I've tried publishing with the target runtime set to both x64 and x86.</p>
  <p>I've never published an API like this to anything but Azure before, so I might be doing a thing or two wrong but I cannot see what it should be? I have Googled around but not found anything that seems relevant which has worked.</p>
  <p>Most of the solutions seem related to changing the server environment which I don't have so much control over, I mostly just have control over the application/web api, at least that's what it looks like to me.</p>
  <p>Hope you have any suggestions, I'm all eyes n ears.</p>
  <p>Side question: Should I use IIS Manager for this? I'm currently publishing through Visual Studio 2017.</p>
  <p><strong>Images for further understanding</strong></p>
  <p><em>Publishing settings</em></p>
  <p><a href="https://i.stack.imgur.com/Hujmo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hujmo.png" alt="Publish info" /></a></p>
  <p><em>Deployed/published files</em></p>
  <p><a href="https://i.stack.imgur.com/0S5VC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0S5VC.png" alt="Deployedfiles" /></a></p>
  <p><em>Error message I get</em></p>
  <p><a href="https://i.stack.imgur.com/e4cto.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e4cto.png" alt="Error message" /></a></p>
  <p>EDIT:</p>
  <p>I tried moving the files to /public_html on the same domain as ISS Manager seemed to indicate it expected the config file to be there.</p>
  <p>That then resulted in a different error message as you see below.</p>
  <p>Link from error message: <a href="https://go.microsoft.com/fwlink/?LinkID=808681" rel="nofollow noreferrer">https://go.microsoft.com/fwlink/?LinkID=808681</a></p>
  <p><a href="https://i.stack.imgur.com/bTuqW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bTuqW.png" alt="new error message" /></a></p>