Bonjour,
J'utilise une application Silverlight qui fait appel à un service WCF pour faire de l'Upload de fichiers. J'arrive bien à transférer des fichiers de petite taille en utilisant dans le fichier config le binding
1 2 3 4 5 6 7
| <bindings>
<basicHttpBinding>
<binding name="ServicesBinding" maxReceivedMessageSize="2000000" maxBufferSize="2000000">
<readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000"/>
</binding>
</basicHttpBinding>
</bindings> |
et en mettant dans Page.xaml
1 2 3 4 5 6
|
Binding.MaxBufferSize = 2000000;
Binding.MaxReceivedMessageSize = 2000000;
EndpointAddress Address = new EndpointAddress("http://localhost/UploadWCF/Upload.svc");
UploadServiceClient = new UploadServiceReference.UploadClient(Binding, Address); |
Mais quand j'essaie d'augmenter cette taille pour transférer des fichiers de plus grande taille, et même si leur taille est inférieure à la nouvelle valeur, j'obtiens l'erreur
The remote server returned an unexpected response: (404) Not Found
sur la fonction
1 2 3 4 5 6
| public void EndStoreFile(System.IAsyncResult result) {
object[] _args = new object[0];
base.EndInvoke("StoreFile", _args, result);
} |
dans Reference.cs
Merci d'avance
Partager