Skip to content

Change default server for samples from IIS Express to Kestrel #27630

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

Closed
captainsafia opened this issue Nov 8, 2020 · 9 comments · Fixed by #29517
Closed

Change default server for samples from IIS Express to Kestrel #27630

captainsafia opened this issue Nov 8, 2020 · 9 comments · Fixed by #29517
Assignees
Labels
affected-few This issue impacts only small number of customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed feature-platform Deprecated: Cross-cutting issues related to ASP.NET Core as a platform good first issue Good for newcomers. help wanted Up for grabs. We would accept a PR to help resolve this issue severity-nice-to-have This label is used by an internal tool
Milestone

Comments

@captainsafia
Copy link
Member

Samples that use IIS Express in the repo don't work because they rely on a native component that hasn't been built. For example, MVC and Blazor samples don't work when run with IIS Express. There's no guidance we currently can give to users to get samples working with IIS Express.

Although we can invest time in addressing the build process for the samples so we ensure the native component is always built before the samples are run, a quick fix is to edit the launchSettings.json files for the samples so they all use Kestrel for the server.

@captainsafia captainsafia added bug This issue describes a behavior which is not expected - a bug. area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework labels Nov 8, 2020
@ShreyasJejurkar
Copy link
Contributor

So the fix would be to remove IIS settings from launchSettings.json or to move it to 2nd option after kestral.

@captainsafia
Copy link
Member Author

So the fix would be to remove IIS settings from launchSettings.json or to move it to 2nd option after kestral.

Correct.

@ShreyasJejurkar
Copy link
Contributor

I moved the IIS Express option to 2nd one for some project, but VS still shows the IIS Express option to run, seems like VS don't respect the order of profiles in launchSettings.json. But if we delete the IIS Express option completely, then it shows the Kestral option as default.
I think we need to delete the IIS Express option completely from launchSettings to get this working as expected!
So will that be ok?

@captainsafia
Copy link
Member Author

@MCCshreyas Can you try renaming the command property for the IIS config to something other than IISExpress? Like "IIS Express".

@ShreyasJejurkar
Copy link
Contributor

@captainsafia I did that, but no effect on lunch selected option. See below screenshot.
image

@captainsafia captainsafia added good first issue Good for newcomers. help wanted Up for grabs. We would accept a PR to help resolve this issue labels Dec 3, 2020
@wtgodbe wtgodbe added feature-platform Deprecated: Cross-cutting issues related to ASP.NET Core as a platform and removed area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework labels Dec 7, 2020
@wtgodbe wtgodbe added affected-few This issue impacts only small number of customers severity-nice-to-have This label is used by an internal tool labels Dec 23, 2020
@gat786
Copy link

gat786 commented Jan 14, 2021

Hey,
I would like to take up this issue if it is not resolved yet. What should be done to solve this issue?

@captainsafia
Copy link
Member Author

@MCCshreyas I just gave re-ordering the profiles a try and it seemed to work for me on a standalone Blazor WASM project.

I moved the Kestrel server config before the IIS Express config and the selection in the run menu changed.

Is there a chance you updated the launch settings on a project where you had already launched via IIS?

@ShreyasJejurkar
Copy link
Contributor

Ohh I will give try with reordering as you suggested!

@ShreyasJejurkar
Copy link
Contributor

@captainsafia yeah. It did work. But I needed to delete the .vs folder at the root to get that working. I will open PR for this!

@Tratcher Tratcher added this to the 6.0-preview1 milestone Jan 24, 2021
@mkArtakMSFT mkArtakMSFT added the Done This issue has been fixed label Jan 26, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 28, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-few This issue impacts only small number of customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed feature-platform Deprecated: Cross-cutting issues related to ASP.NET Core as a platform good first issue Good for newcomers. help wanted Up for grabs. We would accept a PR to help resolve this issue severity-nice-to-have This label is used by an internal tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants