Problem running a Web Service in a Window Service
-
Hello Friends, I have made a Web Service and am using its reference in a Window Service that is being executed/called every 1 min. Through the Web Service, I am connecting to a remote MySQL Server database in which some of the table are accessed and data is being inserted/updated into them. As the current window service is still in development phase, so whenever i install the batch file of the window service every other day, just in order to check that whether the whole process is running fine or not, The web-service throws an error:-"Unable to connect to server". This error comes only when the web-service is unable to connect to the remote server :( . But the moment i rebuild the web-service at my my machine and then update (replace) it on the web-server and again add it as a reference to the window service then after rebuilding the window service when i run the batch installation file of window service; the whole process executes absolutely fine and the web-server database tables gets updated. I am not able to sort out why an unusual behavior is being shown by web service. Please help me out. Thanks Varun Sareen
-
Hello Friends, I have made a Web Service and am using its reference in a Window Service that is being executed/called every 1 min. Through the Web Service, I am connecting to a remote MySQL Server database in which some of the table are accessed and data is being inserted/updated into them. As the current window service is still in development phase, so whenever i install the batch file of the window service every other day, just in order to check that whether the whole process is running fine or not, The web-service throws an error:-"Unable to connect to server". This error comes only when the web-service is unable to connect to the remote server :( . But the moment i rebuild the web-service at my my machine and then update (replace) it on the web-server and again add it as a reference to the window service then after rebuilding the window service when i run the batch installation file of window service; the whole process executes absolutely fine and the web-server database tables gets updated. I am not able to sort out why an unusual behavior is being shown by web service. Please help me out. Thanks Varun Sareen
I believe your webservice reference includes the IP (is pointing directly) to the remote server. This is probably what is creating the problem. Remove this reference by changing your code to point to a dynamic IP and things should be fine.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
-
I believe your webservice reference includes the IP (is pointing directly) to the remote server. This is probably what is creating the problem. Remove this reference by changing your code to point to a dynamic IP and things should be fine.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
Thanks dear Abhinav for providing such clarity but are you talking about:-
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053");
the italicized text or the Server address in the connection string.?Thanks Varun Sareen
-
Thanks dear Abhinav for providing such clarity but are you talking about:-
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053");
the italicized text or the Server address in the connection string.?Thanks Varun Sareen
Er no I was not talking about the connection string. Have a look at the configuration file that includes the IP address you need to point to.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
-
Er no I was not talking about the connection string. Have a look at the configuration file that includes the IP address you need to point to.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
ok dear Abhinav