I have successfully published a custom GP service from ArcMap. The GP tool is in C#. The built DLL was registered in both ArcGIS desktop and server through ESRIRegAsm. The tool run well in ArcMap. But when i run the service, I got the error "Error executing tool.: ERROR 000816: The tool is not valid." Any idea why?
My ArcGIS server version is 10.4.5524
Desktop version is 10.4.5524
.Net framework version is 4.5.1
PS: I also navigated to the directory on Server: C:\arcgisserver\directories\arcgissystem\arcgisinput\{my service name}.GPServer\extracted\v101..., and run the tool there in ArcMap, it run well.