4

I'm trying to setup a .NET Core project using IIS(Internet Information Services). The project uses pythonnet to call functionalities written on Python. When I start the IIS site, and send a post request to it, I get this exception. enter image description here

I have added the Path environment variable to the site environment variables. I have tried changing the permissions to the Python folder.

The project works fine when started in Visual Studio 2019 using IIS Express. I'm expecting it to work the same way as on the hosted IIS server.

8
  • Hi have you installed pythonnet on the hosted server? Commented Aug 7, 2019 at 14:04
  • 1
    It is compiled for .NET Core and the dll is attached as Dependency to the project. Commented Aug 7, 2019 at 14:06
  • Could you share some details about the server configuration, such as whether you have configured it yourself or it is an Azure server for instance? Commented Aug 7, 2019 at 14:39
  • 1
    There are fundamental differences between IIS Express and IIS, blog.lextudio.com/… So "I'm expecting it to work the same way as on the hosted IIS server" is impossible. Talk to the original developers of that library and see what they recommend. Commented Aug 7, 2019 at 14:41
  • I have configured it myself. Also tested the project started in Visual Studio 2019 using IIS Express with the same Python installation and everything work as intended. Commented Aug 7, 2019 at 14:43

1 Answer 1

2

The solution is pretty simple. The problem was indeed with the permissions so I just switched The Application Pool Identity to Custom account and entered the Administrator account. Everything seems to work as intended now. enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.