Trying to run C# on a web server

I have tried putting it in every directory i can think of Public, Root and whatever else would run a script I have tried setting the “Script” Tag inside index.html to it too but im pretty sure that only works for javascript, I saw in someone else’s project that he used a package.json file for js i copied its basic layout and hoped it would run it But it didn’t. Well… i get this error /tmp/.__glitch__start.sh: line 1: ./Main.cs: Permission denied I just need it to run is all i need, But i just checked in an online compiler that it throws a SecurityException Im using System.Net.Sockets and System. Net for Tcp Because http didn’t succeed(Most likely because it was not being run!) Anyone have any idea that could get my C# code running? Note: There is no html design because i just need a host to accept web requests

EDIT: Added a space between System and Net due to it being mistaken as a website

Update: I tried to run it via the console and it says cannot execute permission denied, i should have permission to run a script! Update2: Anything i do concerning making/reading/executing files and scripts gets me a permission denied error even in the console

I have solved my issue, I used node to run some js code to execute my C# script But this raises another problem both literally and figuratively, Do i have to manually upload mscorlib.dll?

the permission issue makes me think you’re trying to install stuff to a folder on the container that we don’t give access to, you should stick to working in the /app folder.

Im not actually installing anything i just needed to run a cs file

I got it to run, but now its saying System is not defined and using is not defined

My project is only meant to be a small database/authentication host so i can learn some correct usage of http it does not touch the filesystem whatsoever I need the System namespace to do anything at all!

if you’re missing the namespace and have the library that gives it to you then, yes, you likely need to manually upload it - you can wget it in the console it if you have the file on the web elsewhere

Yeah, i did that first, it still says its undefined even though it is a file in the correct path The system namespace is in mscorlib.dll So i copied the dll from my .NET framework and uploaded it

Thanks for responding, But i have decided glitch is not a good C# runner, so i have decided to use JS