详解Silverlight中PivotViewer控件编程实例

详解Silverlight中PivotViewer控件编程实例

 

http://www.shijia.com.cn/contents/1237/10994.html?__r=2428 

 

1. 在IIS7上面如何配置才可以运行。

    a. 首先在MIME Types 中添加:

        .xaml  -- text/xaml

        .dzc    -- text/xml

        .dzi    ---text/xml

    b. web.config 的设置

         View Code

 
<system.webServer>
    <!-- IIS uses these handler configuration values -->
   <handlers>
        <!--
            A generic handler that responds to requests  for any CXML.
            You may leave  this section  as  is, and place your collection factory assemblies into the
            bin folder of  this ASP.NET Application  for them to be used.
            Alternatively, you may add classes that implement the IHttpHandler (or HttpAsyncHandler)
             interface yourself and replace the generic handler below with the handlers specific to
            your CXML path.
            See the HttpHandler.cs source file  for the generic implementation.
        -->
       <add name= " CXML " path= " *.cxml " verb= " GET " type= " PivotServer.CxmlHandler "/>

        <!-- Deep Zoom Collection and Deep Zoom Image XML and image handlers -->
      <add name= " DZC " path= " *.dzc " verb= " GET " type= " PivotServer.DzcHandler "/>
        <add name= " DZI " path= " *.dzi " verb= " GET " type= " PivotServer.DziHandler "/>
        <add name= " DeepZoomImage " path= " */dzi/*_files/*/*_*.jpg " verb= " GET " type= " PivotServer.DeepZoomImageHandler "/>
        <add name= " ImageTile " path= " *_files/*/*_*.jpg " verb= " GET " type= " PivotServer.ImageTileHandler "/>
    </handlers>

<!--
    <staticContent>
        <mimeMap fileExtension= " .cxml " mimeType= " text/cxml " />
        <mimeMap fileExtension= " .dzc " mimeType= " text/xml " />
        <mimeMap fileExtension= " .dzi " mimeType= " text/xml " />
    </staticContent>
-->

 

 注释掉:system.web

里面的

 View Code

 
   <!-- <httpHandlers>
        <add path= " *.cxml " verb= " GET " type= " PivotServer.CxmlHandler "/>
        <add path= " *.dzc " verb= " GET " type= " PivotServer.DzcHandler "/>
        <add path= " *.dzi " verb= " GET " type= " PivotServer.DziHandler "/>
        <add path= " */dzi/*_files/*/*_*.jpg " verb= " GET " type= " PivotServer.DeepZoomImageHandler "/>
        <add path= " *_files/*/*_*.jpg " verb= " GET " type= " PivotServer.ImageTileHandler "/>

 

2. 在IIS6.0如何配制:

    a. 同上。

    b.  和上面相反。

        要注释掉<system.webServer>的所以内容。

        而使用 </system.web>里面的<httpHandlers>中的内容。

    c.  在站点的属性-->Configuration -->Mappings

        添加下面的内容:

        C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll

    Extension: .cxml
   Limit  to: GET
   Script  engine: checked
   Verify that file  exists: unchecked
    -  Executable:  C:\WINDOWS\Microsoft.NET\Framework64\v4. 0. 30319\aspnet_isapi.dll
    Extension: .dzc
   Limit  to: GET
   Script  engine: checked
   Verify that file  exists: unchecked
    -  Executable:  C:\WINDOWS\Microsoft.NET\Framework64\v4. 0. 30319\aspnet_isapi.dll
    Extension: .dzi
   Limit  to: GET
   Script  engine: checked
   Verify that file  exists: unchecked
At that point, the sample was able to run but no image was displayed. Then I thought that I could also  add JPG.

    -  Executable:  C:\WINDOWS\Microsoft.NET\Framework64\v4. 0. 30319\aspnet_isapi.dll
    Extension: .jpg
   Limit  to: GET
   Script  engine: checked
   Verify that file  exists: unchecked

  

 

 

转载于:https://www.cnblogs.com/lfzwenzhu/archive/2011/08/22/2149191.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值