
企业开发
文章平均质量分 51
空空法师
这个作者很懒,什么都没留下…
展开
-
SharePoint file is locked for shared use
Sometimes the author of a document will receive a message from SharePoint when saving with desktop version of Office:Sorry, something went wrongThe file "..." is locked for shared use by "..."...原创 2019-05-28 23:46:11 · 833 阅读 · 0 评论 -
Emacs keybinding in Visual Studio 2010
I've been using Visual Studio 2010 from early last year. Unfortunately I used to emacs many years ago. In Visual Studio 2008 and earlier versions there's a key mapping settings for emacs. However MS seized support since 2010 beta version. I always pressed原创 2011-03-28 17:25:00 · 1366 阅读 · 0 评论 -
新项目选择asp.net webform还是asp.net mvc?
mvc在各个语音平台上都有不少选择,唯独.net不多,近来才流行起来的公版mvc总算能在vs.net 2010新建项目中找到了。经过一番调查,决定弃之。并不是因为不好,而是对新的项目来说没有简单易用的web form组件而手工写代码不如不用微软的产品。原创 2010-11-09 00:35:00 · 1341 阅读 · 0 评论 -
SP Dispose Check内存泄漏检测工具
<br />在开发web part,server control的时候SP对象往往会在自动垃圾收集之前就造成内存泄漏。最近找到一个很用用的工具,可以检查dll,exe中的SPSite, SPWeb等object是否会导致memory leak。<br /> <br />http://code.msdn.microsoft.com/SPDisposeCheck原创 2010-10-20 00:35:00 · 754 阅读 · 0 评论 -
SharePoint 2010 Windows Explorer View back to work again
It was all working fine, no problem until a few days ago "open with explorer" option was disabled and the use of the connection such as //sharepoint.domain/PublishingImages reported "not authenticated". While I can work with IE9 beta and all other tools su原创 2010-10-13 19:49:00 · 1339 阅读 · 0 评论 -
解决SP2010的CQWP匿名访问时SetDocumentIconUrlAndOnClickString方法错误
衍生或原生的CQWP在SharePoint 2010中匿名访问有时会产生错误,在Log中找到相关GUID得出SetDocumentIconUrlAndOnClickString方法调用出错。原创 2010-08-31 19:16:00 · 673 阅读 · 0 评论 -
SharePoint 2010自定Page Layout不改变core4.css加入自定义style和markup
<br />Page Layout中加入:<br /><PublishingWebControls:RichHtmlFieldid="Content"FieldName="PublishingPageContent" runat="server"PrefixStyleSheet="my-style-must-be-lowercase"/><br /> <br />在core4.css后加入自己定义的css(可以在master page中加入style连接)<br /> <br />H1.m原创 2010-08-27 23:15:00 · 1431 阅读 · 0 评论 -
正确使用RunWithElevatedPrivileges
<br />使用RunWithElevatedPrivileges的时候,contributor也可以运行下面的代码:<br />SPSecurity.RunWithElevatedPrivileges(delegate() { SPSite siteCollection = SPContext.Current.Site; siteCollection.CatchAccessDeniedEx原创 2010-06-18 20:33:00 · 3142 阅读 · 0 评论 -
stsadm -o execadmsvcjobs 卡死
<br />执行 stsadm -o execadmsvcjobs 有时会卡死,不管iisreset还是重启都不能继续下去。而同样的solution可以在其他机器运行。百思不得其解。google后从一个论坛上发现是timer导致的问题。Timer在Central Administration > Operations > Timer Job Definitions,<br />"Application Server Administration Service Timer Job"<br />Dis原创 2010-06-18 20:14:00 · 980 阅读 · 0 评论 -
对pirobox做的修改
在jquery的lightbox插件中,pirobox算是比较清爽的,不过有些不足的地方,小修一下就好。修改基于版本1.2.2。原创 2010-06-08 17:08:00 · 1782 阅读 · 0 评论 -
要用就用最黑的盒子WSPBuilder
做SharePoint已经大半年了,感觉还在迷路中,接触的也都是皮毛。问题无数,效率不高。我有偏见,对MS的技术路线不怎么喜欢。反而对简单平坦的技术感到有意思,如C,Python,就二个层次,基本涵盖所有需要,而且彼此兼容透明。MS技术层次很多,无数重复,晦涩,obsolete的技术,今天一个明天换一个。人力资源都用来做重复的事情,不断创造新的“高级语言”和平行技术,希望能提高效率。 效率原创 2010-05-27 00:36:00 · 701 阅读 · 0 评论 -
SharePoint 2010 upgrade from 2007 (content database, UI etc)
<br />Upgrade is always painful. SharePoint is no exception. Microsoft has suggested two ways of upgrade: inplace and database upgrade. All articles suggest database upgrade, which is also my choice. I don't trust third party migration tools. They will mes原创 2010-07-15 23:20:00 · 992 阅读 · 0 评论 -
Deploy WSP with SharePoint 2010 PowerShell
<br />The stsadm command was replaced by PowerShell cmdlets in 2010. To deploy on a Produciton, QA or DEV server you may probably need PowerShell scripts (with .ps1 suffix). However if you prefer GUI, you'll thank to Visual Studio 2010 as development and d原创 2010-07-01 22:21:00 · 1734 阅读 · 0 评论 -
Elevated Privileges,还是要注意不能随心所欲,这就是SharePoint
当page library出现401或者access denied的时候,先看看自己的code。比如SPContext.Current.Site.RootWeb工作用户是anonymous的时候,我们要得到一个static member: RootFolder.WelcomePage。这个时候就不能用SPContext.Current.原创 2010-02-25 20:41:00 · 1453 阅读 · 0 评论 -
401 UNAUTHORIZED in SharePoint 2007
Ive created a web part that gathers information from a Document Library. It works well under the "admin" web application (we have two web apps: admin site for non-anonymous users; www site for an原创 2010-02-11 01:46:00 · 3649 阅读 · 2 评论 -
Cascade Delete Stored Procedure
<br />In database migration tests a database needs to be emptied before each import attempt. Rows can be easily deleted by the delete command if no foreign key constrain is affected. In most small projects simple scripts deleting child tables before deleti原创 2011-05-13 17:27:00 · 815 阅读 · 0 评论 -
SharePoint 2010经常会在chrome里掉滚动条的解决方法
SharePoint 2010经常会在chrome里掉滚动条。找到了一个解决方法:用jQuery。假设外部访问用80端口,内部维护(ribbon条可见)用8080端口。其中我们已在master page的其他位置设置了ribbon的可见属性。$(document).原创 2011-10-17 17:09:08 · 1183 阅读 · 0 评论 -
Create custom Task List and Forms in SharePoint 2010 with Visual Studio 2012
When customising SharePoint Workflow Task we usually need to create customised Task List and Forms. It's easy to create List in Visual Studio but even if the list is based on "Task" template it will n原创 2013-04-25 23:31:32 · 1072 阅读 · 0 评论 -
解决SharePoint Solution安装过程中不能deploy assembly的问题
在部署SharePoint solution的时候会遇到原创 2014-07-16 02:09:05 · 1229 阅读 · 0 评论 -
SharePoint "Cannot add the specified assembly to the global assembly cache"
有时候Gac Deployment的是后会遇到:"Cannot add the specified assembly to the global assembly cache"处理方法:iisreset清空.net的temp文件夹,例如:C:\Windows\Microsoft.NET\Framework64\v4.0.30319如果还不能deploy,试试原创 2015-05-01 23:30:24 · 1125 阅读 · 0 评论 -
How to Enable or Disable Document Property Promotion (ParserEnabled) in SharePoint 2013
This is the way to solve issues on uploading document into SharePoint 2013 Document Library. After upload the document into SharePoint library, the document had the metadata (document properties) of t转载 2015-02-17 18:32:51 · 903 阅读 · 0 评论 -
设置SQL别名
在使用数据库的程序中我们经常会用到ConnectionString。许多情况下我们需要采用不用的值以应对不同环境。比如DEV,Staging和Production肯定会不同。有些软件,如SharePoint的几乎每个服务都用到SQLServer的配置。还有数据库升级我们也不希望修改所有软件的配置。这样我们希望有一个统一的设置,比如名叫MSSQL,在一个服务器或者VM中,所有的软件和服务原创 2014-12-06 00:29:13 · 3588 阅读 · 0 评论 -
在SharePoint 2013中建立Report Viewer读取RDLC报表
在SharePointt的Solution的layouts文件夹中可以建立非gaspx文件,原创 2014-10-31 23:38:14 · 1897 阅读 · 0 评论 -
Changing the Item-Level Permissions Settings for a Document Library requires PowerShell
As it turns out the, setting Item-Level Permissions in a library is fully supported with PowerShell! The PowerShell commands for changing this are very simple:$web = Get-SPWeb http://YourSit转载 2014-07-04 01:02:25 · 801 阅读 · 0 评论 -
Simple statistics for SharePoint
A simple script that counts recursively:转载 2014-05-13 17:13:48 · 763 阅读 · 0 评论 -
Get all SharePoint database sizes
Get-SPDatabase | Sort-Object disksizerequired -desc | %{write-host “Size: $($_.disksizerequired/1mb)MB – Database: $($_.Name)”}转载 2014-05-13 16:48:00 · 770 阅读 · 0 评论 -
Repeating Table Header on Each Page of the Report in the SSRS 2008
In the SSRS 2008, if a report with a tablix is created without using the wizard feature (Reports -> Add -> New Item -> Report), table headers won’t repeat on every page by default when you print or ex转载 2014-05-13 17:20:17 · 1007 阅读 · 0 评论 -
Turn off Mobile View for SharePoint 2010 and SharePoint 2013
For SP2013 Mobile View feature can be disabled from Site Features.For SP2010 add this to原创 2014-05-11 18:55:38 · 946 阅读 · 0 评论 -
Enable InfoPath service in SharePoint 2010
If InfoPath service is not found under:Central Admin > General App SettingsConsider install it manually:stsadm -o installfeature -name IPFSAdminWeb原创 2014-05-11 18:52:09 · 672 阅读 · 0 评论 -
ffmpeg map channel
Command below will copy left audio channel to right when streaming video:ffmpeg -f mpegts -i "udp://@239.192.18.51:5000?fifo_size=1000000&overrun_nonfatal=1" -deinterlace -r 25 -vcodec libx264 -ac原创 2014-05-11 18:49:21 · 2949 阅读 · 0 评论 -
SharePoint Designer crash when opening site
Delete registry keys at:HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Open Find\Microsoft SharePoint Designer\Settings\Open Site\ClientGUIDHKEY_CURRENT_USER\Software\Microsoft\Of原创 2014-05-11 18:30:59 · 764 阅读 · 0 评论 -
Export IIS Log to SQL Server
Did some research on how to analyse IIS logs. Desktop software doesn’t work with 700M log files. Instead I found LogParser did a better job by exporting the log to SQL server database. It’s then flexi原创 2014-05-11 18:23:08 · 1214 阅读 · 0 评论 -
MOSS开发中Column Data Type和SharePoint Web Control之对应表
在SharePoint开发过程中会遇到给比如Custom Page Layout添加自带的Web Control,但往往不知用哪个控件。用错的话会给出:An unexpected error has occurred。 下表为Column Data Type之对应关系。 Normal 0 false false转载 2010-01-27 19:45:00 · 836 阅读 · 0 评论 -
1.0的Ajax Toolkit搬到.Net 3.5上
以前做了些ajax,是在.net2.0加上ajax toolkit开发的。现在要作为一个现有网站的子站点。目前的3.5系统自带3.5版本的ajax,也就是System.Web.Extensions 3.5。这个在ajax toolkit 1.0中也是同样的assembly名字,以至web.config文件会报错,说找到2个同样的assembly。又不可能去修改老站里面的文件,怎么办呢?我们既希望保原创 2009-11-19 01:24:00 · 821 阅读 · 0 评论 -
SharePoint 2007隐藏控制面板
SP中的管理界面和public显示界面是混合在一起的。有个很明白的方法可以让SP有类似后台管理功能。想法是这样的:比如我们希望www.domain.com开放给anonymous user,admin.domain.com只给管理员们使用。 服务器配置中找到Central Administration > Operations > Alternate Access Mappings原创 2009-10-15 18:10:00 · 984 阅读 · 0 评论 -
用Google Map API自动寻找地址
亲自实践了一下Google Map API的威力。感觉非常不错。总体来看和Adsense的JavaScript API差不多。但是功能更加强大。因为用的是JavaScript,没有平台限制。废话不说,下面就开始吧。script src="http://maps.google.com/maps?file=api&v=2&key=免费申请的 API KEY" type="tex原创 2007-11-14 01:54:00 · 1291 阅读 · 0 评论 -
可记录历史数据的表单设计
格式 id Record Data Created原创 2007-11-09 21:48:00 · 4776 阅读 · 0 评论 -
JavaScript动态减肥
JavaScript动态减肥随着Ajax的流行,越来越多的JavaScript被用到页面中,一个页面调用js文件大小超过500k都不稀奇了。这么大的带宽会给用户和网络带来诸多不便。其实我们都知道JavaScript及html都有很多空间是多余的。比如white space,网上有一些方案,比如JS Code Compressor。透过这个WinForm工具可以压缩文件大小到原来的一半左右。但如果我原创 2007-06-13 04:21:00 · 1483 阅读 · 0 评论 -
Windows上安装Subversion服务的最简单方法(浓缩版)
第一步当然是下载。一个提供服务。一个提供客户端。服务器软件的名称就叫Subversion。客户端有很多种。建议抓tortoiseSVN。都只要google一下就来了。配储存数据库很简单。打开cmd,运行svnadmin create c:/svn_repository/project1注册subversion作为windows进程服务也一条命令而已。sc create SVNService bin原创 2007-08-28 19:20:00 · 2178 阅读 · 0 评论 -
不到140行的C#代码编写一个简单的面向对象的数据库(OODB)
[来源] builder.com.cn 本文的目标是用不到140行的C#代码编写一个简单的面向对象的数据库(OODB)。很显然这不会是一个最简单的项目;但是C#和.NET框架提供了很多内置的函数,我们可以利用它们来帮助我们实现这一目标。这个数据库的要求如下: 必须能够保存对象的状态,而不需要向对象加入额外的信息,也不需要准确地告诉数据库如何保存对象。 必须能够转载 2007-05-23 22:05:00 · 2435 阅读 · 0 评论