By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,805 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,805 IT Pros & Developers. It's quick & easy.

Call to webservice fails under Release configuration...

P: n/a
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
Dec 12 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.