possibly a simple question

S

SP

I have a web service application which uses 3rd party assemblies. I recently
upgraded my solution to use .NET Framework 2.0 instead of .NET Framework
1.1. The 3rd party assemblies that I refer are built on .NET Framework 1.1
(but they are supposed to work under .NET Framework 2.0)

Since upgradin the solution, I get an error saying :

System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.InvalidOperationException: There was an error
generating the XML document. ---> System.InvalidOperationException: <Details
of a datatype from 3rd party assembly> does not implement IXmlSerializable
interface therefore can not proceed with serialization.

I tried to get to the bottom of this but could not. Now I have started
thinking that this might be because of the assembly mismatch, so my question
is :

In my solution, I want to update the references to the 3rd part assembly to
use .NET Framework 2.0 as runtime version. I do not want to apply the policy
as a blanket on the machine because if some other application is using these
3rd party assemblies, I want to let it continue on .NET Framework 2.0. Can
someone tell me how to configure this?

TIA,

--SP
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

SP said:
I have a web service application which uses 3rd party assemblies. I recently
upgraded my solution to use .NET Framework 2.0 instead of .NET Framework
1.1. The 3rd party assemblies that I refer are built on .NET Framework 1.1
(but they are supposed to work under .NET Framework 2.0)

Since upgradin the solution, I get an error saying :

System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.InvalidOperationException: There was an error
generating the XML document. ---> System.InvalidOperationException: <Details
of a datatype from 3rd party assembly> does not implement IXmlSerializable
interface therefore can not proceed with serialization.

I tried to get to the bottom of this but could not. Now I have started
thinking that this might be because of the assembly mismatch, so my question
is :

In my solution, I want to update the references to the 3rd part assembly to
use .NET Framework 2.0 as runtime version. I do not want to apply the policy
as a blanket on the machine because if some other application is using these
3rd party assemblies, I want to let it continue on .NET Framework 2.0. Can
someone tell me how to configure this?

TIA,

--SP

An application can only run under one specific framework. If your
application runs under framework 2.0, any assemblies that it loads also
runs under framework 2.0.
 
R

Ram

An application can only run under one specific framework. If your
application runs under framework 2.0, any assemblies that it loads also
runs under framework 2.0.

Hey SP,
Have you tried using these 3rd party assemblies in a 1.1 WebService?
Although what Andersson wrote is true, if I'm not mistaken you can
configure the .Net to run your 2.0 WebService as 1.1 (to check if the
3rd party assemblies really work).

--sternr
 
S

SP

Yes they really work in 1.1
The problem has started appearing only after upgrade. I was also of the
opinion that Goran is correct. I did look in debugger to see if it shows a
message about loading 1.1 assemblies and it did not. If I browse to the
solution explorer and see the properties for the reference added in my
project, it lists the "runtime version" as 1.1.4322. That was the only
reason for my concern. (The help line on the bottom panel for runtime
version says its actually "Version of the .NET runtime this assembly was
compiled against.")

As far as the whole setup is concerned, this was working well in 1.1. The
only changes are to make the solution compile under 2.0.

I was almost tempted to uninstall .NET Framework 1.1 and see if it makes any
difference. (as I can do it on XP)

--SP

An application can only run under one specific framework. If your
application runs under framework 2.0, any assemblies that it loads also
runs under framework 2.0.

Hey SP,
Have you tried using these 3rd party assemblies in a 1.1 WebService?
Although what Andersson wrote is true, if I'm not mistaken you can
configure the .Net to run your 2.0 WebService as 1.1 (to check if the
3rd party assemblies really work).

--sternr
 
S

SP

I have (I think) found out the problem.

I put stuff into the dataset to pass across the web service. The dataset is
(XML) serializable in .NET Framework 2.0 hence it applies the XML
serialization to it. When adding the tables, I change the datatypes of the
columns to the .NET types, however when I actually add the data in those
tables, a row is an array of objects and the particular object is still of
the 3rd party data type which is not XML Serializable.

If this is correct, am I right in thinking that the DataType of a column in
the data table plays no role when it comes to XMLSerializing the comlete
table

--SP
 

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

Top