我在ASP.NNEdocumentation中遇到了以下语句
ASP.NET 5:ASP.NET的下一个版本,用于在Windows,Linux和Mac上构建Modern Web Applications的开源Microsoft平台.ASP.NET 5包含用于构建Web应用程序的MVC 6框架.它将MVC,Web API和Web页面的功能组合到一个Web框架中.ASP.NET 5还包括SignalR 3,用于向云连接的应用程序添加实时功能.
ASP.NET MVC 6:用于在ASP.NET 5平台上构建Web应用程序的框架.它具有以前版本的ASP.NET中合并的MVC,Web页面和Web API.
那么ASP.NET 5平台与MVC 6框架和SignalR之间有什么区别?
以下所有项目都有自己的版本号:
我们怎样才能弄清楚这意味着什么?
我无法弄清楚如何在最新版本的dnx ...尝试中传递连接字符串参数
dnx ef dbcontext scaffold -connection='sql connection string'
Run Code Online (Sandbox Code Playgroud)
但是它不识别-connection参数..你应该如何将参数传递给它?
这是这个问题的后续行动.我开始在VS2015社区中使用一个Empty ASP.NET项目,试图根据一个教程添加几个包,但还没有实际工作.链接问题中的初始问题是由于某些项目依赖性使用beta5和一些使用beta7.匹配这些解决了,但现在我尝试在IIS Express中运行项目时出现此错误:
Could not load file or assembly 'Microsoft.Dnx.Host.Clr' or one of its dependencies.
Run Code Online (Sandbox Code Playgroud)
我认为这个问题仍然与版本相关 - 就像之前的web.config程序集引用问题一样 - 但我还不知道如何处理它.我尝试global.json根据我在GitHub上发现的类似问题进行修改,但现在它没有构建.它看起来似乎无法找到更新版本的CLR.从VS2015中的错误列表:
The dependency Microsoft.AspNet.Mvc >= 6.0.0-beta7 could not be resolved.
The dependency Microsoft.AspNet.Server.IIS >= 1.0.0-beta7 could not be resolved.
The dependency Microsoft.AspNet.Server.WebListener >= 1.0.0-beta7 could not be resolved.
Run Code Online (Sandbox Code Playgroud)
global.json:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-beta7",
"runtime": "clr",
"architecture": "x86"
}
}
Run Code Online (Sandbox Code Playgroud)
我的项目的References树有黄色错误指示器,但在NuGet包管理器中查找我的项目并没有显示任何升级(或根据我的意思,根本没有安装任何升级).
dnvm list:
1.0.0-beta5 …Run Code Online (Sandbox Code Playgroud) Azure表存储不支持许多属性类型(List <>,TimeSpan等).
有一些解决方案,如Lucifure Stash和Lokad.Cloud,但他们没有为DNX Core 5.0编译.
有没有办法在使用DNX Core的Azure表中添加对自定义属性类型的支持?
serialization custom-type azure-table-storage dnx asp.net-core
这分解为一些微不足道的子问题
我很困惑,因为我开始在.NET核心站点,跟随链接到ASP.NET 5 RC,一直提到Mono.
我想将我的框架移植到新的.net核心,所以我创建了一个空的应用程序,添加了一个静态成员来感受行为,为每个请求增加一个int,但它运行两次,一次用于请求和一旦在请求之后,所以不是得到1,2,3,4 ......我得到1,3,5,7 ......
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app)
{
app.UseIISPlatformHandler();
app.Run(async (context) =>
{
state++;
await context.Response.WriteAsync(state.ToString());
});
}
public static int state;
// Entry …Run Code Online (Sandbox Code Playgroud) 我正在使用.net核心构建API,我在发布期间遇到了这个问题:
The project being published does not support the runtime 'dnx-clr-win-x86.1.0.0-rc2-20221'
Run Code Online (Sandbox Code Playgroud)
我看到了这个问题的GitHub以及这一个,我没有接近的解决方案.这是我的更新 project.json文件:
{
"compilationOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"dependencies": {
"AspNet.Security.OAuth.Validation": "1.0.0-alpha1-*",
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-*",
"Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0-rc2-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-*",
"Microsoft.AspNetCore.Hosting": "1.0.0-rc2-*",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-rc2-*",
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-rc2-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-*",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-*",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-*",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-*",
"OpenIddict.Core": "1.0.0-*",
"OpenIddict.EF": "1.0.0-*"
},
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.ComponentModel": { "type": "build" }
}
},
"netcoreapp1.0": {
"dependencies": …Run Code Online (Sandbox Code Playgroud) 创建 WebSocketManagerExtensions 时出现错误,如下所示:
System.InvalidOperationException
A suitable constructor for type
'CustomerManagementCore.WebSocketManager.WebSocketManagerMiddleware' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
Run Code Online (Sandbox Code Playgroud)
MapWebSocketManager 方法:
public static IApplicationBuilder MapWebSocketManager(this IApplicationBuilder app,
PathString path,
WebSocketHandler handler)
{
return app.Map(path, (_app) => _app.UseMiddleware<WebSocketManagerMiddleware>(handler));
}
Run Code Online (Sandbox Code Playgroud)
WebSocketManagerMiddleware 构造函数:
public WebSocketManagerMiddleware(RequestDelegate next,
WebSocketHandler webSocketHandler)
{
_next = next;
_webSocketHandler = webSocketHandler;
}
Run Code Online (Sandbox Code Playgroud)
我知道我的WebSocketManagerMiddleware构造函数是否有问题,但我不知道。有人知道吗?
谢谢。
我已经在Windows Server 2008上成功安装了dnvm.但是当我运行"dnx"时,没有显示任何内容.没有这样的错误消息:
C:\ Windows\system32\dnx
C:\ Windows\system32 \
有人有同样的问题吗?
beta8之前,它是可以启动一个Web应用程序,改变一些代码(例如关于-观的ViewBag.Message),保存并刷新浏览器-瞧,显示新的消息不重建项目.
现在,当使用使用DNX和Kestrel的beta8创建一个新的Web应用程序时,这似乎不再适用.知道为什么吗?
dnx ×10
asp.net-core ×7
c# ×3
.net ×2
.net-core ×2
asp.net ×2
dnx50 ×2
custom-type ×1
dotnet-cli ×1
mono ×1