ASP.Net Web Service not allowing Windows Service to Call A Function
I have a Windows XP (SP3) development box with IIS on it. I have my ASP.Net website setup in IIS and hav开发者_JS百科e tested access to it. I created a Windows Service project which has a web reference to the local IIS and picks up the wsdl and displays all of the functions properly. I add my code for a timer to execute a specific function on the web service that synchronizes data. I have a few service log entries that are made to keep track of the progress of each step and when it attempts to execute the web service function, it does nothing. I followed an MSDN example of how to schedule ASP.Net web service code in a Windows Service but after following their example, mine does not work. Any help would be greatly appreciated.
I am assuming the Local System account that the service is using to login does not have access to the web service? If this is the case, can someone tell me how to grant access for the local system account?
Try using a regular user account to run your windows service instead of the built in Local System account. In the first instance, use your own account, just to make sure it works. Once you've established that your problem is permissions related, then go ahead and create a specific user account for running your service.
If it ever gets to the stage where your windows service and ASP.Net web service run on different boxes, then the built in Local System account won't be appropriate anyway.
精彩评论