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 multiple named pipe endpoints -


i have 2 services want interact through named pipes. tried 2 ways, both creating 2 separate servicehosts, , creating multiple endpoints on single service. first service works whether have second service or not. second service in both cases, either endpoint not found error due not finding named pipe (separate services) or address filter problem (which setting not fix). i've checked , double checked settings, i'm stumped.

both server , client both use same assembly has contract:

[servicecontract(callbackcontract = typeof(iservicecallback1), sessionmode = sessionmode.required)] public interface iservice1 {     .... } [servicecontract] public interface iservice2 {     ... } 

here's server side:

[servicebehavior(instancecontextmode = instancecontextmode.persession, concurrencymode = concurrencymode.reentrant, includeexceptiondetailinfaults = true)] class service1impl : iservice1 {     ... }  [servicebehavior(instancecontextmode = instancecontextmode.persession, includeexceptiondetailinfaults = true)] class iservice2impl : iservice2 {     ... } ... servicehost1 = new servicehost(typeof(service1impl)); servicehost2 = new servicehost(typeof(service2impl));  try {     servicehost2.open();     servicehost1.open(); } 

(yes, open them in opposite order, since client process assumes service2 available if can connect service1)

here's configuration services:

<system.servicemodel>     <services>       <service name="service1impl" behaviorconfiguration="myservicebehavior">         <endpoint address="" binding="netnamedpipebinding" contract="iservice1"/>         <host>           <baseaddresses>             <add baseaddress="net.pipe://localhost/service1"/>           </baseaddresses>         </host>       </service>       <service name="service2impl" behaviorconfiguration="myservicebehavior">         <endpoint address="" binding="netnamedpipebinding" contract="iservice2"/>         <host>           <baseaddresses>             <add baseaddress="net.pipe://localhost/service2"/>           </baseaddresses>         </host>       </service>     </services>     <behaviors>       <servicebehaviors>         <behavior name="myservicebehavior">           <servicedebug includeexceptiondetailinfaults="true"/>         </behavior>       </servicebehaviors>     </behaviors>   </system.servicemodel> 

client-side don't use configuration , use both:

public class service2client: clientbase<iservice2>, iservice2 {     public service2client()         : base(new netnamedpipebinding(), new endpointaddress("net.pipe://localhost/service2"))     {     } } 

is there i'm missing here? said, can connect , make calls on first service fine, second gets endpointnotfoundexception complaining couldn't find named pipe.


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 -