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.

Can a WCF service be consumed as if it were an ASP.NET Web Service? -


i'm integrating product vendor our existing processes.

this product interfaces our system via asp.net web service. in, need write asp.net web service has particular method names , parameters vendor has specified.

simple enough, we're wanting migrate stuff possible wcf. haven't used wcf yet, see it's replacement asp.net web services (and other things).

seeing how cannot modify vendor's product, way write new web service using wcf if wcf service can consumed if asp.net web service (i.e., far vendor's product concerned, consuming asp.net web service).

can wcf services consumed in way?

yes, web services web services. in general wcf more flexible , more powerful asp.net, can on-the-wire message , out of wcf service same messages asmx service. but, wcf different default.

migrating should mechanical. replace .asmx file containing this:

<%@ webservice      language="c#"      codebehind="~/app_code/communicationservice.cs"      class="communicationservice" %>  

...with .svc file containing this:

<%@ servicehost      language="c#"      codebehind="~/app_code/communicationservice.cs"      service="communicationservice" %>  

...and done.

but, default settings wcf web service different asp.net web service. in particular, xml namespaces of incoming , outgoing messages may different. not specifies distinct xml namespaces service , messages, do, migration issue. difference in behavior (wcf-vs-aspnet) cause apps able call asmx service, not work "converted" wcf service.

this article discusses issue in detail, , describes workaround: use custom servicehost.

the service host code in article above incomplete in works fix request schema; might/could need similar response schema.

good luck.


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 -