Search

Asynchronous web services from Windows Forms using default credentials by Twiglet

Closed
as Not Reproducible Help for as Not Reproducible

2
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 115690
Opened: 5/8/2006 8:08:24 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When calling a web service asynchronously from a Windows Forms application - if the web service requires Windows Authentication (i.e. UseDefaultCredentials is true) then the callback event is not raised.

The callback event does fire if UseDefaultCredentials is set to false.
Details (expand)
Product Language
English
Version
Visual Studio 2005
Category
Other
Operating System
Windows XP Professional
Operating System Language
English
Steps to Reproduce
Create a new web service project that runs on IIS. Rename the service to Test and put a method in that returns a value - e.g.


Public Class Test
Inherits WebService

<WebMethod()>
Public Function HelloWorld() As String

return "Hello World"

End Function

End Class


Add a Windows Forms application to the solution and create a reference to the web method called MyProxy. Add a form to the application with a button on it called btnClickMe and add the following code to the form:


Private Sub btnClickMe_Click(sender as object, e as eventargs) Handles btnClickMe.Click

Dim myService as New MyProxy.Test

With myService
.UseDefaultCredentials = True
AddHandler .HelloWorldCompleted, AddressOf OnHelloWorldCompleted
.HelloWorldAsync()
End With

End Sub

Private Sub OnHelloWorldCompleted(sender as Object e as HelloWorldCompletedEventArgs)

Dim myService As MyProxy.Test = TryCast(sender, MyProxy.Test)

If myService IsNot Nothing Then
If e.Error IsNot Nothing Then
Throw e.Error
Else
MessageBox.Show(e.Result)
End If
End If

End Sub

Actual Results
The callback method (OnHelloWorldCompleted) will never be reached.
Expected Results
The callback method should fire and a messagebox should display the "Hello World" message.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 5/9/2006 at 3:18 AM
Thank you for your feedback. We are investigating this issue.

Thank you, Visual Studio Product Team.
Posted by Microsoft on 5/9/2006 at 6:22 AM
Thanks for your feedback, using Visual Studio 2005 (RTM.50727.42) we were unable to repro the bug with the scenario and/or steps provided. If you still see this issue occurring we would like to investigate this issue again. Please provide the exact steps/actions to reproduce the problem and we will re-investigate.

Thank you,
Shikha, Visual Studio Product Team