我正处于开发应用程序的研发阶段,具有以下关键要求:
由于配额限制,我无法使用网络存储 - 我正在比较SQLite和Indexed DB.
我对API的选择很困惑.在Safari上是否还有其他SQLite替代方案或索引数据库支持?
我有WCF服务,通过它我在DB中添加数据.它工作正常,但当我尝试发送大字节[]时,它返回"远程服务器返回错误:NotFound".
web.config中
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="JabsBaseConnectionString" connectionString="Data Source=TAHASAGHIR-PC\SQLEXPRESS;Initial Catalog=JabsBase;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<httpRuntime maxRequestLength="2097151" useFullyQualifiedRedirectUrl="true"/>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="SendLargeChat"
allowCookies="false"
bypassProxyOnLocal="false"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647"
closeTimeout="10:00:00"
openTimeout="10:00:00"
receiveTimeout="10:00:00"
sendTimeout="10:00:00"
transferMode="Streamed">
<readerQuotas
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxDepth="2147483647"
maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="Prototype.SendChatService" behaviorConfiguration="Prototype.SendChatServiceBehavior">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="SendLargeChat" contract="Prototype.SendChatService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name=""> …Run Code Online (Sandbox Code Playgroud) 我已经按照本教程构建了聊天应用程序.当我尝试添加我的服务的引用时,我收到以下错误:
合同需要Duplex,但Binding'BasicHttpBinding'不支持它,或者没有正确配置以支持它.
我的web.config如下:
<extensions>
<bindingExtensions>
<add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingExtensions>
</extensions>
<bindings>
<pollingDuplex>
<binding name="chatPollingDuplex" duplexMode="MultipleMessagesPerPoll"/>
</pollingDuplex>
</bindings>
<services>
<service name="PrototypeSite.ChatService">
<endpoint address="" binding="pollingDuplex" bindingConfiguration="chatPollingDuplex" contract="PrototypeSite.ChatService" />
<endpoint address="mex" binding="wsDualHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
Run Code Online (Sandbox Code Playgroud)