web service - how to setup access
-
I have made a web service , I have put it on a web server . I want to use it in my application which I am working on my local machine . I have made web reference to it in my application and create dthe object in my web form . When I run my application I get error on the Invoke .what I need to do .. Please suggest... Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized. Source Error: Line 40: _ Line 41: Public Function HelloWorld() As String Line 42: Dim results() As Object = Me.Invoke("HelloWorld", New Object(-1) {}) Line 43: Return CType(results(0),String) Line 44: End Function thanks Source File: c:\inetpub\wwwroot\testWebApp1\Web References\hellowld\Reference.vb Line: 42 thanks
-
I have made a web service , I have put it on a web server . I want to use it in my application which I am working on my local machine . I have made web reference to it in my application and create dthe object in my web form . When I run my application I get error on the Invoke .what I need to do .. Please suggest... Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized. Source Error: Line 40: _ Line 41: Public Function HelloWorld() As String Line 42: Dim results() As Object = Me.Invoke("HelloWorld", New Object(-1) {}) Line 43: Return CType(results(0),String) Line 44: End Function thanks Source File: c:\inetpub\wwwroot\testWebApp1\Web References\hellowld\Reference.vb Line: 42 thanks
hai, try to access the web service directly without using that in a application. if you are able to invoke the method of you web service, then you can try the same in application. if you have any problem in accessing the service do the needed thing and try to do the same in application. if you are able to access the method directly and not by the application then check the security part of the web server where you have published it. you can do this easily.. cheers asithangae