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

use launchSettings.json? #38

Closed
robertppn opened this issue Mar 2, 2018 · 11 comments
Closed

use launchSettings.json? #38

robertppn opened this issue Mar 2, 2018 · 11 comments

Comments

@robertppn
Copy link

Hi!
Is there a way to let the extension use the launchSettings.json file for startup parameters?

thx

@warrenbuckley
Copy link
Owner

Hi @robertppn
Is launchSettings.json something that comes from a typical .NET Core WebApplication?

I have yet to do much work with .NET Core. What does the file contain & how is it normally used?

@robertppn
Copy link
Author

Hi,
Well I'm no expert and I don't know if its specific for .Net core but its a Visual Studio file:

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments#development

And it's used for debugging/starting a web application in Visual studio.

@warrenbuckley
Copy link
Owner

Hi @robertppn
Looking at this file I am not entirely sure there is anything specific in this file that I can use from it.

If you know how IIS Express can use it or consume it from the command line then I will happily try to implement it, otherwise I will close this issue.

Thanks,
Warren

@robertppn
Copy link
Author

u could grab these settings from the file just as u parse the iisexpress.json file right?

"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:9180/",
"sslPort": 0
}
}

@warrenbuckley
Copy link
Owner

@robertppn I will have to do some investigation on how the full VS IDE uses & invokes IIS Express with these settings. This may take me a while to investigate & find out whats going on.

@Elrinth
Copy link

Elrinth commented Apr 25, 2018

I wanna have the iis express start on:
<binding protocol="http" bindingInformation=":8689:" />
instead of
<binding protocol="http" bindingInformation="*:8689:localhost" />
is this possible?

@sjetha-pason
Copy link

It's the applicationhost.config file that we need to target when trying to run an ASP.NET Core application.
Currently, this extension only looks for command-line parameters such as the path and the port, but doesn't allow for the settings file to contain a link to a config file, which is how Visual Studio gets things going.

There are a few elements besides this that need to be set up for it to work as intended form VSCode, I found this blog post that would help give direction to this: https://blog.lextudio.com/how-visual-studio-launches-iis-express-to-debug-asp-net-core-apps-d7fd3677e3c3

@warrenbuckley
Copy link
Owner

Thanks @sjetha-pason for the link, I will read it and investigate, otherwise feel free to submit a PR if you know what is exactly needed for this to be supported.

@loligans
Copy link

loligans commented Jul 4, 2020

This could be a really cool feature.

@warrenbuckley
Copy link
Owner

warrenbuckley commented Jul 5, 2020

.NET Core from VS uses an applicationhost.config file found at .vs folder at root of project

"C:\Program FIles\IIS Express\iisexpress.exe" /config:"C:\Users\warre\source\repos\NetCoreAppIISExpress\.vs\NetCoreAppIISExpress\config\applicationhost.config" site:"NetCoreAppIISExpress" /apppool:"NetCoreAppIISExpress AppPool"

image

@warrenbuckley
Copy link
Owner

Closing this issue as a duplicate as this will be solved by #33 and the community PR #36

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

5 participants