C
celoftis
Using VS2005, VB.NET,
I have an application that makes several webservice calls. These
services are on a network that requires authentication of login
credentails. As the application starts the user is prompted for these
login credentials...
In VS2005 when I have the Configuration Manager set to "Debug" and
attemtpt to logon, good credentails get verified correctly - but then
I change the Configuration Manager to be "Release" the same valid
credentials always fail - anyone have any idea why I can't get my
credentials to validate under "Release".
Here is a snippet of code that I use to verify the user credentails:
Private Sub PingWebService()
Try
Dim objWebService As New myWebService
Me.oNetworkCredential = New NetworkCredential
Me.oNetworkCredential.UserName = "validUserTest"
Me.oNetworkCredential.Password = "validPasswordTest"
Me.oNetworkCredential.Domain =
ConfigurationManager.AppSettings("LoginDomain")
objWebService.Credentials = Me.oNetworkCredential
Dim strReturnValue As String = Nothing
strReturnValue = objWebService.alive()
If strReturnValue.ToUpper = "HELLO" Then
Me.bCredentialsOk = True
Else
Me.bCredentialsOk = False
End If
objWebService.Dispose()
objWebService = Nothing
Catch we As WebException
Me.bCredentialsOk = False
RaiseEvent LogError("PingWebService - WebException",
we.ToString)
Catch ex As Exception
Me.bCredentialsOk = False
RaiseEvent LogError("PingWebService", ex.ToString)
End Try
End Sub
I have an application that makes several webservice calls. These
services are on a network that requires authentication of login
credentails. As the application starts the user is prompted for these
login credentials...
In VS2005 when I have the Configuration Manager set to "Debug" and
attemtpt to logon, good credentails get verified correctly - but then
I change the Configuration Manager to be "Release" the same valid
credentials always fail - anyone have any idea why I can't get my
credentials to validate under "Release".
Here is a snippet of code that I use to verify the user credentails:
Private Sub PingWebService()
Try
Dim objWebService As New myWebService
Me.oNetworkCredential = New NetworkCredential
Me.oNetworkCredential.UserName = "validUserTest"
Me.oNetworkCredential.Password = "validPasswordTest"
Me.oNetworkCredential.Domain =
ConfigurationManager.AppSettings("LoginDomain")
objWebService.Credentials = Me.oNetworkCredential
Dim strReturnValue As String = Nothing
strReturnValue = objWebService.alive()
If strReturnValue.ToUpper = "HELLO" Then
Me.bCredentialsOk = True
Else
Me.bCredentialsOk = False
End If
objWebService.Dispose()
objWebService = Nothing
Catch we As WebException
Me.bCredentialsOk = False
RaiseEvent LogError("PingWebService - WebException",
we.ToString)
Catch ex As Exception
Me.bCredentialsOk = False
RaiseEvent LogError("PingWebService", ex.ToString)
End Try
End Sub