File Upload not sucessful

Topics: General Discussion Forum, July and December Releases Forum
Apr 2, 2008 at 6:16 AM
Hi,
Any body knows my questions answer then please be kind enough to post it to me.

I have a wcf service, created using wSSF dec 2006 relase, I am uploadin image into the Db.
While doin it form the machine which i am developing this software, this functions good and well.

Bu if i am trying to upload any image from the Client Machine? Remote Machine, that functions fails, It's not at all showing any
error. I am converting the image into Byte[], and sending it to that DB.

Hopefully,
Thanks in Advance,
Nimi
Apr 2, 2008 at 4:01 PM
Try checking if the maxRequestLength attribute in your machine.config that might limit the size of your upload files for remote uploads.
Apr 3, 2008 at 10:02 AM
Thanks a lot for your response,
Here below i am providing a part of web config file

<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />

Is there any fault in this, or i have to change this up ?

Hopefully,
Nimi
Apr 3, 2008 at 6:57 PM
Try with the "maxRequestLength" value in <httpRuntime> config element.
http://support.microsoft.com/kb/295626
Apr 4, 2008 at 8:42 AM
Edited Apr 4, 2008 at 8:42 AM

So if i am using the ------ > "maxRequestLength" value in <httpRuntime> config element.
wheather i have to add maxrequestlength as mentioned in the below codes.

moreover i am not aware about what is this <<<<<<<<<Machine.config file,>>>>>>>>
Is this the same as web.config file of the client website.

hope you can help me up with this?

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IFunction" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</system.serviceModel>


Apr 4, 2008 at 4:50 PM
How about this (you may change this to your basicHttpBinding) and notice tha value in maxReceivedMessageSize (max int32);

<bindings>
    <netTcpBinding>
        <binding name="netTcp"
            maxReceivedMessageSize="2147483647"
            maxConnections="2147483647">
            <readerQuotas
                maxDepth="64"
                maxStringContentLength="2147483647"
                maxArrayLength="2147483647"
                maxBytesPerRead="4096"
                maxNameTableCharCount="16384"/>
  </binding>
</netTcpBinding>
</bindings>
Also take a look at this links:
Max mesage size in WCF
Apr 16, 2008 at 2:33 PM
NOw when i am trying to upload the image from my machine, not client. its showing an error..

i am using Basic http bindings,

<binding name="BasicHttpBinding_IPictures"
maxBufferPoolSize="524288"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="64"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="4096"
maxNameTableCharCount="16384"/>

this is a part from my web config file,

Note : My Tables fields are of type allow nulls.
when ia m entering null vaues, its sucessfull. but in the case of image its showing the error


"The remote server returned an unexpected response: (400) Bad Request."


pls help me...
Apr 16, 2008 at 8:44 PM
Have a look at these links:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1128725&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1374303&SiteID=1

And this one that shows streaming:
http://kjellsj.blogspot.com/2007/02/wcf-streaming-upload-files-over-http.html
May 1, 2008 at 2:24 PM
Hi dear friend,
now i havnt done any changes, u know..wen i am trying to upload an image form remote machine, the page get expired... by showing an error 404...

y this is happening....
can u please tell me out....

please.. really i am stuck with this....
from my machine i dont have any problem....
May 2, 2008 at 11:25 AM
Nimi,

These topics are not related to WSSF so I would suggest you to post these question to some of the ASP.NET forums like:
http://www.asp.net/
or
http://forums.asp.net/

Where you may get much better answers from expert on these areas.

Regards,
CF
May 2, 2008 at 12:56 PM
so this is not a problem related with my service....
thats what i wanna know, if there is no problem , then that will be some client related problem,
or that might be the problem related with hosting...
i am hosting my web site client application in an IIS 6