Skip to content
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

ASP.NET Core publishing to IIS 7.5 Blank Loading Screen #1374

Closed
beeterry opened this issue Apr 5, 2016 · 10 comments
Closed

ASP.NET Core publishing to IIS 7.5 Blank Loading Screen #1374

beeterry opened this issue Apr 5, 2016 · 10 comments

Comments

@beeterry
Copy link

beeterry commented Apr 5, 2016

After I publish my app using Visual Studio 2015 to IIS 7.5, I get nothing but a continuous loading screen. I used to get an error, then I downloaded httpPlatformHandler v1.2, and I get the blank loading screen now. I've declared the handler in my web.config file:

<system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>

    <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="true" stdoutLogFile="../logs/httpplatform" startupTimeLimit="3600" forwardWindowsAuthToken="true" />
  </system.webServer>

And here's my Startup.cs file:.

public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
        {

            app.UseIISPlatformHandler();
            app.UseDefaultFiles();
            app.UseStaticFiles();
            app.UseMvc();
        }

I have unlocked my handlers in IIS and set the Physical path to the wwwroot folder that Visual Studio produced during publishing. I've also set the application pool to No Managed Code. What is left to do to solve this issue?

@guardrex
Copy link
Contributor

guardrex commented Apr 5, 2016

@beeterry What does the HttpPlatformHandler log say?

And you may need to remove this forwardWindowsAuthToken="true"

And you might want to run down my old post on rc1-final and see if anything jumps out. It's a bit old, but most of that still applies to rc1-final ... aspnet/Hosting#364 (comment)

@beeterry
Copy link
Author

beeterry commented Apr 6, 2016

ahh, unfortunately that didn't work either. I'm just needing to load an index.html page from within the wwwroot folder. Do you think that the app.UseMVC() from the Startup.cs file is messing it up @ runtime? It's just weird that it runs correct in IIS Express.

@fletchsod-developer
Copy link

I see this bug under VS2015 Update 2. Under VS2015 Update 1, internal exception error was present. At least, it's a progress. Are you saying the log file now works under Update 2 (It was never started under Update 1 as exception error occurred earlier before the instantation of the log file api in Startup.cs)

@beeterry
Copy link
Author

beeterry commented Apr 6, 2016

I don't have anything in my logs folder that VS produced during the publish. I just tried to use the app.UseStaticFiles() and the app.UseWelcomePage() middleware in the Configure method and it still doesn't work outside of VS's IIS Express.

@beeterry
Copy link
Author

beeterry commented Apr 6, 2016

Alright, I've changed something minor in the Configure method of my startup.cs class and I've restructured the project to mirror MVC structure (Controllers, Views, etc). Now it loads a blank screen and the console returns a 404. Anymore suggestions?

public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
        {
            app.UseIISPlatformHandler();
            //app.UseDefaultFiles();
            app.UseFileServer(true);
            app.UseMvc(routes => 
            {
            routes.MapRoute(
                name: "default",
                template: "{controller=Home}/{action=Index}");
            });
        }

@beeterry beeterry closed this as completed Apr 6, 2016
@fletchsod-developer
Copy link

Why is this bug report closed?

@MaximRouiller
Copy link

@fletchsod-developer closed by the same person who opened it. Must have solved his problem somehow.

@beeterry
Copy link
Author

beeterry commented Apr 7, 2016

I did. I had to use the app.map() workaround. Finally figured it out. Here's my solution (Startup.cs)

public void Configure1(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            app.UseIISPlatformHandler();
            app.UseDefaultFiles();
            app.UseStaticFiles();
            app.UseFileServer(true);
            app.UseMvc();
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            app.Map("/appRoot", (app1) => this.Configure1(app1, env, loggerFactory));

        }

@fletchsod-developer
Copy link

Thank you for providing the solution. That surely will help me and everyone else here having this same issues. As you know, the ASP.NET 5 documentation is not that complete.

FYI - To everyone here, "appRoot" is the folder name that go side by side with "wwwroot" folder on IIS Server after you use WebDeploy to publish the WebApp to IIS Server.

Thanks again.

@alaintokam
Copy link

@fletchsod-developer, so there is no need to change the "appRoot" name for the project path?

@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants