I used WCF Application for Iphone and android .when i transfer large amount data transfer for WCF then show BAd Request .i also increase WCF binding Message recived size and i also increase Executable time .
i dont know ehy this error occur . i submit small data easy but huge amount data should be not submit .please help me
According to your description,I was a little confused.
What exactly is the problem? At first you mentioned the problem occurs when transferring large data to iPhone/Android, so I suggested you to increase the max*** settings. Have you done that?
Now you say “show null respose in Browser”. If you want a service to be consumable in a browser, you need to create a REST service. By the way, iPhone/Android doesn’t support SOAP out of box. You have to find a third party library if you want to consume
SOAP services. BasicHttpBinding gives you a SOAP service. To create a REST service using WCF, you need WebHttpBinding.
I Want to received the data from Iphone / android mobile using post method in WCF services.
I used WebHttpBinding when received the data from phone.
When i send small string then data is save on database(sqlserver)but send huge and large string (those contain 3 image in encrypted form).and whole string is also encryted form then show null respose on iphone and android phone .
and i also try one more thing i create a dummy asp.net page and put encrypted string (contain 3 image)then this data should be save but when i saved on iphone/android then show "" /null response.
i dont understand exactly what is problem i am also send webconfig file
Rics
Member
24 Points
9 Posts
WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 16, 2012 03:26 AM|LINK
I used WCF Application for Iphone and android .when i transfer large amount data transfer for WCF then show BAd Request .i also increase WCF binding Message recived size and i also increase Executable time .
i dont know ehy this error occur . i submit small data easy but huge amount data should be not submit .please help me
cnranasinghe
Star
8899 Points
1800 Posts
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 16, 2012 09:49 AM|LINK
check this thread
http://forums.asp.net/t/1299246.aspx/1
Rics
Member
24 Points
9 Posts
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 17, 2012 09:05 AM|LINK
I have done this type of process but still i have recived same error "Bad Request"
vsdev
Contributor
2230 Points
453 Posts
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 17, 2012 11:21 AM|LINK
Did you modify the config in both server and client side? Can you debug the service? I mean. this service in your control or not?
Blog: dotnetthoughts
Download Capture It Plus
Otomii Lu - ...
Contributor
3064 Points
490 Posts
Microsoft
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 21, 2012 06:49 AM|LINK
Hi Rics,
According to your description,I cannot reach the solution directly.
Please increase various max*** settings, such as maxReceivedMessageSize, as well as various ***Timeout settings, such as readTimeout.
Also try to enable WCF tracing as described on http://msdn.microsoft.com/en-us/library/ms733025.aspx.
Rics
Member
24 Points
9 Posts
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 21, 2012 12:18 PM|LINK
HI,
Tell me onething you are used what type of binding use in webconfig. ?
Wshttpbinding
BasicHttpbinding
I used basichttpbinding then show null respose in Browser tell me please ..........i
Otomii Lu - ...
Contributor
3064 Points
490 Posts
Microsoft
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 23, 2012 12:39 AM|LINK
Hi Rics,
According to your description,I was a little confused.
What exactly is the problem? At first you mentioned the problem occurs when transferring large data to iPhone/Android, so I suggested you to increase the max*** settings. Have you done that?
Now you say “show null respose in Browser”. If you want a service to be consumable in a browser, you need to create a REST service. By the way, iPhone/Android doesn’t support SOAP out of box. You have to find a third party library if you want to consume SOAP services. BasicHttpBinding gives you a SOAP service. To create a REST service using WCF, you need WebHttpBinding.
Rics
Member
24 Points
9 Posts
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 23, 2012 04:30 AM|LINK
Hello,
I Want to received the data from Iphone / android mobile using post method in WCF services.
I used WebHttpBinding when received the data from phone.
When i send small string then data is save on database(sqlserver)but send huge and large string (those contain 3 image in encrypted form).and whole string is also encryted form then show null respose on iphone and android phone .
and i also try one more thing i create a dummy asp.net page and put encrypted string (contain 3 image)then this data should be save but when i saved on iphone/android then show "" /null response.
i dont understand exactly what is problem i am also send webconfig file
please help me.
<configuration>
<connectionStrings>
<add name="ConnectionString" connectionString="data source=;Initial Catalog=;Persist Security Info=True;User ID=;Password=;Max Pool Size=2000;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<httpRuntime executionTimeout="14400" maxRequestLength="2097151" useFullyQualifiedRedirectUrl="true" />
<compilation debug="true" targetFramework="4.0"/>
<!--<authentication mode="Windows">
60
</authentication>-->
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
</providers>
</roleManager>
<customErrors mode="Off"></customErrors>
</system.web>
<system.webServer>
<!--<modules runAllManagedModulesForAllRequests="true"/>-->
<security>
<requestFiltering allowDoubleEscaping="true">
<requestLimits maxAllowedContentLength="2000000000"/>
</requestFiltering>
</security>
</system.webServer>
<system.serviceModel>
<services>
<service name="MyRefundService" behaviorConfiguration="myServiceBehavior">
<endpoint name="webHttpBinding"
address=""
binding="webHttpBinding"
contract="IMyRefundService"
behaviorConfiguration="webHttp" >
</endpoint>
<endpoint name="mexHttpBinding"
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange">
</endpoint>
</service>
</services>
<bindings >
<webHttpBinding>
<binding name="DefaultBinding_IChat" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding >
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="myServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors >
<behavior name="webHttp">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
</configuration>
Rics
Member
24 Points
9 Posts
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 23, 2012 04:07 PM|LINK
Do you think this change would work
Instead of
<endpoint name="webHttpBinding"
address=""
binding="webHttpBinding"
contract="IMyRefundService"
behaviorConfiguration="webHttp" >
</endpoint>
make Use of the following
<endpoint name="webHttpBinding"
address=""
binding="webHttpBinding" Name="DefaultBinding_IChat"
contract="IMyRefundService"
behaviorConfiguration="webHttp" >
</endpoint>
Rics
Member
24 Points
9 Posts
Re: WCF show error message "Bad Request " when transfer large amount data from iphone and android
Feb 23, 2012 04:09 PM|LINK
Does the below URL of any help
http://stackoverflow.com/questions/2056675/wcf-service-binding-taking-default-values-instead-of-custom-values