dnx

View code changes without restarting the server

让人想犯罪 __ 提交于 2019-12-07 05:07:54
问题 We're using Visual Studio Code and DNX as follows. Command Line to Start Web Server dnx . web project.json > commands "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001" Note that we added carriage returns for readability. When we change a *.cshtml and refresh the browser, the changes show up in the browser. This is good. When we change a *.cs and refresh the browser, the changes do not show up in the browser. We expected that

Rijndael in class library (package) not available for .NET Core

别说谁变了你拦得住时间么 提交于 2019-12-07 04:02:38
问题 Please help me. Where to find the Rijndael Security Cryptography in .NET Core? What dependency I must to include in my class library (Package) project? 回答1: The Rijndael implementation is not (yet) ported to .NET Core. You could use AES (which is a subset of Rijndael) using the System.Security.Cryptography.Algorithms package which targets netstandard1.3 : var aes = System.Security.Cryptography.Aes.Create(); Note: you should only add this package dependency to the netstandard1.3 TFM, as it

How to call a RESTful API with ASP.NET 5

…衆ロ難τιáo~ 提交于 2019-12-06 22:41:39
问题 Working with ASP.NET 5 on my Mac in Visual Studio Code. I have a RESTful API I need to call and not sure exactly how to do it. I've seen many examples using WebClient, HttpClient, WebRequest and HttpWebRequest. I think my pain point is the dnxcore50 framework. Can someone please point me in the right direction with some code samples? 回答1: Here is an example about how to call a service. Please check the References and using carefully. One important thing you have to do is install the Web API

MVC 6 Web Api: Resolving the location header on a 201 (Created)

纵饮孤独 提交于 2019-12-06 21:55:17
问题 In Web Api 2.2, we could return the location header URL by returning from controller as follows: return Created(new Uri(Url.Link("GetClient", new { id = clientId })), clientReponseModel); Url.Link(..) would resolve the resource URL accordingly based on the controller name GetClient : In ASP.NET 5 MVC 6's Web Api, Url doesn't exist within the framework but the CreatedResult constructor does have the location parameter: return new CreatedResult("http://www.myapi.com/api/clients/" + clientId,

CS0433: The type 'List<T>' exists in both

与世无争的帅哥 提交于 2019-12-06 21:30:25
I try use .net core but I have a lot of diffrent problems. This is one of them. I use Ubuntu 14. Error code Microsoft.Dnx.Compilation.CSharp.RoslynCompilationException: /home/lukasz/Project/Commands.cs(10,16): DNX,Version=v4.5.1 error CS0433: The type 'List<T>' exists in both 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' /home/lukasz/Project/Commands.cs(10,21): DNX,Version=v4.5.1 error CS0433: The type 'List<T>' exists in both 'System.Collections, Version=4.0.10.0,

Changing the name of the output assembly and package using dnx/.net core

孤者浪人 提交于 2019-12-06 18:43:32
问题 I have a project which exists in a directory named Oracle and I would like the artifacts created to be called MyCompany.MyApp.Oracle instead of Oracle , what are my options for changing the output assembly name and nuget package name outside of changing the name of the directory? I currently have a MyCompany.MyApp.Oracle.xproj next to my project.json file I've also tried setting <AssemblyName>MyCompany.MyApp.Oracle</AssemblyName> in the xproj file but that didn't work I've also tried setting

Why is User.Identity null after login with AspNet.Identity 3.0

末鹿安然 提交于 2019-12-06 12:45:53
问题 I am using Microsofts AspNet.Identity 3.0 framework within the DNX RC1. With the help of some tutorials I have built a custom authentication system. After a successful password check some claims are created for the user and the Authentication will be set: var claimsPrincipal = await SignInManager.CreateUserPrincipalAsync(user); if (claimsPrincipal != null && claimsPrincipal.Identity != null) { // Set the claims to the user await HttpContext.Authentication.SignInAsync

Default service creation for ASP.NET 5 ServiceProvider

。_饼干妹妹 提交于 2019-12-06 06:20:23
问题 I'm using DNX and the default Microsoft.Extensions.DependencyInjection.ServiceProvider for DI. I am used to Ninject where if I haven't registered a service, it defaults to using the service type as the implementation type, e.g. if I haven't registered MyService and I ask the container for an instance of MyService (or it's a constructor parameter), it uses MyService as the implementation type. Is there a way to configure Microsoft.Extensions.DependencyInjection.ServiceProvider to behave

Make local TFS build agent to use v14 msbuild tools

点点圈 提交于 2019-12-06 05:02:35
问题 I've got a couple of ASP.NET vNext applications and I want my CI server to also be able to build them. Both my local machine and the CI server are running VS2015 RC. Then we've got VS Online and a local build controller - which is the server mentioned. However, I cannot get builds going since it seems to be looking for v12 tooling - which does not include anything DNX. So - building the solution gives: The Dnx Runtime package needs to be installed. See output window for more details It is

What parameters are showing undefined in this dnvm.ps1 command? Deployment to Azure Web Site Fails as a result

旧街凉风 提交于 2019-12-06 02:27:51
I have been developing a new ASP.NET 5 (MVC 6) website on Linux. I am using Git with Azure and have been able to successfully push it to SCM. However my deployment fails due to some undefined parameters. Hoping someone can tell me what the undefined parameters are in the command shown in the terminal output so I can modify the script and finish this process. I run the command # git push azure master The following is the output, auto deployment should happen after a successful commit. The commit works but when it tries to run the following command it fails. dnvm.ps1' " install undefined -arch