Cheers,
Christian
the Exception is :
The formatter threw an exception while trying to deserialize the message: Error while trying to deserialize parameter http://tempuri.org/:GetUserPhotoResult. There was an error deserializing the object of type System.Drawing.Bitmap
And, it is work well in Feb WinFX, now our platform is May WinFX.
It is strange, when we let the PC's NETWORK connection enable, is also work well.
but, it will throw exception when we let the PC's NETWORK connection disabled.
Please help me.. What can we do?
Thanks!
If yes, please try not to post several entries re. the same issue, thx.
Anyway did my answer in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=580664&SiteID=1 help you in any way?
If not, then please post your client and service config here.
Cheers,
Christian
I am Soryy for the same posts.
That is the config file. it use the HttpBingding. Now only few picture can to transform successful.
<appSettings>
<add key="UserProfileServiceAddress" value="http://localhost:1982/UserProfileService"/>
</appSettings>
<system.serviceModel>
<diagnostics wmiProviderEnabled="true" performanceCountersEnabled="true" />
<services>
<service name="ProjectHelen.Server.UserProfileService">
<endpoint address=""
binding="basicHttpBinding"
contract="ProjectHelen.Server.Contracts.IUserProfileService" />
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="maxMessageSizeTcpBinding"
closeTimeout="00:00:10"
openTimeout="00:00:20"
receiveTimeout="00:00:30"
sendTimeout="00:00:40"
maxConnections="200" >
</binding>
</netTcpBinding>
<customBinding>
<binding name="reliableSessionTcpBinding">
<reliableSession/>
<binaryMessageEncoding/>
<!--<tcpTransport maxBufferSize="10485760"
maxBufferPoolSize="10485760"
maxMessageSize="10485760"/>-->
<tcpTransport />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
From the SDK:
Thank you, but...
I also add
<basicHttpBinding>
<binding name="maxMessageHttp" maxBufferSize="10485760" maxBufferPoolSize="10485760" maxReceivedMessageSize="10485760">
<readerQuotas maxArrayLength="800000"/>
</binding>
</basicHttpBinding>
But, no effect.
Now, one picture (13k) is transformed successfully, but other picture(one is 5K) can not be successful. May be the problem is not caused by size.
Now, Only the one picture can work well, any other one will be failed.
use the SvcTraceViewer can log the exception, but can not provide some help informations.
Very strange.
Cheers,
Christian
Thank you, Now, We solve it.
transform Stream instead of the Bitmap is likely ok!
but, i did not know why..
May you show me how do you have change to Stream Object?
I have same problem, bu when tranfer Stream Object instead of Bitmap, the received Stream is unusable, length property thow and exception.
Thanks