8,735
社区成员
发帖
与我相关
我的任务
分享
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="web.DBServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IDataService" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<service behaviorConfiguration="web.DBServiceBehavior" name="web.DBService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDataService" contract="web.DBService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_DBService" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None">
<transport>
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
</security>
</binding>
<binding name="BasicHttpBinding_DBService1" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None">
<transport>
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/PhotoManage/DBService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_DBService"
contract="DBService.DBService" name="BasicHttpBinding_DBService" />
<endpoint address="http://longbo/PhotoManage/DBService.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_DBService1" contract="DBService.DBService"
name="BasicHttpBinding_DBService1" />
</client>
</system.serviceModel>
</configuration>
// 摘要:
// 基于字节数组的指定区域(索引)初始化 System.IO.MemoryStream 类的无法调整大小的新实例。
//
// 参数:
// buffer:
// 从中创建该流的无符号字节数组。
//
// index:
// buffer 内的索引,流从此处开始。
//
// count:
// 流的长度(以字节为单位)。
//
// 异常:
// System.ArgumentNullException:
// buffer 为 null。
//
// System.ArgumentOutOfRangeException:
// index 或 count 小于零。
//
// System.ArgumentException:
// index 与 count 的和大于 buffer 的长度。
public MemoryStream(byte[] buffer, int index, int count);
// 摘要:
// 设置 System.Windows.Media.Imaging.BitmapSource 的源。
//
// 参数:
// streamSource:
// 要将源设置为的流。
public void SetSource(Stream streamSource);
BitmapImage bi = new BitmapImage();
bi.SetSource(new MemoryStream(objDataSet));
Image image = new Image();
image.Source = bi;
this.LayoutRoot.Children.Add(image);