sharepoint warmup
/---------------- using System;using System.Collections.Generic;
using System.Text;using System.Net;
namespace WarmupSharepointCS{ class Program { static void Main(string[] args) { string url = "https://www.sp.net"; string url2 = "https://www.sp.net/_windows/default.aspx?ReturnUrl="; string user = "user"; string pwd = @"pwd"; long count = ;
System.Threading.Timer t = new System.Threading.Timer(callback => { if (System.DateTime.Now.Hour >= && System.DateTime.Now.Hour < ) try { string authInfo = user + ":" + pwd; authInfo = Convert.ToBase64String(Encoding.UTF8.GetBytes(authInfo)); var webclient = new WebClient2(); webclient.Headers[HttpRequestHeader.Authorization] = "Basic " + authInfo; var webpage = webclient.DownloadString(url2);
var str2 = webclient.DownloadString(url);
Console.ForegroundColor = System.ConsoleColor.Green; Console.WriteLine(webpage); } catch (Exception ex) { Console.ForegroundColor = System.ConsoleColor.Red; Console.WriteLine(ex.Message); } count++; Console.WriteLine("timer:" + count.ToString()); },null,,* * );
Console.Read();
} }} //---------------- /////////////////////////////// using System;using System.Collections.Generic; using System.Net;
namespace WarmupSharepointCS{ public class WebClient2:System.Net.WebClient {
private readonly CookieContainer m_container = new CookieContainer();
protected override WebRequest GetWebRequest(Uri address) { WebRequest request = base.GetWebRequest(address); HttpWebRequest webRequest = request as HttpWebRequest; if (webRequest != null) { webRequest.CookieContainer = m_container; } return request; }
}} //////////////////////////////////
sharepoint warmup的更多相关文章
- 如何对SharePoint网站进行预热(warmup)以提高响应速度
问题描述 SharePoint Server是一个易于使用的协作平台,目前在越来越多的企业中被应用开来.SharePoint Server是通过网站的形式向最终用户提供服务的,而这个网站是基于ASP. ...
- BPM SharePoint解决方案分享
一.需求分析 SharePoint作为微软推出的协同类平台产品,为客户提供了门户.内容.文档.流程.社区.搜索.BI等一系列的解决方案,然而其流程功能由于设计理念差异,不能完全满足客户的需求,主要原因 ...
- Visual Studio 2013 添加一般应用程序(.ashx)文件到SharePoint项目
默认,在用vs2013开发SharePoint项目时,vs没有提供一般应用程序(.ashx)的项目模板,本文解决此问题. 以管理员身份启动vs2013,创建一个"SharePoint 201 ...
- 在 SharePoint Server 2016 本地环境中设置 OneDrive for Business
建议补丁 建议在sharepoint2016打上KB3127940补丁,补丁下载地址 https://support.microsoft.com/zh-cn/kb/3127940 当然不打,也可以用O ...
- SharePoint 2016 入门视频教程
之前一直有朋友让自己录一些SharePoint的入门视频,之前没有太多时间,一个巧合的机会收到CSDN学院的邮件,可以在CSDN上发布视频教程,自己就录了一些.说起录视频也是蛮辛苦的,每天下班吃完饭要 ...
- 如何使用本地账户"完整"安装 SharePoint Server 2010+解决“New-SPConfigurationDatabase : 无法连接到 SharePoint_Config 的 SQL Server 的数据 库 master。此数据库可能不存在,或当前用户没有连接权限。”
注:目前看到的解决本地账户完整安装SharePoint Server 2010的解决方案如下,但是,有但是的哦: 当我们选择了"完整"模式安装SharePointServer201 ...
- SharePoint 2016 必备组件离线安装介绍
前言 SharePoint 必备组件安装,一直以来都是SharePoint安装过程中的最大的坑,尤其是不能联网的服务器.博主在这里简单介绍一下离线安装过程,并附组件包下载以及安装命令,并且在windo ...
- SharePoint 2013 create workflow by SharePoint Designer 2013
这篇文章主要基于上一篇http://www.cnblogs.com/qindy/p/6242714.html的基础上,create a sample workflow by SharePoint De ...
- Install and Configure SharePoint 2013 Workflow
这篇文章主要briefly introduce the Install and configure SharePoint 2013 Workflow. Microsoft 推出了新的Workflow ...
随机推荐
- HDU 1160 FatMouse's Speed (DP)
FatMouse's Speed Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Su ...
- Linux 内核配置和编译
Linux 内核配置和编译 一.配置内核 (1). 为什么要配置内核 1. 硬件需求 2. 软件需求 选出需要的,去掉不要的 (2). 如何配置内核 1. make config 基于文本模式的交互 ...
- PHP,单双引号的区别‘“”“”’
一.转义 单引号:只转义\'和\\,其他不转义 双引号:都转义 二.变量解析 单引号:无法解析变量(原样输出) 双引号:可以解析变量 三.速度 单引号:更快 双引号:要分析是否有变量,转义内容更多 结 ...
- webstorm卡、闪退以及win10中jdk配置【转】
原文地址:webstorm卡.闪退以及win10中jdk配置 今天 webstorm 突然一直处于 indexing 索引状态,然后就卡死,重装也无法解决. 搜了一下后,有人说使用 64 位客户端 ...
- secureFX中出现中文乱码修改方法
1. 找到SecureFX配置文件夹(选项--全局选项,常规下的配置文件夹),比如:D:\Program files\SecureCRT\DATA:2. 在配置文件夹下的Sessions子目录中,找到 ...
- DOS批处理命令-pause
“pause”用于暂停批处理的执行器并给出提示信息,然后由用户决定是继续执行还是终端执行. 语法: pause 简单一个pause,不附带任何参数. 执行pause以后会提示一句话[按任意键继续执行] ...
- Contoso 大学 - 1 - 为 ASP.NET MVC 应用程序创建 EF 数据模型
原文 Contoso 大学 - 1 - 为 ASP.NET MVC 应用程序创建 EF 数据模型 原文地址:Creating an Entity Framework Data Model for an ...
- Xcode7主题路径
// Xcode7主题路径~/Library/Developer/Xcode/UserData/FontAndColorThemes
- C# 微信扫码支付 回调页面
.NET版 微信扫码支付,官方推荐使用[模式二] 一.微信扫码支付模式一: 1.回调页面:官方demo中example文件下的NativeNotifyPage.aspx 2.微信回调地址:http:/ ...
- 抓取dump
1,在程序奔溃前部署.adplus.exe -crash -pn explorer.exe -o d: -crash:当进程挂掉的时候抓取dump,只能抓取到进程报错时的信息,如果进程不报错,就无法抓 ...