472,102 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,102 software developers and data experts.

Web service method call exception



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

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

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

Nov 23 '05 #1
0 1225

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
3 posts views Thread by dmjpro | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.