Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - WCF - maxReceivedMessageSize -


i have problem setting maxreceivedmessagesize larger files.

i'm getting:

the maximum message size quota incoming messages (65536) has been exceeded. increase quota, use maxreceivedmessagesize property on appropriate binding element.

here server side configuration:

<?xml version="1.0" encoding="utf-8" ?> <configuration>   <appsettings>     <add key="httpbaseaddress" value="http://localhost:8080/welcomemessage/"/>     <add key="httpfiletransferaddress" value="http://localhost:8080/filetransfer/"/>   </appsettings>   <system.web>     <compilation debug="false" />   </system.web>   <system.webserver>     <modules runallmanagedmodulesforallrequests="true"/>   </system.webserver>   <system.servicemodel>     <services>       <service name="fs.services.messageservice" behaviorconfiguration="myservicetypebehaviors">         <endpoint contract="fs.interfaces.imessageservice" address="" binding="wshttpbinding"/>     </service>       <service name="fs.services.filetransferservice" behaviorconfiguration="myservicetypebehaviors">         <endpoint contract="fs.interfaces.ifiletransferservice" address="" binding="basichttpbinding" bindingconfiguration="streamedhttpbinding"/>       </service>     </services>     <bindings>       <basichttpbinding>         <binding name="streamedhttpbinding"                   messageencoding="text"                   transfermode="streamed"                   maxreceivedmessagesize="400000000"/>        </basichttpbinding>     </bindings>     <behaviors>       <servicebehaviors>         <behavior name="myservicetypebehaviors">           <servicemetadata httpgetenabled="true" />           <servicedebug includeexceptiondetailinfaults="false" />         </behavior>       </servicebehaviors>     </behaviors>   </system.servicemodel> </configuration> 

here client side configuration:

<?xml version="1.0" encoding="utf-8" ?> <configuration>   <system.servicemodel>     <client>       <endpoint address="" binding="wshttpbinding" contract="fs.services.imessageservice"         name="fs.services.messageservice" />       <endpoint address="" binding="basichttpbinding" bindingconfiguration="streamedhttpbinding"         contract="fs.services.ifiletransferservice" name="fs.services.filetransferservice" />     </client>     <bindings>       <basichttpbinding>         <binding name="streamedhttpbinding" maxreceivedmessagesize="400000000"           messageencoding="text" transfermode="streamed"/>       </basichttpbinding>     </bindings>   </system.servicemodel> </configuration> 

this how connect client:

basichttpbinding binding2 = new basichttpbinding("streamedhttpbinding"); endpointaddress endpoint2 = new endpointaddress("http://localhost:8080/filetransfer"); channelfactory<ifiletransferservice> channelfactory2 = new channelfactory<ifiletransferservice>(binding2, endpoint2); ifiletransferservice proxy2 = channelfactory2.createchannel(); ((iclientchannel)proxy2).open(); 

also transfer type of files 500mb using stream messages. can please provide me configuration (or solution) support that?

thanx!

your client side config doesn't have <client> tag reference server, , apply binding configuration increased message size......

on server side, need define service , endpoints:

<services>    <service name="yournamespace.yourserviceclass">        <endpoint name="endpoint1"                  address="http://server:8888/yourservice.svc"                   binding="basichttpbinding"                  bindingconfiguration="lagemessagetransfer"                  contract="iyourservicecontract" />    </service> </services> 

on client side, need define client endpoint connecting 1 of service endpoints

<client>    <endpoint name="default"              address="http://server:8888/yourservice.svc"               binding="basichttpbinding"              bindingconfiguration="lagemessagetransfer"              contract="iyourservicecontract" /> </client> 

update: ok, see config fine - where client endpoint connecting to?? don't have address= defined!

 <client>     <endpoint name="fs.services.filetransferservice"                address=""                binding="basichttpbinding"                bindingconfiguration="streamedhttpbinding"               contract="fs.services.ifiletransferservice" />  </client> 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -