我正在尝试将AGM Angular Google Maps(https://github.com/SebastianM/angular-google-maps)添加到我的Angular4项目中
随后的指南:https://github.com/SebastianM/angular-google-maps/blob/master/docs/getting-started.jade
我使用agm组件访问页面时遇到的错误:
core.es5.js:1084 ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'latitude' since it isn't a known property of 'agm-map'.
1. If 'agm-map' is an Angular component and it has 'latitude' input, then verify that it is part of this module.
2. If 'agm-map' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add …Run Code Online (Sandbox Code Playgroud) 我试图在 Visual Studio 模板应用程序中通过 Blazor 获取 Asp.Net Identity 登录,它仍然使用 Razor Pages 和 MVC 登录,但只能让它在事件上工作OnInitAsync,这没有用,因为它需要在按钮点击时完成,而不是在页面加载时完成。
我的失败代码是
protected async Task LoginTest()
{
await _SignInManager.SignInAsync(new ApplicationUser()
{ UserName = "test@test.com" }, true);
UriHelper.NavigateTo("/", true);
}
Run Code Online (Sandbox Code Playgroud)
我收到错误:
System.InvalidOperationException: The response headers cannot be modified because the response has already started.
at Microsoft.AspNetCore.HttpSys.Internal.HeaderCollection.ThrowIfReadOnly()
at Microsoft.AspNetCore.HttpSys.Internal.HeaderCollection.set_Item(String key, StringValues value)
at Microsoft.AspNetCore.Http.Internal.ResponseCookies.Append(String key, String value, CookieOptions options)
at Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.AppendResponseCookie(HttpContext context, String key, String value, CookieOptions options)
at Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler.HandleSignInAsync(ClaimsPrincipal user, AuthenticationProperties properties)
at Microsoft.AspNetCore.Authentication.AuthenticationService.SignInAsync(HttpContext context, String …Run Code Online (Sandbox Code Playgroud) 我正在使用一个Linux consumption计划.
我收到以下错误;
Exception: ModuleNotFoundError: No module named 'pyodbc'
我已经pyodbc在requirements.txt文件中添加了这个文件中的其他模块,比如azure-storage工作正常.
有没有人看过这个问题或者可以证实这是一个已知的bug?我看不到任何手动安装它的方法.
在这个re-factor阶段TDD是否可以一次性破坏多个现有测试。例如,要更改类的构造函数,并且必须修改使用该类的测试。
测试断言测试behaviour代码的性能,但是测试的实现arrange/act实际上是测试代码本身。
我想为了避免破坏多个测试,单元测试应该尽可能干燥,这意味着如果构造函数发生更改(如果可能),则应该需要一次更新。
我有一个配置了serilog的ASP.Net5 Web应用程序。在我的家庭控制器中,我打印警告,错误,详细和调试消息,但是在我的控制台中仅显示警告,错误和详细消息。缺少调试消息我的配置是:
public class Startup
{
public Startup(IHostingEnvironment env)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.ColoredConsole()
.WriteTo.RollingFile(Path.Combine(env.WebRootPath, "log-{Date}.txt"))
.CreateLogger();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddSerilog();
}
}
Run Code Online (Sandbox Code Playgroud)
我通过依赖项注入来消耗记录器,如下所示:
public class HomeController : Controller
{
private readonly ILogger _logger;
public HomeController(ILogger<HomeController> logger)
{
_logger = logger;
}
public async Task<IActionResult> Index()
{
_logger.LogWarning("Warning");
_logger.LogVerbose("Verbose");
_logger.LogDebug("Debug")
_logger.LogError("Error");
return View();
}
}
Run Code Online (Sandbox Code Playgroud)
我的日志窗口显示:
2016-04-13 12:41:24 [Warning] Warning
2016-04-13 12:41:24 [Debug] Verbose
2016-04-13 12:41:24 [Error] Error
Run Code Online (Sandbox Code Playgroud)
还有其他调试消息与ASP.Net函数中的构建有关。
谁能告诉我我在做什么错?谢谢。
angular ×1
asp.net ×1
asp.net-core ×1
c# ×1
pyodbc ×1
python ×1
serilog ×1
tdd ×1
unit-testing ×1