Jerry.Zhong

博客园 首页 新随笔 联系 订阅 管理
  4 Posts :: 0 Stories :: 0 Comments :: 0 Trackbacks

2010年1月18日 #

在Vista中,使用了保护模式的机制。在保护模式下,IE7的运行权限较低,这样可以提高系统安全性。不过,带来的负面影响则是, IE7的权限不够高,以致不能将相应的记录写入常规的缓存目录、Cookies目录甚至浏览历史目录。这种情况下,采取一种变通的方式,即在相应的目录下 创建一个名为“low” 的子目录,用来储存保护模式下的数据。 

这些文件夹分别是

cookie

C:/users/用户名/AppData/Roaming/Microsoft/windows/cokies
C:/users/用户名/AppData/Roaming/Microsoft/windows/cokies/low

Internet临时文件

C:/users/用户名/AppData/Local/Microsoft/Windows/Temporary Internet Files/Low
C:/users/用户名/AppData/Local/Microsoft/Windows/Temporary Internet Files

历史记录

C:/users/用户名/AppData/Local/Microsoft/Windows/History/Low
C:/users/用户名/AppData/Local/Microsoft/Windows/History/

Temp

C:/users/用户名/AppData/Local/Temp/Low
C:/users/用户名/AppData/Local/Temp/
posted @ 2010-01-18 16:00 钟先生 阅读(1004) 评论(0) 编辑

2009年10月16日 #

        public string GetRootURI()
        {
            string UrlAuthority = Request.Url.GetLeftPart(UriPartial.Authority);
            if (Request.ApplicationPath == null || Request.ApplicationPath == "/")
            {
                //直接安装在Web站点
                return UrlAuthority;
            }
            else
            {
                //安装在虚拟子目录下
                return UrlAuthority + Request.ApplicationPath;
            }
        }
posted @ 2009-10-16 14:09 钟先生 阅读(110) 评论(0) 编辑

                <xxx:RDataGridTemplateColumn Header="Protect" RColumnKey="Protect" DefaultWidth="100">
                    <data:DataGridTemplateColumn.HeaderStyle>
                        <Style TargetType="dataprimitives:DataGridColumnHeader">
                            <Setter Property="ContentTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <CheckBox x:Name="cbProtectAll" Unchecked="cbCheckAll_Checked" Checked="cbCheckAll_Checked" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5">
                                            <ContentControl>
                                                <xxx:RTextBlock ResourceID="LHBIS.FIC.Client.Package.Create.A035" TextAlignment="Right"></xxx:RTextBlock>
                                            </ContentControl>
                                        </CheckBox>
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </data:DataGridTemplateColumn.HeaderStyle>
                    <data:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox x:Name="cbProtect" IsChecked="{Binding IsProtect, Mode=TwoWay}" IsEnabled="{Binding IsChecked}" Click="cbChecked_Checked" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5"></CheckBox>
                        </DataTemplate>
                    </data:DataGridTemplateColumn.CellTemplate>
                </xxx:RDataGridTemplateColumn>
posted @ 2009-10-16 14:07 钟先生 阅读(66) 评论(0) 编辑

    private void Download(string fileName, byte[] buffer)
    {
        Response.ContentType = "application/octet-stream";
        //通知浏览器下载文件而不是打开
        Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
        Response.AddHeader("Content-Length", buffer.Length.ToString());
        Response.BinaryWrite(buffer);
        Response.Flush();
        //Response.End();
    }
posted @ 2009-10-16 14:06 钟先生 阅读(22) 评论(0) 编辑