Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproduction of issue #897 #1120

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions ElasticApmAgent.sln
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "files", "files", "{B406113B
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
build.bat = build.bat
build.sh = build.sh
CHANGELOG.asciidoc = CHANGELOG.asciidoc
codecov.yml = codecov.yml
CONTRIBUTING.md = CONTRIBUTING.md
Directory.Build.props = Directory.Build.props
dotnet-tools.json = dotnet-tools.json
global.json = global.json
LICENSE = LICENSE
README.md = README.md
RELEASING.md = RELEASING.md
build.bat = build.bat
build.sh = build.sh
dotnet-tools.json = dotnet-tools.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.PerfTests", "test\Elastic.Apm.PerfTests\Elastic.Apm.PerfTests.csproj", "{F069CE99-F418-4BC2-9E44-8F03497D8DA8}"
Expand Down Expand Up @@ -99,19 +99,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.GrpcClient", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.Grpc.Tests", "test\Elastic.Apm.Grpc.Tests\Elastic.Apm.Grpc.Tests.csproj", "{3AD5584E-057A-4C52-84EA-32A9BBE12F03}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Apm.Extensions.Hosting.Tests", "test\Elastic.Apm.Extensions.Hosting.Tests\Elastic.Apm.Extensions.Hosting.Tests.csproj", "{3CCB9193-8416-49AF-A1A3-8D1118CFB25B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.Extensions.Hosting.Tests", "test\Elastic.Apm.Extensions.Hosting.Tests\Elastic.Apm.Extensions.Hosting.Tests.csproj", "{3CCB9193-8416-49AF-A1A3-8D1118CFB25B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.StackExchange.Redis", "src\Elastic.Apm.StackExchange.Redis\Elastic.Apm.StackExchange.Redis.csproj", "{38227C61-EFFB-4B00-814B-A158000A5F55}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Apm.StackExchange.Redis", "src\Elastic.Apm.StackExchange.Redis\Elastic.Apm.StackExchange.Redis.csproj", "{38227C61-EFFB-4B00-814B-A158000A5F55}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchangeRedisSample", "sample\StackExchangeRedisSample\StackExchangeRedisSample.csproj", "{9FBC8D8C-E600-464D-AE4E-AC1FB59485F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchangeRedisSample", "sample\StackExchangeRedisSample\StackExchangeRedisSample.csproj", "{9FBC8D8C-E600-464D-AE4E-AC1FB59485F6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.StackExchange.Redis.Tests", "test\Elastic.Apm.StackExchange.Redis.Tests\Elastic.Apm.StackExchange.Redis.Tests.csproj", "{6D413E0A-1CB7-4A2D-8E99-DB4F58D3463E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Apm.StackExchange.Redis.Tests", "test\Elastic.Apm.StackExchange.Redis.Tests\Elastic.Apm.StackExchange.Redis.Tests.csproj", "{6D413E0A-1CB7-4A2D-8E99-DB4F58D3463E}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "scripts", "build\scripts\scripts.fsproj", "{CB623206-F69E-4004-8527-D4B971AA981A}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "scripts", "build\scripts\scripts.fsproj", "{CB623206-F69E-4004-8527-D4B971AA981A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.Specification", "src\Elastic.Apm.Specification\Elastic.Apm.Specification.csproj", "{5D076C7F-1F8B-4B11-9910-48717D133963}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Apm.Specification", "src\Elastic.Apm.Specification\Elastic.Apm.Specification.csproj", "{5D076C7F-1F8B-4B11-9910-48717D133963}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm.AspNetCore.Static.Tests", "test\Elastic.Apm.AspNetCore.Static.Tests\Elastic.Apm.AspNetCore.Static.Tests.csproj", "{2250D888-E4CC-4B2B-AF31-5C78D76EC73D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Apm.AspNetCore.Static.Tests", "test\Elastic.Apm.AspNetCore.Static.Tests\Elastic.Apm.AspNetCore.Static.Tests.csproj", "{2250D888-E4CC-4B2B-AF31-5C78D76EC73D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleAspNetCoreTargetingFrameworkApp", "sample\SampleAspNetCoreTargetingFrameworkApp\SampleAspNetCoreTargetingFrameworkApp.csproj", "{18206F14-0B91-42A4-9CF6-126626C8D5AC}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Expand Down Expand Up @@ -274,6 +276,10 @@ Global
{2250D888-E4CC-4B2B-AF31-5C78D76EC73D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2250D888-E4CC-4B2B-AF31-5C78D76EC73D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2250D888-E4CC-4B2B-AF31-5C78D76EC73D}.Release|Any CPU.Build.0 = Release|Any CPU
{18206F14-0B91-42A4-9CF6-126626C8D5AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18206F14-0B91-42A4-9CF6-126626C8D5AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18206F14-0B91-42A4-9CF6-126626C8D5AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18206F14-0B91-42A4-9CF6-126626C8D5AC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -317,6 +323,7 @@ Global
{CB623206-F69E-4004-8527-D4B971AA981A} = {B406113B-0917-4531-AFEE-66DDB952590F}
{5D076C7F-1F8B-4B11-9910-48717D133963} = {3734A52F-2222-454B-BF58-1BA5C1F29D77}
{2250D888-E4CC-4B2B-AF31-5C78D76EC73D} = {267A241E-571F-458F-B04C-B6C4DE79E735}
{18206F14-0B91-42A4-9CF6-126626C8D5AC} = {3C791D9C-6F19-4F46-B367-2EC0F818762D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {69E02FD9-C9DE-412C-AB6B-5B8BECC6BFA5}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Licensed to Elasticsearch B.V under
// one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

using Microsoft.AspNetCore.Mvc;

namespace SampleAspNetCoreApp.Areas.MyArea.Controllers
{
[Area("MyArea")]
public class HomeController : Controller
{
// GET
public IActionResult Index() => View();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@{
ViewData["Title"] = "MyArea Home Page";
}
@model List<string>

<br/>
<div class="alert alert-info" role="alert">
This is an area home page.
</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Licensed to Elasticsearch B.V under
// one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

using Microsoft.AspNetCore.Mvc;

namespace SampleAspNetCoreApp.Areas.MyOtherArea.Controllers
{
[Area("MyOtherArea")]
public class HomeController : Controller
{
// GET
public IActionResult Index() => View();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@{
ViewData["Title"] = "MyOtherArea Home Page";
}
@model List<string>

<br/>
<div class="alert alert-info" role="alert">
This is another area home page that has its own route.
</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;

namespace SampleAspNetCoreApp.Controllers
{
public class AccountController : Controller
{
private readonly SignInManager<IdentityUser> _signInManager;
private readonly UserManager<IdentityUser> _userManager;

public AccountController(UserManager<IdentityUser> userManager, SignInManager<IdentityUser> signInManager) =>
(_userManager, _signInManager) = (userManager, signInManager);

public IActionResult Login() => View();

[HttpPost]
public async Task<IActionResult> LoginUser([FromForm] string userName, [FromForm] string password)
{
var res = await _signInManager.PasswordSignInAsync(userName, password, true, false);

if (res.Succeeded)
return Redirect("/Home/Index");

return View("Login");
}

public IActionResult Register() => View();

[HttpPost]
public async Task<IActionResult> RegisterUser([FromForm] string userName, [FromForm] string password)
{
var newUser = new IdentityUser { UserName = userName };
var res = await _userManager.CreateAsync(newUser, password);

if (res.Succeeded)
ViewData["msg"] = "User registered, now you can log in";
else
ViewData["msg"] = $"Failed registering user: {res.Errors.First().Description}";

return View("Register");
}

public async Task<IActionResult> LogOut()
{
await _signInManager.SignOutAsync();
return Redirect("/Home/Index");
}
}
}
Loading