warrenbuckley / IIS-Express-Code

This is an extension for Visual Studio Code that the current folder opened in VS Code can be run as a website using IIS Express
71 stars 20 forks source link

Support for Managed pipeline mode Classic #654

Open warlike1985 opened 2 years ago

warlike1985 commented 2 years ago

Hello @warrenbuckley

Thank you for your work! I have to use Classic pipeline mode our project and can't set this mode.

// Based on the CLR chosen use the correct built in AppPools shipping with IISExpress
const appPool = this._args.clr === settings.clrVersion.v40 ? "Clr4IntegratedAppPool" : "Clr2IntegratedAppPool";

this extra option handle this in IISExpress.ts:

const appPool = this._args.clr === settings.poolVersion.Integrated ? settings.clrVersion.v40 ? "Clr4IntegratedAppPool" : "Clr2IntegratedAppPool" : settings.clrVersion.v40 ? "Clr4ClassicAppPool" : "Clr2ClassicAppPool";

what do you think?

Thanks

warrenbuckley commented 6 months ago

✨✨ Here's an AI-assisted sketch of how you might approach this issue saved by @warrenbuckley using Copilot Workspace v0.17

Topic
Does the IISExpress.ts file include an option to set the Classic pipeline mode based on the CLR version?
Before
* No, the `src/IISExpress.ts` file does not include an option to set the Classic pipeline mode based on the CLR version. The file currently only supports setting the application pool to either "Clr4IntegratedAppPool" or "Clr2IntegratedAppPool" based on the CLR version, without an option for Classic pipeline mode. * The file `src/iisexpress-schema.json` which defines the JSON schema for IIS Express configuration does not include properties related to setting the Classic pipeline mode.
After
* Yes, the `src/IISExpress.ts` file now includes an option to set the Classic pipeline mode based on the CLR version. * The file `src/iisexpress-schema.json` is updated to include properties related to setting the Classic pipeline mode.
Plan
* `src/IISExpress.ts` (CHANGE) - Update the `appPool` assignment logic to include an option for setting the Classic pipeline mode based on the CLR version. - Ensure the logic for the `appPool` const is readable rather than using a single line multiple ternary - Add a new enum value for the Classic pipeline mode in the `clrVersion` enum. - Adjust the `IExpressArguments` interface to include a new property for the pipeline mode. * `src/iisexpress-schema.json` (CHANGE) - Add new properties related to setting the Classic pipeline mode in the JSON schema. * `src/settings.ts` (CHANGE) - Update the `getSettings` function to handle the new Classic pipeline mode option from the configuration file.
Sketch of implementation
[View the changes](https://copilot-workspace.githubnext.com/warrenbuckley/IIS-Express-Code/issues/654?shareId=ad015faf-48db-4866-ae0c-df57b3d14a08)
Details
Code analyzed at b0661624da46f3b85dd6f5f74eabbca04ec9aad7
warrenbuckley commented 6 months ago

HI @warlike1985 Thanks for your code suggestion, I just got access to the new GitHub Copilot Workspaces and have tried this out on this issue. Hence the long comment above ⬆️