Call to webservice fails under Release configuration...

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
 
B

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)
 
C

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.
 
C

celoftis

Bump

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.







- Show quoted text -
 
G

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.

Bump
 
C

celoftis

Running on the same machine - through the VS IDE (See Build |
Configuration Manager, "Active solution configuration" set to
Debug=expected behavior, set to "Release"=never 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.AddReadCallback(String
name, String ns, Type type, XmlSerializationReadCallback read)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.InitCallbacks()
at
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String
name, String ns, Boolean elementCanBeType, String& fixupReference)
at
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String
name, String ns, String& fixupReference)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read46_aliveResponse()
at
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer73.Deserialize(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.ReadResponse(SoapClientMessage
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
 
C

celoftis

Running on the same machine - through the VS IDE (See Build |
Configuration Manager, "Active solution configuration" set to
Debug=expected behavior, set to "Release"=never 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.AddReadCallback(String
name, String ns, Type type, XmlSerializationReadCallback read)
   at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.InitC­allbacks()
   at
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(Stri­ng
name, String ns, Boolean elementCanBeType, String& fixupReference)
   at
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(Stri­ng
name, String ns, String& fixupReference)
   at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read4­6_aliveResponse()
   at
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer73.Des­erialize(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.ReadResponse(SoapClien­tMessage
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

What is the exact error you getting?
Are you running release version from the same machine? or you moving
executable somewhere?
- Show quoted text -- Hide quoted text -

- Show quoted text -

Bump (again)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top