Friday, October 17, 2008
统计油耗的在线工具
http://gastics.appspot.com/
Thursday, July 31, 2008
如何快速测试数据库连接
我这里介绍的方法不需要任何开发工具,一个干净的Windows即可。
1. 创建一个文本文件。
2. 修改文件的后缀名为 udl
3. 双击该文件运行
后面的不用我多说乐吧,这个方法好几年前就用过了,不过后来一直想不起来后缀名应该是什么,今天终于在google上找到。
Monday, February 25, 2008
configuration数据库的信息
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using (SPSite site = new SPSite("http://basesmcdev/tester1"))
{
SPProcessIdentity pi = site.WebApplication.Farm.TimerService.ProcessIdentity;
string userName = pi.Username;
object configDB = pi.GetType().GetProperty("ConfigurationDatabase", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(pi, null);
SPServer server = (SPServer)configDB.GetType().GetProperty("Server").GetValue(configDB, null);
string serverName = server.Name;
}
但是我没有测试过。很诡异的办法。
Monday, January 21, 2008
如何禁止掉SharePoint页面个性化?
Tuesday, December 18, 2007
"No access" site in MOSS2007
If you access a readlocked site.
1. This is by design: if you access an existing page, like /default.aspx or /_layouts/settings.aspx, you will get error message:
Access to this Web site has been blocked.
Please contact the administrator to resolve this problem.
In this condition, MOSS will check the permission on page first then throw the above error if the site is locked.
But if you access a folder, like / or /subsite or /doclib, you will get
403 FORBIDDEN
Or
404 NOT FOUND
In this condition, MOSS will check redirection function first, then throw the above error if the site is locked.
2.WSS/MOSS does not support custom error pages, the only customization can be made is for 404 (File not found error) on web application. You can check this:
SPWebApplication.FileNotFoundPage Property
“Windows SharePoint Services does not support the custom error pages that are typically used in IIS applications. There can only be one file per SharePoint Web application, which must be in HTML and cannot contain dynamic ASP.NET controls.”
do whatever you want with Farm level administrators permissions.
{
// do whatever you want with Farm level administrators permissions.
}
