用管理员身份运行vs

添加引用

using Microsoft.AspNetCore.Cors;

修改

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseCors(builder =>
{
builder.AllowAnyHeader();
builder.AllowAnyMethod();
builder.AllowAnyOrigin();
});

 

app.UseMvc();
}

修改c盘host文件C:\Windows\System32\drivers\etc

# localhost name resolution is handled within DNS itself.
# IP地址    localhost
# 127.0.0.1 localhost
# ::1 localhost

---cmd 运行  ipconfig /flushdns

 

相关文章:

  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2021-11-28
  • 2022-02-02
  • 2021-10-29
相关资源
相似解决方案