wcf - Can't host nettcp and wshttp endpoints from same IIS 7 web app -


i trying host 2 endpints, net.tcp , wshttp, same iis web app counldn't seem work. when host net.tcp endpoint, works fine. add http host, following error: "the value of argument must positive. parameter name: maxaccepts actual value 0"

anyone knows if limitation on iis 7 or doing wrong? extend servicehostfactory class , override createservicehost method. here highlight of code:

public class qlhostfactory inherits servicehostfactory  protected overloads overrides function createservicehost(byval svctyp type, byval baseaddresses() uri) servicehost     dim qlsvchost servicehost = nothing      dim ntcpuri() uri = nothing     ' have filter out other uri , leave nettcp in      ' list work. want allow http in here too.     each u uri in baseaddresses         if u.scheme = uri.urischemenettcp             redim ntcpuri(0)             ntcpuri(0) = u             exit         end if     next     qlsvchost = new servicehost(svctyp, ntcpuri)     sethost(qlsvchost, svctyp) ' <== set endpoints each baseaddresses, etc.     return qlsvchost end function 


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -