首先,我将我的 ASP.NET Core 项目升级到 1.1.0。那一点都不顺利。现在,当它工作时,我无法部署它!
我将它部署到 IIS (Windows Server 2012 R2) 并收到错误消息
无法验证证书... ERROR_CERTIFICATE_VALIDATION_FAILED!
我将此添加到我的发布配置文件中:
<AllowUntrustedCertificate>True</AllowUntrustedCertificate>
但这在VS2017 RC中不起作用。那么,我现在如何部署?为什么你们不从一开始就提供它?这是必不可少的操作!
如何在同一控制器上使用Web API和非Web API操作创建一个控制器.
当我这样做时,我对非Web API操作有404错误.
我已经阅读了不同的文章,它可以与ASP.NET核心混合,但不起作用.
返回404:
HTTP://本地主机:5000 /板/索引板卡ID = 1
[Route("api/[controller]")]
public class BoardController : Controller
{
private IDataContext dataContext;
public BoardController(IDataContext dataContext)
{
this.dataContext = dataContext;
}
public IActionResult Index(int boardID)
{
return View();
}
[HttpGet]
public IEnumerable<Board> GetAll()
{
}
}
Run Code Online (Sandbox Code Playgroud)要么
返回404 for http:// localhost:5000/api/board /
public class BoardController : Controller
{
private IDataContext dataContext;
public BoardController(IDataContext dataContext)
{
this.dataContext = dataContext;
}
public IActionResult Index(int boardID)
{
return View();
}
[HttpGet]
public …Run Code Online (Sandbox Code Playgroud) 我正在尝试将我的asp.net核心1.0.0 RC1应用程序迁移到最终1.0.0并在其他帖子的帮助下我设法将所有引用从RC1更改为最终1.0.0但仍然有几个错误仍然是我无法找到合适的替代方法或参考文献
app.UseIISPlatformHandler(options => options.AuthenticationDescriptions.Clear());
Run Code Online (Sandbox Code Playgroud)
错误CS1061'IOpplicationBuilder'不包含'UseIISPlatformHandler'的定义,并且没有可以找到接受类型'IApplicationBuilder'的第一个参数的扩展方法'UseIISPlatformHandler'(您是否缺少using指令或程序集引用?)
我"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0"在project.json中
services.AddEntityFramework().AddSqlServer()
.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"]));
Run Code Online (Sandbox Code Playgroud)
错误CS1061'IServiceCollection'不包含'AddEntityFramework'的定义,并且没有可以找到接受类型'IServiceCollection'的第一个参数的扩展方法'AddEntityFramework'(您是否缺少using指令或程序集引用?)
我 "Microsoft.EntityFrameworkCore": "1.0.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",在project.json中
请有人帮我解决这些问题吗?提前致谢.