Running an executable on the server that connects to the database, extracts a username and password to be used in a call to a web service. This works on other servers, and I can run this from a command line or in a batch file. When I try to run this from xp_cmdshell the executable runs, but the call to the web service fails with the error 403 forbidden. Is there any reason why an external exe should connect different when called from a command line or from a SQL server command. As the executable starts fine and only when it is making a connection there is a problem I am at a loss here.
(the Previous text for this question, edited to try to make it more clear) We have an executable that connects to the database and at some point connects to a web service. This works fine when started from a batch file when we start this from within SQL the executable runs, but the connection to the web service returns the following 'The remote server returned an error: (403) Forbidden.' I know that the exe works, there are several functions that are run before the connection to the web service, and they all report back in the log file on the database. Does anyone know of a reason why the exe would react differently when run from SQL? (The same set-up is used on a different server and works fine)
We have tried a fresh install of SQL server and moving the exe file to another location. No difference for either solution. We are running the start of the procedure manually, run the exe from a batch file and complete the procedure manually when this has finished. Calling the batch file does not work either.
the expectation is that the connection to the web service is successful and following functions can use the connection to return results to be stored in the database.