Re: Call to webservice fails under Release configuration...
am 15.01.2008 17:47:45 von hzgt9bOn Jan 11, 4:40=A0pm, celoftis
> Running on the same machine - through the VS IDE (See Build |
> Configuration Manager, "Active solution configuration" set to
> Debug=3Dexpected behavior, set to "Release"=3Dnever get authenticated)
> Here's the error message that I am trapping:
>
> System.InvalidOperationException: There is an error in XML document
> (4, 5). ---> System.ArgumentException: Item has already been added.
> Key in dictionary: 'http://rpc.xml.coldfusion:QueryBean'=A0Key being
> added: 'http://rpc.xml.coldfusion:QueryBean'
> =A0 =A0at System.Collections.Hashtable.Insert(Object key, Object nvalue,
> Boolean add)
> =A0 =A0at System.Collections.Hashtable.Add(Object key, Object value)
> =A0 =A0at
> System.Xml.Serialization.XmlSerializationReader.AddReadCallb ack(String
> name, String ns, Type type, XmlSerializationReadCallback read)
> =A0 =A0at
> Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializati onReader1.Init=
C=ADallbacks()
> =A0 =A0at
> System.Xml.Serialization.XmlSerializationReader.ReadReferenc ingElement(Str=
i=ADng
> name, String ns, Boolean elementCanBeType, String& fixupReference)
> =A0 =A0at
> System.Xml.Serialization.XmlSerializationReader.ReadReferenc ingElement(Str=
i=ADng
> name, String ns, String& fixupReference)
> =A0 =A0at
> Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializati onReader1.Read=
4=AD6_aliveResponse()
> =A0 =A0at
> Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectS erializer73.De=
s=ADerialize(XmlSerializationReader
> reader)
> =A0 =A0at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> xmlReader, String encodingStyle, XmlDeserializationEvents events)
> =A0 =A0--- End of inner exception stack trace ---
> =A0 =A0at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> xmlReader, String encodingStyle, XmlDeserializationEvents events)
> =A0 =A0at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> xmlReader, String encodingStyle)
> =A0 =A0at
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadRes ponse(SoapClie=
n=ADtMessage
> message, WebResponse response, Stream responseStream, Boolean
> asyncCall)
> =A0 =A0at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke( String
> methodName, Object[] parameters)
> =A0 =A0at myWebService.alive() in C:\Documents and Settings\...\Web
> References\myWebServiceUrl\Reference.vb:line 132
> =A0 =A0at myApp.frmDomainLogin.PingWebService() in C:\Documents and
> Settings\...\frmDomainLogin.vb:line 124
>
> On Jan 7, 4:33=A0pm, "George Ter-Saakov"
>
>
>
> > What is the exact error you getting?
> > Are you running release version from the same machine? or you moving
> > executable somewhere?
>
> > George.
>
> > "celoftis"
>
> >news:e24d7247-02ee-4906-8f8c-42f555f57689@s19g2000prg.googl egroups.com...=
> > Bump
>
> > On Dec 31 2007, 10:41 am, 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 pm, bruce barker
>
> > >
> > > > you don't give enough info to answer.
>
> > > > 1) what authenication are the websevices using? basic, ntlm, kerbero=
s?
> > > > 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 th=
ese
> > > > > login credentials...
> > > > > In VS2005 when I have the Configuration Manager set to "Debug" and=
> > > > > attemtpt to logon, good credentails get verified correctly - but t=
hen
> > > > > 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 credentail=
s:
>
> > > > > Private Sub PingWebService()
> > > > > Try
> > > > > Dim objWebService As New myWebService
> > > > > Me.oNetworkCredential =3D New NetworkCredential
> > > > > Me.oNetworkCredential.UserName =3D "validUserTest"
> > > > > Me.oNetworkCredential.Password =3D "validPasswordTest"
> > > > > Me.oNetworkCredential.Domain =3D
> > > > > ConfigurationManager.AppSettings("LoginDomain")
> > > > > objWebService.Credentials =3D Me.oNetworkCredential
> > > > > Dim strReturnValue As String =3D Nothing
> > > > > strReturnValue =3D objWebService.alive()
> > > > > If strReturnValue.ToUpper =3D "HELLO" Then
> > > > > Me.bCredentialsOk =3D True
> > > > > Else
> > > > > Me.bCredentialsOk =3D False
> > > > > End If
> > > > > objWebService.Dispose()
> > > > > objWebService =3D Nothing
> > > > > Catch we As WebException
> > > > > Me.bCredentialsOk =3D False
> > > > > RaiseEvent LogError("PingWebService - WebException",
> > > > > we.ToString)
> > > > > Catch ex As Exception
> > > > > Me.bCredentialsOk =3D False
> > > > > RaiseEvent LogError("PingWebService", ex.ToString)
> > > > > End Try
> > > > > End Sub- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
Bump (again)