Tech. reference and notes discovered whilst thrashing Microsoft SharePoint, SQL, BI, KM, Security and Windows Servers
Friday, March 26, 2010
Running VMware vSphere Client on Windows 7
BUT here is a very good simple arcticle which works ! - we like this a lot...
Wednesday, March 24, 2010
Sharepoint 2007 wildcard searching
eg. FileName:whiz* will find all documents with a FileName starting with "whiz"
I havent found a way to search on field's with spaces in yet (ie where there is a space in the file name replacing it with _x0020_)
There is a good article here
http://www.novolocus.com/2009/05/27/sharepoint-can-have-wildcard-searching/
Thursday, February 25, 2010
dotNet Dictionary - ContainsKey
However I was using a Dictionary obect to store Key Value Pairs and I couldnt be sure that I knew if all the key's were present. The first way I found to check was to try to get the key within a Try Catch block and if they key wasnt found the Catch block would return a default value.
This was both stressfull to me and the performance of the app, so I was very pleased when I found a method to test if a key existed: Dictionary<(Of <(TKey, TValue>)>)..::.ContainsKey Method
BUT I was even happier when I found the Dictionary<(Of <(TKey, TValue>)>)..::.TryGetValue Method
TryGetValue means you dont need to wrap your code in Try Catch blocks to handle exceptions and you can pass back a default value if the key is not found. Brilliant !
A couple of Excel VBA usefull notes
Domain = Environ("UserDomain")
Combined= Environ("UserDomain") & "\" & Environ("Username")
CurrentDate = Date
CurrentTime = Time
Some file and folder VBA commands
Current folder name: CurDir
Change the active folder: ChDir "C:\My Documents"
File exists test: If Dir("F:\My Documents\My Workbook.xls") <> "" Then ....
Delete a file : Kill "F:\My Documents\My Workbook.xls"
Creates a new folder: MkDir "F:\My Documents\NewPrivateFolder"
Delete a folder: RmDir
Copy a file (the file must be closed): FileCopy "OrgWorkBook.xls", "CopyWorkBook.xls"
How to move a file (the file must be closed):
OldFilePath = "C:\OldFolder\Filename.xls" ' original file location
NewFilePath = "C:\NewFolder\Filename.xls" ' new file location
Name OldFilePath As NewFilePath ' move the file
My thanks to this reference - allbeit a little hard to read beacause of the ad's
February 2010 Windows Media Center Cumulative Update for Windows 7
Sharepoint list item - custom drop down menu
(Suplimental: The obove article is ok as far as it goes however to try to get the client side menu to carry out actions is not simple. You need to be skilled in Javascript and have a knowledge of the internal variable names Sharepoint 2007 users. [at least Sharepoint 2010 will have a client side dll!).
Other references I found usefull were :
- MSDN - Sharepoint Client side API - OpenDocuments Control
- Changing the context menu of a document library in Microsoft SharePoint Portal Server 2003 or Windows SharePoint Services
- “Send Document Link By Mail” menu item to document libraries
- How to open SharePoint documents in Edit mode with Internet Explorer 6 and Windows XP (without regfix
Wednesday, January 27, 2010
BUG: SSIS 2008 derived columns from User variables data type
Usually you initialise the user:variable before the package starts with a non relevant string, such as "1234" then updated it to the correct value once the process starts.
The problem is that when you use the Derived Coulmn Transformation Editor and add a Derived Column as
So if you update the user:variable string to a length of 5 characters SSIS fails!
My work around is to make sure that you initialise the user:variable string with a value which has a length of the maximum possible string which you are likely to encouter.
Hopefully this will be resolved in future releases.
Tuesday, January 26, 2010
Another Microsoft SQL exam passed
Summing Excel Range Intersects
I had a couple of Ranges as rowns,
eg Dept1 = Rows A1:N4 , Dept2 = Rows (A5:N6, A12:N16) etc
and then Columns Ranges for Jan, Feb
eg Jan = Column B1:B12, Feb = C1:C12 etc.
I wanted to get the sum of the Intersection between Ranges Dept1 for Jan. To do this use a Space as an operator. eg =Sum(Dept1 Jan)
Whilist everyone knows about the comma as a Union operator not many people have heard of space as an Intersect operator - see "Reference operators" in Excel help for more info
Tuesday, January 19, 2010
Using Windows 7 for "Server-like" loads
However after about a 15Gb backup from SQL 2005 server onto a Windows 7 share, the Windows 7 workstation seemed to loose its visibility from any of the Windows 2003 servers. (The other Windows 7 machines could still see the share).
A reboot solved the issue, until I tried to backup again!
Looking in the event log, I found memory errors showing as Non-Paged pool problems.
After a lot of searching, I came across the article below - it would appear that from the old SysInternals Site there used to be an article called "Tunining Workstations for Server-Like Loads". Microsoft seem to have "tidied up" these old articles and I couldnt find any links to the references shown on Technet, however if you make the registry changes to a Windows 7 machine, it seems a lot happier pretending to be a backup file server overnight.
Set the following registry to key to 1
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache
and set the following registry key to ‘3′:
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size
References:
http://alan.lamielle.net/2009/09/03/windows-7-nonpaged-pool-srv-error-2017
Event ID 2017 and 2021 - microsoft.public.windows.vista.networking_sharing Google Groups
Tuesday, January 12, 2010
ICO (Windows Icon) file format plugin for Photoshop
ICO (Windows Icon) file format plugin for Photoshop
Tuesday, December 15, 2009
Configuring User Profiles in Sharepoint 2010 beta 2 in the enterprise
This gives an interesting walkthrough for configuring user profiles. (Despite 5 installs of a Sharepoint 2010 its still not quite right).
Ive found this is a very tricky and time consuming process fraught with problems and Kathy's notes are very helpful.
Wednesday, October 14, 2009
Running SSIS packages from a web page
The following C# class in an asp.net page runs brilliantly on the SQL 2008 server
static void CallSSIS()
{
string pkgLocation = @"E:\VS Projects\\Sandbox.dtsx";
Application ssisApp = new Application();
Package ssisPackage = ssisApp.LoadPackage(pkgLocation, null);
DTSExecResult ssisPackageResults = ssisPackage.Execute();
}
The only major problem I had was publishing the web to a virgin Windows 2008 with IIS7 machine. When I browsed to the page it gave the following error "This configuration section cannot be used at this path".
After hours of head scratching and missleading web articles, it turned out that the ASP.NET is not installed as a ROLE in by default.
Server Manager -> Roles -> (scroll to Web Server (IIS)) -> Add Role Services -> ASP.NET
Volia!
Monday, October 12, 2009
Symantec System Center - Cant unlock server group
If you a) update the "user-admin-p" registry entry -
HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\Accounts (more details here)
and then b) run the iforgot.exe program in the Program Files\Symantec\Symantec System Center\Tools folder
then you can reset the user account's password.
Sunday, August 16, 2009
Setting wss 3.0 site anonymous access
Following the Microsoft guidance article it suggests Site Actions -> Users and Permissions -> Advanced Permisions -> Settings and then click on Anonymous access, however the option just wasnt there !
Further investigation reminded me I needed to make sure that my "authentication providers" needs to be set to support anonymous as otherwise its not an option to choose in menu above. To set this up go to Web Application Management -> Application Security -> Authentication Provider, choose the Zone you wish to edit and then make sure "enable anonymous access" is checked and save this setting.
Now go back to the first stage on the Advanced Permissions -> Settings drop down and voila, you can set anonymous for site, list level or none as you require.
Monday, August 10, 2009
Updating Windows 2008 Domain Account Policies
To change these settings is not intuative, however this is what I found:
To turn password complexity off in Windows 2008 Server or change other grayed out security options, follow these steps:(1) Run gpmc.msc (Group Policy Management)
(2) Expand your Domain
(3) Go to Group and select Default
(4) Right click on Default Domain Policy or Default Domain Controllers Policy and choose Edit
(5) In the new window which opens expand computer Configuration->policies->windows settings->security settings->account policies->password policies
(6) Make your edits to the keys below:
There must be an easier way, which I am problaby missing !
Tuesday, July 28, 2009
C#3 anonymous types, parameters and LINQ for XML
(He also mentions a very good book on C#3 (by Bill Wagner) to hone your skills)
Note: as a learning LINQ is a lot of trial and error you can test your LINQ code in a very helpful utility called:http://www.linqpad.net/
Sample LINQ code
XDocument xDoc = XDocument.Load(@"c:\temp\RSD.xml");
var q = (from e1 in xDoc.Descendants("{SchemaName}Detail").Distinct()
let div = e1.Attribute("Division").Value
let cc = e1.Attribute("CostCode").Value
select new { div, cc }).Distinct();
q.Dump(); //this shows you the contents of q
Monday, July 13, 2009
Integrating External Document Repositories with SharePoint Server 2007
Saving Reports to SharePoint using WebDav from Windows 2008
I found that Windows 2008 does not install the required WebDav Client (Not to be confused with the additional IIS7 WebDav Server addon) .
You can install this client by Adding the "Desktop Experience Feature" on Windows 2008, however this also installs lots of other things that you probably dont want and Ive not found a way to only install WebDav Client support.
After a server re-boot it works well and talks to Sharepoint Document Libraries, My thanks to the following article for assistance. Browsing SharePoint using WebDav from Windows 2008 « In The Mix
Friday, April 10, 2009
Chaks' Corner | WCF and Sharepoint - System.IO.FileNotFound Exception
The answer appears to be security related where the WCF service doesnt seem to have enough permission to get to the local sharepoint server. One workaround which seems to work is to set the WCF Application Pool permissions to the same as the Sharepoint Application Pools. Im not sure its elegant but until I find a better way this seems to work. Thanks to the following blog: Chaks' Corner WCF and Sharepoint - System.IO.FileNotFound Exception