1

我正在使用我能找到的最新的代码示例和代码片段,并且我知道事情正在迅速变化和发展。

当我使用开箱即用的 Visual Studio“vNext ASP.NET Web 应用程序”模板时,身份验证和数据库服务就可以正常工作。

但是,我认为模板不再是最新的,我想使用最新的程序集和方法。

如果我尝试使用此处提到的“Microsoft.AspNet.Security.OAuth”:

https://stackoverflow.com/a/26532837/390480

那么我无法让 SQL Server 的身份验证和实体框架都工作。

发生的情况是某些方法或属性不再可用。

现在是否有任何使用 SQL 的身份验证和 EF 7 示例?

理想情况下,我想使用UseOAuthAuthorizationServer,但这似乎不再是一个选择,所以UseCookieAuthentication很好。

谢谢你。

更新 1:

我已经尝试了两个示例应用程序“音乐商店”和“身份示例”。

在我运行它们附带的名为 build.cmd 的文件之前,它们不会构建/运行。

所以我运行了这个文件,但忘记了我上次运行它时它损坏了我的系统,它再次损坏了我的系统。

现在 Visual Studio 不断显示一个消息框,上面写着:

The project system has encountered an error. 
An item with the caption "" already exists in the tree 
with the same sort order as the item being added.

同样在运行 build.cmd 之后,我现在收到数百个错误,例如:

Error   1   The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

不知道上次是怎么解决的。现在正在尝试再次修复。

更新 2:

我记得我现在是如何修复我的系统的。我在这里记录了步骤,现在再试一次。这是一个大约1小时的过程。

http://forums.asp.net/p/2013828/5795198.aspx?Re+Can+t+creat+new+project

4

1 回答 1

0

首先获取最新的 KRE

使用命令提示符(以管理员身份运行)

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString(' https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.ps1 '))"

右键单击您的项目并选择更新版本的 KRE!

http://i.stack.imgur.com/dxGth.png

将所有 project.json 包更新到 RC1

i.stack.imgur.com/YYAIe.png

ASP.Net 5 starter Web Template 的最后一部分在 Migration 文件夹下有迁移文件,从 beta1 到 RC,方法名称发生了一些变化(比如 GenerateValuesOnAdd 现在是 GenerateValueOnAdd)需要修复

你准备好了

**** 我更喜欢启动 ASP.NET 5 Empty 项目并逐步选择和测试所有内容,您也可以按照这种方式进行操作 ***

(抱歉,我想在这方面做得更好,但 stackoverflow 不允许我将链接或图像与我的代表一起放置)

于 2015-01-02T12:20:50.213 回答