There is no problem when calling the service directly, but inProgramChina siteCodeThe following error occurs when a Web Service is called:
Request failed due to HTTP status 401: Access denied.
Note:An error occurred while executing the current Web request. Check the stack trace information for details about the error and the source of the error in the code.
Exception details:System. net. webexception: The request failed due to HTTP status 401: Access denied.
Source error:
Row 63: [Return: system. xml. serialization. xmlelementattribute ("Get repair information (new) result") based on maintenance ticket number and user number] Row 64: public system. Data. dataset getmaintaininfonew (string inclueno, string struserno ){ Row 65: object [] Results = This. Invoke ("getmaintaininfonew", new object [] { Row 66: receiveno, Row 67: struserno }); |
After repeated searches, I finally learned that the IIS configuration must be "Allow Anonymous Access" when the web service is remotely called.