Re: Call to webservice fails under Release configuration...

Re: Call to webservice fails under Release configuration...

am 11.01.2008 22:40:24 von hzgt9b

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' Key being
added: 'http://rpc.xml.coldfusion:QueryBean'
at System.Collections.Hashtable.Insert(Object key, Object nvalue,
Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at
System.Xml.Serialization.XmlSerializationReader.AddReadCallb ack(String
name, String ns, Type type, XmlSerializationReadCallback read)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializati onReader1.InitCa=
llbacks()
at
System.Xml.Serialization.XmlSerializationReader.ReadReferenc ingElement(Strin=
g
name, String ns, Boolean elementCanBeType, String& fixupReference)
at
System.Xml.Serialization.XmlSerializationReader.ReadReferenc ingElement(Strin=
g
name, String ns, String& fixupReference)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializati onReader1.Read46=
_aliveResponse()
at
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectS erializer73.Dese=
rialize(XmlSerializationReader
reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadRes ponse(SoapClient=
Message
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke( String
methodName, Object[] parameters)
at myWebService.alive() in C:\Documents and Settings\...\Web
References\myWebServiceUrl\Reference.vb:line 132
at myApp.frmDomainLogin.PingWebService() in C:\Documents and
Settings\...\frmDomainLogin.vb:line 124

On Jan 7, 4:33=A0pm, "George Ter-Saakov" wrote:
> What is the exact error you getting?
> Are you running release version from the same machine? or you moving
> executable somewhere?
>
> George.
>
> "celoftis" wrote in message
>
> news:e24d7247-02ee-4906-8f8c-42f555f57689@s19g2000prg.google groups.com...
> Bump
>
> On Dec 31 2007, 10:41 am, celoftis wrote:
>
>
>
> > 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
>
> > wrote:
> > > 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 thes=
e
> > > > login credentials...
> > > > In VS2005 when I have the Configuration Manager set to "Debug" and
> > > > attemtpt to logon, good credentails get verified correctly - but the=
n
> > > > 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 =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 -