Base solution for your next web application
Open Closed

Publishing on IIS 10 #4111


0
btg created

Hey,

I am trying to publish on and serve the Backend WebAPI portion on IIS 10.0. When I do so, I get:

An error occurred while starting the application.

.NET Framework X86 v4.0.30319.42000    |   Microsoft.AspNetCore.Hosting version 1.1.1    |    Microsoft Windows 10.0.14393

Looking at IIS logs, I see error 500 but no other details.

2017-10-31 17:39:15 127.0.0.1 GET / - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+rv:56.0)+Gecko/20100101+Firefox/56.0 - 500 0 0 3952

Any ideas?


6 Answer(s)
  • 0
    btg created

    It also happens on default IPs, like 22742 for Swagger.

  • 0
    ismcagdas created
    Support Team

    Hi,

    If it is ASP.NET Core, probably you need to install <a class="postlink" href="https://aka.ms/dotnetcore.2.0.0-windowshosting">https://aka.ms/dotnetcore.2.0.0-windowshosting</a>. Please refer to this document <a class="postlink" href="https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x">https://docs.microsoft.com/en-us/aspnet ... pnetcore2x</a>.

  • 0
    btg created

    .NET CORE 2.0 Hosting is installed, IIS Application Pool is unmanaged code, ports are bound to 80 and 22472. I will play around with the environment more, but I don't think this is the issue.

    Are there any issues with running x86 vs x64?

  • 0
    btg created

    It is an IIS issue ... solved by directly running the EXE. I will work through it. Thanks.

  • 0
    btg created

    New Problem ... CORS is blocked despite the following settings.

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myurl:22742/AbpUserConfiguration/GetAll. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
    

    Angular appconfig.json

    {
      "remoteServiceBaseUrl": "http://myurl:22742",
      "appBaseUrl": "http://myurl:4200"
    }
    

    Web.Host Project

    "App": {
        "ServerRootAddress": "http://myurl:22742",
        "ClientRootAddress": "http://myurl:4200",
        "CorsOrigins": "http://myurl:4200,http://myurl,http://localhost:49152,http://localhost:8182"
      },
    

    Any ideas? I've been playing all day with this and I can't get it to work.

  • 0
    ismcagdas created
    Support Team

    Hi @ btg,

    This might not be related to CORS. Can you chek the Logs.txt file under your deployed host application ? It can contain detailed error message.

    Thanks.