.net-4.6

DNX: The current runtime target framework is not compatible with project

霸气de小男生 提交于 2019-12-08 14:39:47
问题 I am getting the following run-time error: [InvalidOperationException: The current runtime target framework is not compatible with 'TestDeployProject'. Current runtime Target Framework: 'DNX,Version=v4.5 (dnx45)' Type: CLR Architecture: x86 Version: 1.0.0-beta6-12256 Please make sure the runtime matches a framework specified in project.json] Project settings DNX SDK version: project.json target frameworks: "frameworks": { "dnx46": { } }, DNVM list : Active Version Runtime Architecture

ASP.NET 4.6 WEB API, Not serving static files(.js, .css) IIS express visual studio

百般思念 提交于 2019-12-08 11:37:31
问题 I have been looking over the web and still no luck, hence why I am asking. I have a WEB API 4.6 project that will also be home to an angularjs2 application, I have set up to use static files like this: var physicalFileSystem = new PhysicalFileSystem(@".\wwwroot\"); var options = new FileServerOptions { EnableDefaultFiles = true, FileSystem = physicalFileSystem, }; var contentTypes = new FileExtensionContentTypeProvider(); options.StaticFileOptions.FileSystem = physicalFileSystem; options

.NET 4.6 HttpResponse.PushPromise methods to manage http/2 PUSH_PROMISE header

跟風遠走 提交于 2019-12-08 11:22:27
I am a bit confused about PUSH PROMISE http/2 header handling in .NET4.6 . When I look HttpResponse.PushPromise there are two overloads: One that accepts path to resource public void PushPromise(string path) - am assuming resource is then read and binary sent across to client. Second public void PushPromise(string path, string method, NameValueCollection headers) that accepts sting method and NameValueCollection headers which I am failing to understand. Why would I want to pass method (assuming HttpMethod like GET, POST, etc) and collection of headers inside PUSH PROMISE header? From reading

.NET 4.6 HttpResponse.PushPromise methods to manage http/2 PUSH_PROMISE header

谁说胖子不能爱 提交于 2019-12-08 07:16:31
问题 I am a bit confused about PUSH PROMISE http/2 header handling in .NET4.6 . When I look HttpResponse.PushPromise there are two overloads: One that accepts path to resource public void PushPromise(string path) - am assuming resource is then read and binary sent across to client. Second public void PushPromise(string path, string method, NameValueCollection headers) that accepts sting method and NameValueCollection headers which I am failing to understand. Why would I want to pass method

Setting the “Windows Security” dialog owner during a Client Certificate involving SslStream.AuthenticateAsClient()

梦想的初衷 提交于 2019-12-08 00:44:29
问题 Some background first Upon calling SslStream.AuthenticateAsClient() to initiate TLS/SSL handshake, the user can be presented with this following "Windows Security" dialog: Windows security: This application needs to use a cryptographic key This happens when both these following reasons are met: The SSL server to which the client is attempting to connect to requested a client certificate as part of the TLS/SSL handshake. The X509Certificate passed via the second argument of SslStream

How can I change a .NET standard library to a .NET framework library?

偶尔善良 提交于 2019-12-06 16:52:26
问题 I'm writing a class library for a simple parser in C#. When I first created it, I used .NET standard 2.0, but now I need to migrate it to .NET 4.6 both to conform to the other projects in my solution and in order to use NUnit. I tried to follow the instructions in the Microsoft documentation, but when I try to select another framework in the properties, I can only find other .NET standard versions. How can I migrate it? Will I need to manually edit the .csproj file? 回答1: Open up the project

Error string encoding (Windows 10 + Visual Studio 2015 + Net 4.6)

♀尐吖头ヾ 提交于 2019-12-05 06:58:41
My code: Keys = new Dictionary<string, string>(); Keys.Add("Набег_0", "raid_0"); When I get Keys.ElementAt(0) , I have this: {[Íàáåã_0, raid_0]} . Of course, when I run the program, key = "Набег_0" is not defined and the program crashes with a System.Collections.Generic.KeyNotFoundException This code worked fine when I had Windows 8.1 + Visual Studio 2013 + net 3.5 How do I fix this? You somehow convinced the C# compiler that your source code was written in code page 1251, the default system code page in Eastern Europe and Russia. That's usually caused by the text file missing the utf-8 BOM.

How can I change a .NET standard library to a .NET framework library?

自古美人都是妖i 提交于 2019-12-04 23:52:47
I'm writing a class library for a simple parser in C#. When I first created it, I used .NET standard 2.0, but now I need to migrate it to .NET 4.6 both to conform to the other projects in my solution and in order to use NUnit. I tried to follow the instructions in the Microsoft documentation , but when I try to select another framework in the properties, I can only find other .NET standard versions. How can I migrate it? Will I need to manually edit the .csproj file? Open up the project file (.csproj) and change the TargetFramework to net462 <PropertyGroup> <TargetFramework>net462<

RyuJit producing incorrect results

戏子无情 提交于 2019-12-04 09:07:25
问题 After recently upgrading to .net 4.6 we discovered a bug where RyuJit produces incorrect results, we were able to work around the issue for now by adding useLegacyJit enabled="true" to the app.config. How can I debug the machine code generated by the following? I created a new console project in VS 2015 RTM, set to Release, Any CPU, unchecked Prefer 32 bit, running with and without debugger attached produces the same result. using System; using System.Runtime.CompilerServices; namespace

ASP.NET 5 web application as Azure Web Role?

北战南征 提交于 2019-12-04 00:41:48
We have a ASP.NET 5 web application in our solution. Typically, we could right click on the Cloud Service "Roles" item and add a new role from an existing project in the solution. But it cannot identity this project as a Web Role: How are we able to host a ASP.NET 5 project in a Azure Web Role? Edit: We are using Azure SDK 2.7 Sorry, we don't support WebRoles at the moment. You might* be able to hack your way around but officially there is no support. That means that any hack you do, will be in a text editor, not from tooling. However, you can use an Azure WebSite instead. That's fully