随笔 - 39  文章 - 16 评论 - 193 阅读 - 56550

WCF超级郁闷的问题
我将WCF宿主到Windows 服务中(并不是IIS)
服务器有一IP(202.98.96.68),多域名(my.cn 和my.com)
配置文件如下
    <system.serviceModel>
        <services>           
            <service name="zDit.ErrorSystem.Service.Server" behaviorConfiguration="ServerBehaviorConfiguration">               
                <endpoint address="" binding="basicHttpBinding" bindingConfiguration="HttpBind" contract="zDit.ErrorSystem.Core.IServer"></endpoint>
                <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
                <host>               
                    <baseAddresses>
                        <add baseAddress="http://test.my.cn"/>                       
                    </baseAddresses>
                </host>
            </service>           
        </services>       
        <behaviors>
            <serviceBehaviors>
                <behavior name="ServerBehaviorConfiguration">                   
                    <serviceMetadata httpGetEnabled="true" />                  
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <bindings>
            <basicHttpBinding>
                <binding name="HttpBind"></binding>
            </basicHttpBinding>
        </bindings>       
    </system.serviceModel>
这样服务一启动,所有请求(*.my.cn 和 *.my.com)到交给了这个服务。超级郁闷,目前他没有找到解决方案。
不知WCF如何配置解决在同一服务器上单IP,多域名的问题!哪位朋友做过类似问题,请指点
posted on   rosanshao  阅读(713)  评论(4编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
点击右上角即可分享
微信分享提示