在iis中从外部域发布后,Web服务无法从客户端连接

时间:2013-01-25 07:03:46

标签: wcf silverlight-4.0

我在IIS上部署了Silverlight 4.0 WCF RIA应用程序。该应用程序在域内工作正常,但当我尝试从Internet(域外)访问时,我得到错误。我能够查看登录页面,单击登录按钮,应用程序无法与服务进行通信,我猜。甚至尝试使用端口访问,但是提示帮助。

我使用以下代码从客户端配置连接到wcf,

    <endpoint address="http://IPAddress:Portnumber/Project/wcfProject.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IwcfProject"
            contract="ServiceReference.IwcfProject" name="BasicHttpBinding_IwcfProject" />

它在我的域中运行良好。只有当我尝试从我的域中访问applciation时才会出现问题。是否应在端点更改任何配置以便从外部域进行访问?

我的web.config看起来像,

    <?xml version="1.0"?>
   <configuration>
<appSettings>
 <add key="CrystalImageCleaner-AutoStart" value="true" />
 <add key="CrystalImageCleaner-Sleep" value="60000" />
 <add key="CrystalImageCleaner-Age" value="120000" /> 
 </appSettings>
 <connectionStrings>
 <add name="MyapplicationConnectionString" connectionString="Data Source=mydb46\SQLEXPRESS;Initial Catalog=Myapplication;User ID=sa;Password=sa"
     providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
    <compilation debug="true" targetFramework="4.0">
  </compilation>
  <httpRuntime maxRequestLength="102400"/>
</system.web>
<system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
    <bindings>
        <basicHttpBinding>
  <binding name="PictureBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" sendTimeout="00:30:30" receiveTimeout="00:30:30" closeTimeout="00:30:30" openTimeout="00:30:30">
<readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000"/>
            </binding>
        </basicHttpBinding>
    </bindings>
    <behaviors>
        <serviceBehaviors>
    <behavior name="Myapplication.Web.ImageServiceBehaviour">
    <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
                <serviceMetadata httpGetEnabled="true"/>
                <serviceDebug includeExceptionDetailInFaults="true"/>
            </behavior>
            <behavior name="">
                <serviceMetadata httpGetEnabled="true"/>
                <serviceDebug includeExceptionDetailInFaults="true"/>
            </behavior>
        </serviceBehaviors>         
    </behaviors>
    <services>

                                                                                                 
                                  

0 个答案:

没有答案