I need to sync a sql server database with data hosted on another web server. I wrote a C# console Application to call a web service to give me the data hosted on the other web server. I set up a job to run every 10 minutes in task scheduler in "Server Manager" for Windows Server 2008 R2 Enterprise Edition.
If I run the console application myself then everything works as it should. If I run it in the Task Scheduler using my username it also runs as it should. However if I run it using the NETWORK SERVICE user, which is what I need to do, then the app stops running once I try to contact the web service.
Where do I give NETWORK SERVICE the permissions to call a web service?
Unable to connect to the remote server at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Dashboard_Import_Job.Clarizen.Clarizen.Login(String userName, String password, LoginOptions options) at Dashboard_Import_Job.Program.Main(String[] args)- RafiSystem.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 63.150.165.231:443 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& excepti)- Rafi