您的位置:程序门 -> .net技术 -> web services



为什么wcf中host不监听端口?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


为什么wcf中host不监听端口?
发表于:2008-01-22 12:03:23 楼主
我的host中app.config代码如下:
<?xml   version="1.0"   encoding="utf-8"   ?>
<configuration>
        <system.servicemodel>
                <behaviors>
                        <servicebehaviors>
                                <behavior   name="servicebehavior">
                                        <servicemetadata   httpgetenabled="true"   />
                                </behavior>
                        </servicebehaviors>
                </behaviors>
                <services>
                        <service   behaviorconfiguration="servicebehavior"   name="loginserver.loginauthenticate">
                                <endpoint   address="loginauthenticate"   binding="basichttpbinding"   bindingconfiguration=""
                                        contract="contractserver.iloginauthenticate"   />
                                <endpoint   address="mex"   binding="mexhttpbinding"   contract="imetadataexchange"   />
                                <host>
                                        <baseaddresses>
                                                <add   baseaddress="http://localhost:6000"   />
                                        </baseaddresses>
                                </host>
                        </service>
                </services>
        </system.servicemodel>
</configuration>

以上代码在运行时没有错误,但是在浏览器中输入http://localhost:6000,显示无效网页,请问可能是哪里问题?
发表于:2008-01-23 08:51:211楼 得分:0
这个区人真的少呀!!!!!!!!!!!!!!
发表于:2008-01-24 09:01:132楼 得分:0
初学wcf痛苦呀,把别人的代码拷来,随意改动,都能用,没有问题。可惜自己从头一步一步建几个工程,即使跟上面内容一模一样都是运行不了,唉,,不知道哪里还要注意力的??


快速检索

最新资讯
热门点击