469,645 Members | 1,188 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Web service method call exception

dpp

Hi

I am calling a method of a .NET component from both win forms and web
service applications.

Strangly, it is working fine from win forms application, but when i
call the same method (same code with same input values) of that . NET
component from the web service method it is giving the following
exception,

[System.ArgumentException] {"Object type cannot be converted to target

type." }

_remoteStackTraceString "\nServer stack trace: \n at
System.Reflection.RuntimeFieldInfo.InternalSetValu e(Object obj, Object
val, BindingFlags invokeAttr, Binder binder, CultureInfo culture,
Boolean requiresAccessCheck, Boolean isBinderDefault)\r\n at
System.Runtime.Serialization.FormatterServices.Ser ializationSetValue(MemberInfo
fi, Object target, Object value)\r\n at
System.Runtime.Serialization.FormatterServices.Pop ulateObjectMembers(Object
obj, MemberInfo[] members, Object[] data)\r\n at
System.Runtime.Serialization.Formatters.Soap.ReadO bjectInfo.PopulateObjectMembers()\r\n
at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.ParseObjectEnd(ParseRecord
pr)\r\n at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.ParseMemberEnd(ParseRecord
pr)\r\n at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.Parse(ParseRecord
pr)\r\n at
System.Runtime.Serialization.Formatters.Soap.SoapH andler.EndElement(String
prefix, String name, String urn)\r\n at
System.Runtime.Serialization.Formatters.Soap.SoapP arser.ParseXml()\r\n
at System.Runtime.Serialization.Formatters.Soap.SoapP arser.Run()\r\n at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.Deserialize(HeaderHandler
handler, ISerParser serParser)\r\n at
System.Runtime.Serialization.Formatters.Soap.SoapF ormatter.Deserialize(Stream
serializationStream, HeaderHandler handler)\r\n at
System.Runtime.Remoting.Channels.CoreChannel.Deser ializeSoapRequestMessage(Stream
inputStream, Header[] h, Boolean bStrictBinding, TypeFilterLevel
securityLevel)\r\n at
System.Runtime.Remoting.Channels.SoapServerFormatt erSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
requestStream, IMessage& responseMsg, ITransportHeaders&
responseHeaders, Stream& responseStream)\n\nException rethrown at [0]:
\n" string
I don't know how come the same code is working from the win forms
button action.

Can anyone please suggest me on might be the problem. I both cases i am
referencing the .NET dll to the application.

Thanks,
DPP
--
dpp
------------------------------------------------------------------------
dpp's Profile: http://www.hightechtalks.com/m268
View this thread: http://www.hightechtalks.com/t2286146

Nov 23 '05 #1
0 1137

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Hardy Wang | last post: by
2 posts views Thread by Richard Collette | last post: by
dmjpro
3 posts views Thread by dmjpro | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.