我在Silverlight应用程序中有一个WCF服务方法,它将一些数据插入部署在共享GoDaddy服务器上的SQL Server数据库中。有些方法可以工作,有些则不可以,但是当应用程序在本地运行时(使用本地数据库),所有这些方法都可以工作。我得到通用的“远程服务器返回一个错误:NotFound”,我似乎无法得到任何更多的信息。当我直接从服务类(不通过服务引用)运行该方法时,它可以正常工作。这里是我的web.config服务部分:Silverlight WCF服务在部署时不起作用
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<behaviors>
<serviceBehaviors>
<behavior name="default">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="6553600" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IncreasedBuffer"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxBytesPerRead="2147483647" maxDepth="2147483647"
maxArrayLength="2147483647" maxNameTableCharCount="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="GreekTools.Services.DataService"
behaviorConfiguration="default">
<endpoint address="" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IncreasedBuffer"
contract="GreekTools.Contracts.IDataService" />
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
任何想法?
我想你忘了包括你的serviceModel配置的其余部分... – 2009-09-06 18:58:59
为了让你的XML配置的东西出现,你需要选择它,然后单击“代码”按钮(010 101)在工具栏!否则,人们将无法看到它...... – 2009-09-06 19:39:41
那么,绑定配置没有错...... – 2009-09-06 21:03:41