Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Static assets are not loading while hosting an ASP.NET Core application

$
0
0

Hi Folks,

I have hosted an ASP.NET Core application in IIS by following this article and I face some challenges while browsing the application after hosting.

Static assets (Styles , Java script files) are not loading properly and this occurs inconsistently and also occurs while making browser refresh. 

Below is my request pipeline configuration looks like.

// 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.UseStaticFiles();

            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            app.UseDeveloperExceptionPage();

            app.UseSession();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }

Any inputs would be appreciated.

Thanks !

Mydeen


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>