0

I have a ASP.NET Core 1.1 where I have followed this guide :

https://www.youtube.com/watch?v=HB6ftmxKzL8

I do however not get the Angular Module to run, its just stating "Loading". I can see in the webdev tool that some resources could not load(404)

http://localhost:44343/System.config.js http://localhost:44343/node_modules/core-js/client/shim.js http://localhost:44343/node_modules/zone.js/dist/zone.js http://localhost:44343/node_modules/systemjs/dist/system.src.js http://localhost:44343/System.config.js http://localhost:44343/

To activate Facebook login I hade to activate SSL but this is switched off again. This is how my Startup.Configure looks like :

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseDatabaseErrorPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();

            app.UseIdentity();

            // Add external authentication middleware below. To configure them please see https://go.microsoft.com/fwlink/?LinkID=532715

            //https://learn.microsoft.com/sv-se/aspnet/core/security/authentication/social/facebook-logins
            app.UseFacebookAuthentication(new FacebookOptions()
            {
                AppId = Configuration["Authentication:Facebook:AppId"],
                AppSecret = Configuration["Authentication:Facebook:AppSecret"]
            });

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

The files do exists but they is placed under node_modules instead of under the wwwroot? In another video about ASP.NET Core it was said that all static that is publiched need to be placed under the wwwwroot?

Banshee
  • 15,376
  • 38
  • 128
  • 219

1 Answers1

0

I got it working by custom serve the app and node_modules as descibed in this post : https://stackoverflow.com/a/39465629/365624

I also hade to move the system.config.js to the root of wwwroot.

Im not sure if this is the right way to handle it and I suspect that I will have to package the custom server files at deployment in some way.

Banshee
  • 15,376
  • 38
  • 128
  • 219