2017-05-24 214 views
0

我有一個ASP.NET 1.1的核心,我都遵循這個指南:無法加載資源?

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

我卻沒有得到角模塊運行,它只是說「加載」。我可以在Webdev的工具中看到,一些資源無法加載(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/

要激活的Facebook登錄我哈德激活SSL但這再次關閉。這是我的Startup.Configure看起來像:

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://docs.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?}"); 
 
      }); 
 
     }

的文件不存在,但它們被放置在node_modules代替的wwwroot下?在關於ASP.NET Core的另一個視頻中,有人說所有靜態的public static都需要放在wwwwroot下面?

回答

0

我得到了它的定製工作服務於應用程序和node_modules作爲descibed在這個崗位:https://stackoverflow.com/a/39465629/365624

我也哈德的system.config.js移動到wwwroot文件的根目錄。

我不知道這是否是正確的方式來處理它,我懷疑我將不得不以某種方式在部署打包自定義服務器文件。