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

SecretManager broken when running in vscode #21

Closed
jrieken opened this issue Jan 27, 2016 · 5 comments
Closed

SecretManager broken when running in vscode #21

jrieken opened this issue Jan 27, 2016 · 5 comments

Comments

@jrieken
Copy link
Contributor

jrieken commented Jan 27, 2016

From @rspaulino on January 26, 2016 19:7

vscode 0.10.5

I have a project setup to use secret and if I run the project in VS15 or cmd using "dnx web" work but if I run it from VSCode Command Palette -> dnx:Run Command -> dnx web
I get the following error:

Application startup exception: System.ArgumentNullException: Value cannot be null.
Parameter name: paths
at System.IO.Path.Combine(String[] paths)
at Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(String userSecretsId) at Microsoft.Extensions.Configuration.ConfigurationExtensions.AddUserSecrets(IConfigurationBuilder configuration) at aspnet.Startup..ctor(IHostingEnvironment env) in c:\Users\rspaulino\Documents\vscodeprojects\aspnet\Startup.cs:line 23
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)

at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
at Microsoft.AspNet.Hosting.Startup.StartupLoader.LoadMethods(Type startupType, IList`1 diagnosticMessages)
at Microsoft.AspNet.Hosting.Internal.HostingEngine.EnsureStartup()
at Microsoft.AspNet.Hosting.Internal.HostingEngine.BuildApplication()

Hosting environment: Development
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.

this is line 23: builder.AddUserSecrets();
I have install secretmanager, set a secret, have the proper dependency as I mention this project work and compile when run from VS or command line the issue only happen when it's run from vscode.

here is a link of the example I follow: https://docs.asp.net/en/latest/security/app-secrets.html

Copied from original issue: microsoft/vscode#2395

@jrieken
Copy link
Contributor Author

jrieken commented Jan 27, 2016

From @rspaulino on January 27, 2016 5:10

I can confirm that the same code on Mac work but on Windows it doesn't.

@muratg
Copy link

muratg commented Feb 24, 2016

@jrieken Are you looking into this?

@DustinCampbell
Copy link
Member

This issue has grown rather stale and there've been a lot of changes in ASP .NET and .NET Core. Is this still a problem?

@BrennanConroy
Copy link
Member

I can't repro this anymore on Windows

@DustinCampbell
Copy link
Member

OK. I'm going to close this. It's been dormant a long while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants