标签: dnx50

使用ASP.NET 5导出为pdf

我正在研究MVC 6应用程序(DNX Core 5.0框架).不幸的是,我找不到任何pdf导出库.

任何帮助将不胜感激.

asp.net-core-mvc dnx50 asp.net-core

10
推荐指数
2
解决办法
1万
查看次数

元素'system.webServer'具有无效的子元素'httpPlatform'

我正在浏览Shawn Wildermuth的课程,并在构建时收到有关web.config的以下警告

Severity    Code    Description Project File    
Line
Warning     The element 'system.webServer' has invalid child element 'httpPlatform'. 
List of possible elements expected: 'asp, caching, cgi, defaultDocument, 
directoryBrowse, globalModules, handlers, httpCompression, webSocket, 
httpErrors, httpLogging, httpProtocol, httpRedirect, httpTracing, 
isapiFilters, modules, applicationInitialization, odbcLogging, security,
serverRuntime, serverSideInclude, staticContent, tracing, urlCompression, 
validation, management, rewrite'.   
TheWorld    E:\EShared\Pluralsight\aspdotnet-5-ef7-bootstrap-angular-web-app\1-aspdotnet-5-ef7-bootstrap-angular-web-app-m1-exercise-files\VS2015\src\TheWorld\wwwroot\web.config   8
Run Code Online (Sandbox Code Playgroud)

Web.config是

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
    </handlers>

    <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>

  </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

程序运行正常.我应该对警告做些什么吗?

asp.net dnx50

7
推荐指数
2
解决办法
4939
查看次数

成功发布后Asp.net 5 Web Application启动异常

我有一个Asp.net 5 Web应用程序,在开发中运行良好(从Visual Studio或VS代码我可以启动没问题).然而,在成功发布应用程序,试图与启动网站时,"web.cmd"出现以下错误,并防止网站从不断加载:

Application startup exception: System.IO.FileNotFoundException: Could not load file or assembly 'my-ng2-website' or one of its dependencies. The system cannot find the file specified.
File name: 'my-ng2-website' ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
   at System.Reflection.Assembly.LoadFile(String path)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadFile(String assemblyPath)
   at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext loadContext)
   at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.LoaderContainer.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.DefaultLoadContext.LoadAssembly(AssemblyName assemblyName)
   at Microsoft.Dnx.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadAssemblyImpl(AssemblyName assemblyName)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.ResolveAssembly(Object sender, ResolveEventArgs …
Run Code Online (Sandbox Code Playgroud)

visual-studio dnx50 asp.net-core

7
推荐指数
1
解决办法
578
查看次数

.NET Core,Mono和ASP.NET如何在非Windows平台上相关?

这分解为一些微不足道的子问题

  • .NET Core是Mono的替代品吗?
  • ASP.NET 5.0将在OSX/Ubuntu环境中与.NET Core或Mono一起运行吗?

我很困惑,因为我开始在.NET核心站点,跟随链接到ASP.NET 5 RC,一直提到Mono.

mono .net-core dnx dnx50 asp.net-core

2
推荐指数
1
解决办法
384
查看次数

ASP.NET 没有适合 WebSocketManagerMiddleware 的构造函数

创建 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构造函数是否有问题,但我不知道。有人知道吗?

谢谢。

c# asp.net dnx dnx50 asp.net-core

2
推荐指数
1
解决办法
4186
查看次数