.net-core-rc2

'Bad Gateway' error when loading aspnetcore RC2 default website project

三世轮回 提交于 2019-12-05 16:54:55
问题 I am attempting to run the default ASP.NET Core Web Application (Web Application Template in VS 2015) via IIS. I have followed the instructions from the docs here eg setting up a 'No Managed Code' application pool and pointing the Physical Path at the location of the web.config file. When I attempt to browse to the website root, http://localhost I am getting this error: HTTP Error 502.3 - Bad Gateway There was a connection error while trying to route the request. Most likely causes: The CGI

ASP.NET Core RC2 Area not published

老子叫甜甜 提交于 2019-12-05 11:13:19
问题 So I just updated my app to use ASP.NET Core RC2. I published it using Visual Studio and noticed that my Area is not published: This snapshot is from src\MyProject\bin\Release\PublishOutput : And here is my Area, named Admin in Visual Studio: Am I missing an step or what? 回答1: You need to configure your publishOptions section of project.json to include the Areas folder which is not included in the default template: ex: "publishOptions": { "include": [ "wwwroot", "Views", "appsettings.json",

How to get information about runtime .Net Core

陌路散爱 提交于 2019-12-05 08:25:31
I have an app which works on Linux and Windows. I need to know where the app is working for use difference code. Thanks You are probably looking for System.Runtime.InteropServices.RuntimeInformation with the IsOsPlatform function to do runtime checks. Have look at the video tutorial https://channel9.msdn.com/Series/aspnetmonsters/ASPNET-Monsters-Episode-46-Finding-Platform-Information of the ASP.NET Monsters. 来源: https://stackoverflow.com/questions/39207282/how-to-get-information-about-runtime-net-core

CreateType missing from TypeBuilder. How to port this?

青春壹個敷衍的年華 提交于 2019-12-05 00:53:48
Trying to port an application from .net 4.5 to .net core for a client. I'm noticing that CreateType is no longer part of TypeBuilder. I've searched through multiple of the new reflection libs with no luck. Does anyone know how to port this? Code in question: typeBuilder.CreateType() Zoey M I found the answer, but in a different repository than I expected. CreateType was dropped, and CreateTypeInfo should be used now per this: https://github.com/dotnet/coreclr/issues/2222 'TypeBuilder' does not contain a definition for 'CreateType' and no extension method 'CreateType' accepting a first argument

Error when Dictionary count is bigger as 89478457

核能气质少年 提交于 2019-12-04 22:54:43
I am getting on this command Dictionary<UInt64, int> myIntDict = new Dictionary<UInt64, int>(89478458); this error: System.OutOfMemoryException was unhandled HResult=-2147024882 Message=Array dimensions exceeded supported range. Source=mscorlib StackTrace: at System.Collections.Generic.Dictionary`2.Initialize(Int32 capacity) at System.Collections.Generic.Dictionary`2..ctor(Int32 capacity, IEqualityComparer`1 comparer) On 89478457 there is no error. Here is the source of Initialize in Dictionary.cs : private void Initialize(int capacity) { int size = HashHelpers.GetPrime(capacity); ... entries

BinaryFormatter in netstandard 1.5

北战南征 提交于 2019-12-04 09:48:48
According to the List of .NET CoreFx APIs and their associated .NET Platform Standard version , System.Runtime.Serialization.Formatters is added into to the .NET Platform Standard since 1.3, which is cool, but when I try to create a .Net Core class library targeting netstandard1.5 under.Net Core RC2, I can't use it. The code is simple, just intending to declare a BinaryFormatter: public class Problems { private System.Runtime.Serialization.Formatters.Binary.BinaryFormatter _formatter; } Error is : Error CS0234 The type or namespace name 'Serialization' does not exist in the namespace 'System

The .NET Core SDK is not installed or cannot be found under the path

江枫思渺然 提交于 2019-12-04 08:16:45
问题 When compiling .Net Core RC2 project under VS 2015 I am receiving following error GETSDKTOOLINGINFO : error : The .NET Core SDK is not installed or cannot be found under the path C:\Program Files\dotnet\bin. These components are required to build and run this project. Files do exist under that directory. Also when I input dotnet into command line I do see it's prining proper version number and stuff.(.NET Command Line Tools ( 1.0.0-beta-001598 ) Any idea how to resolve the issue? 回答1: Remove

How do I use System.Data in a .NET Core RC2 console app (Linux, Debian 8)?

我是研究僧i 提交于 2019-12-04 05:21:07
I've installed .NET Core RC2 on a Debian 8 amd64 system and would like to test if it's possible to query an instance of Microsoft SQL Server. So I'd like to add to my project a dependency on the System.Data.SqlClient assembly. Presently my project file created by running the dotnet new CLI tool looks like this: { "version": "1.0.0-*", "buildOptions": { "emitEntryPoint": true }, "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-rc2-3002702" } }, "frameworks": { "netcoreapp1.0": { "imports": "dnxcore50" } } } Using this answer to a similar query, I was able to

'Bad Gateway' error when loading aspnetcore RC2 default website project

China☆狼群 提交于 2019-12-04 02:57:38
I am attempting to run the default ASP.NET Core Web Application (Web Application Template in VS 2015) via IIS. I have followed the instructions from the docs here eg setting up a 'No Managed Code' application pool and pointing the Physical Path at the location of the web.config file. When I attempt to browse to the website root, http://localhost I am getting this error: HTTP Error 502.3 - Bad Gateway There was a connection error while trying to route the request. Most likely causes: The CGI application did not return a valid set of HTTP errors. A server acting as a proxy or gateway was unable

ASP.NET Core RC2 Area not published

删除回忆录丶 提交于 2019-12-03 23:24:17
So I just updated my app to use ASP.NET Core RC2. I published it using Visual Studio and noticed that my Area is not published: This snapshot is from src\MyProject\bin\Release\PublishOutput : And here is my Area, named Admin in Visual Studio: Am I missing an step or what? You need to configure your publishOptions section of project.json to include the Areas folder which is not included in the default template: ex: "publishOptions": { "include": [ "wwwroot", "Views", "appsettings.json", "web.config", "Areas" ], "exclude": [ "bin" ] } Update If you want to ensure that your controllers and other