Re: Call to webservice fails under Release configuration...
am 07.01.2008 18:21:31 von hzgt9bBump
On Dec 31 2007, 10:41=A0am, celoftis
> After reading your questions it is apparent that I did not make clear
> that these web services are only being called by a windows app, not a
> web site. Please re-read my question from this perspective.
>
> On Dec 12, 4:07=A0pm, bruce barker
>
>
>
>
> > you don't give enough info to answer.
>
> > 1) what authenication are the websevices using? basic, ntlm, kerberos?
> > 2) what authenication is the web site using?
> > 3) is impersonation set in the web config?
> > 4) is the app pool (web.config) identity a domain account?
> > 5) is the test done from a browser on the web site server (local) or a
> > remote machine?
>
> > -- bruce (sqlwork.com)
>
> > "celoftis" wrote:
> > > 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:
>
> > > =A0 =A0 Private Sub PingWebService()
> > > =A0 =A0 =A0 =A0 Try
> > > =A0 =A0 =A0 =A0 =A0 =A0 Dim objWebService As New myWebService
> > > =A0 =A0 =A0 =A0 =A0 =A0 Me.oNetworkCredential =3D New NetworkCredentia=
l
> > > =A0 =A0 =A0 =A0 =A0 =A0 Me.oNetworkCredential.UserName =3D "validUserT=
est"
> > > =A0 =A0 =A0 =A0 =A0 =A0 Me.oNetworkCredential.Password =3D "validPassw=
ordTest"
> > > =A0 =A0 =A0 =A0 =A0 =A0 Me.oNetworkCredential.Domain =3D
> > > ConfigurationManager.AppSettings("LoginDomain")
> > > =A0 =A0 =A0 =A0 =A0 =A0 objWebService.Credentials =3D Me.oNetworkCrede=
ntial
> > > =A0 =A0 =A0 =A0 =A0 =A0 Dim strReturnValue As String =3D Nothing
> > > =A0 =A0 =A0 =A0 =A0 =A0 strReturnValue =3D objWebService.alive()
> > > =A0 =A0 =A0 =A0 =A0 =A0 If strReturnValue.ToUpper =3D "HELLO" Then
> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Me.bCredentialsOk =3D True
> > > =A0 =A0 =A0 =A0 =A0 =A0 Else
> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Me.bCredentialsOk =3D False
> > > =A0 =A0 =A0 =A0 =A0 =A0 End If
> > > =A0 =A0 =A0 =A0 =A0 =A0 objWebService.Dispose()
> > > =A0 =A0 =A0 =A0 =A0 =A0 objWebService =3D Nothing
> > > =A0 =A0 =A0 =A0 Catch we As WebException
> > > =A0 =A0 =A0 =A0 =A0 =A0 Me.bCredentialsOk =3D False
> > > =A0 =A0 =A0 =A0 =A0 =A0 RaiseEvent LogError("PingWebService - WebExcep=
tion",
> > > we.ToString)
> > > =A0 =A0 =A0 =A0 Catch ex As Exception
> > > =A0 =A0 =A0 =A0 =A0 =A0 Me.bCredentialsOk =3D False
> > > =A0 =A0 =A0 =A0 =A0 =A0 RaiseEvent LogError("PingWebService", ex.ToStr=
ing)
> > > =A0 =A0 =A0 =A0 End Try
> > > =A0 =A0 End Sub- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -