I would like to use Blender 2.78c (64bit, from zip file) to perform rendering tasks on my IIS7 server running at a Win7 machine. The server uses ASP.NET and C# to create a new process which starts Blender in the command line and renders a predefined scene. Basically the process calls
C:\path-to-blender\blender.exe -b -noaudio file-with-a-python-script-to-render.blend -- some_input_arguments
Everything works fine while I am locally in the Debug mode using Visual Studio's internal IIS Express. I get nice renderings, no errors and no problems. However, once published and executed from the IIS the Blender fails to start. It crashes with the following stderr:
Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [WinError 6] The handle is invalid Current thread 0x00002f78 (most recent call first):
It seems there is a problem initializing Python for Blender. Blender folder and its python subfolder are owned by the user account of the web worker, so that should be no problem. I am not sure if this is the right place to ask, but all my search on this topic failed yet. I only found this https://stackoverflow.com/questions/38725037/deploy-blender-to-azure-app which does not provide a good answer. I hope someone can help ...