lextudio / httpplatformhandlerv2

HttpPlatformHandler v2
https://docs.lextudio.com/blog/httpplatformhandler-v2/
MIT License
24 stars 1 forks source link

iisexpress exits on configuration file load #5

Closed nevion closed 1 month ago

nevion commented 2 months ago

Is there an existing issue for this?

Describe the bug

I've looked and can't find the issue with process monitor. Basically any time I have httpPlatform in my iisexpress config , iisexpress exits quickly with :

iisexpress /site:test /config:iisexpress-vs.config

Filename: \?\C:\test-fastapi\iisexpress-vs.config Error:

So no error message. I have no idea why. Can you prepare a test-fastapi (or or test-flask case) with a complete iisexpress config and the V1 and V2 modules?

For python I'm using anaconda and I discovered you must disable identify profiles in IIS to overwrite the path variable and set it up like this:

      <httpPlatform
                processPath="C:\ProgramData\Anaconda3\python.exe"
                arguments="-m uvicorn --port %HTTP_PLATFORM_PORT% main:app"
                stdoutLogEnabled="true"
                stdoutLogFile=".\python.log"
                startupTimeLimit="20"
                processesPerApplication="4"
                >
                <environmentVariables>
                    <environmentVariable name="SERVER_PORT" value="%HTTP_PLATFORM_PORT%" />
                    <environmentVariable name="_CONDA_EXE" value="C:/ProgramData/Anaconda3\Scripts\conda.exe" />
                    <environmentVariable name="_CONDA_ROOT" value="C:/ProgramData/Anaconda3" />
                    <environmentVariable name="CONDA_DEFAULT_ENV" value="base" />
                    <environmentVariable name="CONDA_EXE" value="C:\ProgramData\Anaconda3\Scripts\conda.exe" />
                    <environmentVariable name="CONDA_PREFIX" value="C:\ProgramData\Anaconda3" />
                    <environmentVariable name="CONDA_PROMPT_MODIFIER" value="(base)" />
                    <environmentVariable name="CONDA_PYTHON_EXE" value="C:\ProgramData\Anaconda3\python.exe" />
                    <environmentVariable name="CONDA_SHLVL" value="1" />

                    <environmentVariable name="PATH" value="C:\ProgramData\Anaconda3\Library\bin;C:\ProgramData\Anaconda3\DLLs;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Library\mingw-w64\bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramData\Anaconda3\Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\ProgramData\Anaconda3\bin;C:\ProgramData\Anaconda3\condabin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\CCM;C:\Program Files\dotnet;C:\WINDOWS\System32\OpenSSH;C:\Program Files\nodejs;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PowerShell\7;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH" />
                </environmentVariables>
            </httpPlatform>

Expected Behavior

iisexpress starts and python is happy

Steps To Reproduce

No response

Exceptions (if any)

No response

HttpPlatformHandler Version

No response

Anything else?

No response

nevion commented 1 month ago

@lextm hey are you able to have the handler work with iis express as an example or otherwise know what the issue is?

lextudio-support commented 1 month ago

New issues are marked as low priority by default. Becoming our commercial customers, and then your reports are handled with higher priority after triage.

nevion commented 1 month ago

seems like something that should just go in documentation though and might apply to the v1 handler as well. I mean I can ask on stackoverflow as well though it does seem like you have one of the best understandings of this corner of iis; but the consulting case for an config example is pretty low. Anyway response rate is pretty consistent with the rest of github so far lol

lextm commented 1 month ago

We couldn't reproduce this. The FastAPI sample works fine on our test environment with IIS Express.