using System;
using System.Collections.Generic;
using System.Text;
namespace GenGuid100
{
class Program
{
static void Main(string[] args)
{
Guid oGuid = Guid.NewGuid();
string sGuid = oGuid.ToString();
for (int iGuid = 0; iGuid < 100; iGuid++)
{
for (oGuid = Guid.NewGuid(), sGuid = oGuid.ToString();
sGuid[0] != '0' || sGuid[1] != '1' || sGuid[2] != '2' || sGuid[3] != '3'
|| sGuid[4] != '4' || sGuid[5] != '5' || sGuid[6] != '6' || sGuid[7] != '7';
oGuid = Guid.NewGuid(), sGuid = oGuid.ToString()) { }
Console.WriteLine(oGuid.ToString());
}
Console.ReadLine();
}
}
}
http://www.trader.ca/Search/Details.asp?mknm=713&Region=100&subcategory=203&CAT=2&ADID=6484515&ADS=6484515%7C
We've been following the Content DB Upgrade/Migration approach in the MOSS 2007 Administrator's Companion (using the SharePoint Central Admin UI) with some nasty results: repeated "SNIReadSync" failures. See below for the typical error messages we were getting.
The solution is to only use the Central Admin UI to create a standard Web application with a default content database and then delete the content database (using the Central Admin UI) - leaving a Web app with no content databases.
Then use stsadm.exe -o addcontentdb to add (and implicitly upgrade) a copy of the SPS 2003 databases that you have previously attached or restored to your MOSS SQL server. Voila - no more SNIReadSync errors.
Excerpt from the failing upgrade.log file
[SPContentDatabaseSequence] [ERROR] [8/15/2007 7:03:46 AM]: Action 3.0.12.3000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed.
[SPContentDatabaseSequence] [ERROR] [8/15/2007 7:03:46 AM]: Thread was being aborted.
[SPContentDatabaseSequence] [ERROR] [8/15/2007 7:03:46 AM]: at SNIReadSync(SNI_Conn* , SNI_Packet** , Int32 )
at SNINativeMethodWrapper.SNIReadSync(SafeHandle pConn, IntPtr& packet, Int32 timeout)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.Upgrade.SecurityUpgradeAction.ExecuteSqlCmdList()
at Microsoft.SharePoint.Upgrade.SecurityUpgrade3.ProcessListAcl(Int32 iPageSize)
at Microsoft.SharePoint.Upgrade.SecurityUpgrade3.Upgrade()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
[SecurityUpgrade3] [3.0.12.3000] [DEBUG] [8/15/2007 7:03:46 AM]: Begin Rollback()
[SecurityUpgrade3] [3.0.12.3000] [DEBUG] [8/15/2007 7:03:46 AM]: End Rollback()
[SecurityUpgrade3] [3.0.12.3000] [DEBUG] [8/15/2007 7:03:46 AM]: Begin Dispose()
[SecurityUpgrade3] [3.0.12.3000] [DEBUG] [8/15/2007 7:03:46 AM]: End Dispose()
[SecurityUpgrade3] [3.0.12.3000] [DEBUG] [8/15/2007 7:03:46 AM]: Elapsed time: 00:11:30.0512913.
[SPManager] [ERROR] [8/15/2007 7:03:46 AM]: Upgrade [SPContentDatabase Name=portal1_WSS_SITE Parent=SPDatabaseServiceInstance Name=dev1] failed.
[SPManager] [ERROR] [8/15/2007 7:03:46 AM]: Thread was being aborted.
[SPManager] [ERROR] [8/15/2007 7:03:46 AM]: at SNIReadSync(SNI_Conn* , SNI_Packet** , Int32 )
at SNINativeMethodWrapper.SNIReadSync(SafeHandle pConn, IntPtr& packet, Int32 timeout)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.Upgrade.SecurityUpgradeAction.ExecuteSqlCmdList()
at Microsoft.SharePoint.Upgrade.SecurityUpgrade3.ProcessListAcl(Int32 iPageSize)
at Microsoft.SharePoint.Upgrade.SecurityUpgrade3.Upgrade()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
[SPManager] [ERROR] [8/15/2007 7:03:46 AM]: Action 3.0.12.3000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed.
[SPManager] [ERROR] [8/15/2007 7:03:46 AM]: at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
at Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence.Upgrade()
at Microsoft.SharePoint.Upgrade.SPManager.Upgrade(Object o, Boolean bRecurse)
[SPManager] [DEBUG] [8/15/2007 7:03:46 AM]: Elapsed time upgrading [SPContentDatabase Name=portal1_WSS_SITE Parent=SPDatabaseServiceInstance Name=dev1]: 00:20:01.
[SPManager] [INFO] [8/15/2007 7:03:46 AM]: Resetting the status of PersistedUpgradableObject: SPContentDatabase Name=portal1_WSS_SITE Parent=SPDatabaseServiceInstance Name=dev1 to Online.
[SPManager] [DEBUG] [8/15/2007 7:03:46 AM]: Using cached [SPContentDatabase Name=portal1_WSS_SITE Parent=SPDatabaseServiceInstance Name=dev1] NeedsUpgrade value: True.
[SPManager] [INFO] [8/15/2007 7:03:48 AM]: Inplace Upgrade session finishes. root object = SPContentDatabase Name=portal1_WSS_SITE Parent=SPDatabaseServiceInstance Name=dev1, recursive = False. 2 errors and 0 warnings encountered.
See my previous post for the details: http://www.dotnetjunkies.com/WebLog/mwherman2000/archive/2007/08/27/293141.aspx
<script language="javascript">
var timerNBEDDisableControls = null;
var iQLTAttempts = 0;
function DoNBEDDisableControls()
{
try
{
iQLTAttempts++;
if (iQLTAttempts <= 5)
{
var iValue;
var sHostname = window.location.toString();
if (sHostname.indexOf("portail") != -1)
{ // French
window.document.all.ctl00_PlaceHolderMain_InputFormTemplatePickerControl_ctl00_DDLanguageFormControl_DdLanguageWebTemplate.outerHTML =
"<select name=ctl00$PlaceHolderMain$InputFormTemplatePickerControl$ctl00$DDLanguageFormControl$DdLanguageWebTemplate id=ctl00_PlaceHolderMain_InputFormTemplatePickerControl_ctl00_DDLanguageFormControl_DdLanguageWebTemplate size=1>"
+ "<option selected=selected value=1036>French</option>"
// debug + "<option value=1033>" + sHostname + "</option>"
+ "</select>";
GetWebTemplates('1036&Collaboration', 'context');
}
else
{ // English
// Leave the English user with both options (default)
}
}
clearNBEDDisableControlsTimer();
}
catch( eIgnore )
{
}
}
function setNBEDDisableControlsTimer()
{
timerNBEDDisableControls = window.setTimeout(DoNBEDDisableControls, 100, "JScript");
}
function clearNBEDDisableControlsTimer()
{
if (timerNBEDDisableControls != null)
{
window.clearTimeout(timerNBEDDisableControls);
}
timerNBEDDisableControls = null;
}
setNBEDDisableControlsTimer();
</script>
Context
We're supporting a French portal site collecton and an English portal site collection in the same farm (with the MOSS multi-language pack installed). French users only have access to the French portal; English, to the English
portal.
We want to force newly created My Sites to be created with the same language as the portal site collection that a particular user has access to. We don't need to worry about duplicate French and English My Sites being created.
MOSS can be enabled to support multi-language My Sites ...but the user is given the choice of language the first time they try to access their My Site. We don't want this ...we want the My Site to be forced to use the language of the parent portal site collection.
Questions
-
What approaches are there for forcing a newly created My Site to use the language of the parent portal site collection?
Answers
Here's some javascript I added to the top of the PlaceHolderMain content placeholder in the layouts\MySite.aspx page. Usual caveats about this breaking as soon as you install a Service Pack, being totally unsupported,
etc.
Pre-requisites:
-
MOSS multilanguage pack(s) need to be installed. This script only supports 1033 English installed with 1036 French.
Looks for the word "portail" anywhere in the URL and limits French users to creating only French My Sites. English users have the original choices of English or French.
-
Multiple language selection needs to be turned on the the My Site configuration page.
<asp:Content contentplaceholderid="PlaceHolderMain" runat="server">
<script language="javascript">
// C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\MySite.aspx
var timerNBEDDisableControls = null;
var iQLTAttempts = 0;
function DoNBEDDisableControls()
{
try {
iQLTAttempts++;
if (iQLTAttempts <= 5) {
if (true /* window.document.all.ctl00_PlaceHolderMain_ddlLanguages.disabled != true */)
{
//window.document.all.ctl00_PlaceHolderMain_ddlLanguages.disabled = false;
var iValue;
var sHostname = window.location.toString();
if (sHostname.indexOf("portail") != -1) { // French
window.document.all.ctl00_PlaceHolderMain_ddlLanguages.outerHTML = "<select name=ctl00$PlaceHolderMain$ddlLanguages
id=ctl00_PlaceHolderMain_ddlLanguages accesskey=L class=ms-long Title=Language:>"
+ "<option selected=selected value=1036>French</option>"
// debug + "<option value=1033>" + sHostname + "</option>"
+ "</select>";
}
else { // English
// Leave the English user with both options (default)
}
//window.document.all.ctl00_PlaceHolderMain_ddlLanguages.disabled = true;
}
}
else {
// make sure we clear the timer
}
clearNBEDDisableControlsTimer();
}
catch( eIgnore )
{
}
}
function setNBEDDisableControlsTimer()
{
timerNBEDDisableControls = window.setTimeout(DoNBEDDisableControls, 100, "JScript");
}
function clearNBEDDisableControlsTimer()
{
if (timerNBEDDisableControls != null)
{
window.clearTimeout(timerNBEDDisableControls);
}
timerNBEDDisableControls = null;
}
setNBEDDisableControlsTimer();
</script>
Come out and support the citizens of Chip Court in their battle against the Litigious Mayor of Richmond Hill and the Town's persistent issuing of illegal parking tickets on Chip Court.
Date
- Friday August 10 2007, 6-8pm
Location
- Chip Court cul-de-sac (north of Elgin Mills, one block east of Bathurst) in north-west Richmond Hill
Menu
- Hamburger and Soft Drink - $5
- Hot Dog and Soft Drink - $4
- "Baloney Barrows" Burger and Soft Drink - $30
Special Events
At 6:45pm, there will be a special "Baloney Barrows" Burger Toss to remind of the Town's Friday July 27 6:45pm attack on our neighborhood and the issuing of an additional 4 illegal parking tickets to 4 guests attending a neighbor's house party by the Litigious Mayor's staff. Buy a "Baloney Barrows" Burger and throw it at your choice of the Litigious Mayor, Councilor Foster, or a Parking Enforcement Officer (paper mannequins - not real but equally effective).
More Details
Additional details can be found on the Chip Court Chatter web site:
http://www.sharepointcentral.com/chipcourt
Did you know that SharePoint Designer 2007 backup (Site->Admin->Backup) is totally broken for sites greater than 24MB in size? ...even though SPD tells you it succeeded and you've carefully burnt months and months of your CMP backup files onto a growing stack of DVDs?
It's true. Validated by the SPD product group and PSS. ...and to "add insult to injury", MS isn't sure this will be fixed in time for SP1.
Here's a workaround:
Turns out that when SPD Backup triggers the creation of the server-side CMP file set, WSS does succeed in creating the complete CMP file set (7 files totally 156MB in one of my tests).
After SDP downloads the first CMP (and no more), all of the CMPs in the file set are deleted.
Guess where they end up? :-) …in the site collection Recycle Bin. :-) :-)
So the workaround is to use the WSS site collection Settings page to the restore all of the files in the CMP file set back to the root folder of the site collection.
Then in SPD, in the root folder, select all of the CMP files, right-click, select Publish and publish/copy them to a folder on your local computer.
I’ve only run one test but it was for one of our largest Apptix site collections and seems to work just fine.
“Stick that in your MS KB article and smoke it” :-)
Michael Herman
Parallelspace Corporation
p.s. There's probably an opening at MS for a WSS backup program manager position if anyone is interested. ;-)
p.p.s. FAQ: When SPD creates multiple .CMP files, you only have to list the first file in your restore command. SPD will automatically pickup and read the others. (In fact, SPD actually reads the last .CMP file first because it contains the manifest files (table of contents) for the backup. It then starts reading the first, second, ... .CMP to perform the actual restore.
UPDATE: Sept. 4, 2007. Microsoft has confirmed that the SPD 2007 Backup problem won't be fixed in the upcoming Office 2007 Service Pack 1.
It has been scheduled for a future service pack. (I would have expected Microsoft to place more value on a customer's SharePoint data).
function ChangeContentType(id)
{
var obj=document.getElementById(id);
var strUrl=window.location.href;
var idxQuery=strUrl.indexOf("?");
if (strUrl.indexOf("?")
| Content Type |
Corporate Info
Article Reprint
Competitive Report
Drawing
Form Template
HR Form Template
HR Job Posting
Market Research
Marketing Advertisement
Marketing Presentation
News Item
Photo
Presentation
Press Release
Quality System Document
Sell Sheet
Technical Data Sheet
User Manual
Video
|
P@ssw0rd Fabrikam
pass@word1 Contoso Pharma
I thought I had reached that inevitable point were I was going to have to rebuild my Windows XP laptop but here's an answer:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1264394&SiteID=1
Is IE
numberable the integer version of IEnumerable? :-)
I think there is a typo near the top of page http://msdn2.microsoft.com/en-us/library/ms131103.aspx in the SQL Server 2005 Books Online.
Turns out they're different but virtually the same. Checkout this response from the Live Data team: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1553848&SiteID=1
Ref: http://msdn2.microsoft.com/en-us/data/bb419139.aspx
Feedback on Astoria:
1. It was actually hard to find "good" information ...I wasn't on the right track until I discovered the white papers in the Astoria (and Jasper) CTP installation files. Would be better to see these online on MSDN.
2. I like the $expand parameter ...i.e. the ability to include sub-entities/associated entities in the generated XML. This is key.
3. Would like to see more openness around the $format parameter ...beyond supporting the fixed list of: xml, json and rdf. e.g. We would like to be able to generate WF XOML format XML files.
4. Would like to see a new parameter that returns the "shape" of the XML to be returned from a particular Astoria query. Doesn't have to be XSD ...in fact, I suggest return the shape in a format consistent with the value of $format parameter.
5. Lastly, if I have a data in a proprietary store (use SharePoint lists as an example), the data provider story is somewhat confusing in terms of "what do I do now" that connects with I should do later wrt MS's delivery roadmap/milestones. Do I write LINQ data providers? ...do I write some sort of ADO.NET 3.5 provider (haven't made to any of the Redmond data provider workshops).
6. (I lied ...this is the very last one): Does any of this connect with what the Windows PowerShell guys (Jeffrey Snover) are doing? They have created their own entity provider model that doesn't appear to be connected to what's happening in Data Progammability.
Cheers
Michael.
It's true. Looks like it is seriously broken or missing CSS file. I wonder if anyone will read this.
Assert would typically be used at the beginning of a pipeline to test if a particular entity existed (and possibility, met specific additional requirements).
Assert can also be be used mid-pipeline or at the end of the pipeline as a post-execution verification that an entity was created (e.g. a user, a file, a backup, ...), etc.
I'm still thinking through Microsoft's strategy/desire to standardize on a relatively fixed set of verbs in PowerShell. Take the Data verbs for example: http://msdn2.microsoft.com/en-us/library/ms551957.aspx.
What is the real difference between Backup, Export and Out?
All three serialize, persist and commit an entity to some
data store (or via a pipeline, pipe the data to the next cmdlet).
They really only differ in the format of the serialization and perhaps, any additional metadata that is created to describe the serialized output.
Does PowerShell need all three? IMHO, not really.
Microsoft is strongly encouraging developers of PowerShell add-ons (MMC Snapins, Cmdlets and Providers) to adhere to a minimal set of cmdlet verbs (and nouns) and has published the following set of Required (Must Have) guidelines: http://msdn2.microsoft.com/en-us/library/ms714657.aspx. They are also wrestling internally was to what is the right set of standard verbs.
Take "New" for example. The claim is that New is an example of a universal, well understood verb that is prevalent in most applications today (e.g. File->New, AD-New User, Windows Explorer->New Folder, etc).
Should these types of patterns apply to the PowerShell scripting language used for application
systems administration and related utility applications? My answer is: not necessarily.
The key difference between the use of New in a traditional windowed application vs. a script or command-line application is that most windowed applications don't actually create anything when you click File-New -- rather they create an in-memory representation of the entity (e.g. Word document, User object) that is not named, serialized, persisted or
committed to a data store until user performs a number of additional interactive actions and finally saves the entity.
However, in a (non-interactive) script or command-line console application use for application and systems
administration, I offer that it is critically important that the script's intention be crystal clear: readable, understandable and precise in its execution semantics.
I refer to this as "precision scripting" (vs. "generic scripting").
I believe Microsoft should be encouraging practices that support precision
scripting (and not generic scripting).
One solution is to use precise verbs that are less open to vague semantic interpretation on the part of the system administrator. For example, the following is a more precise set of verbs more suitable for precision scripting: Create, Replace, Update, Delete, Merge and Add.
|
Precise Verb |
Verb
Description |
Pre-delete Existing Item |
Create New Item |
|
Create |
Create creates a new instance of the exported
item; or fails if the item already exists (see replace, update and add) |
No |
Yes |
|
Delete |
Delete deletes an existing item imported into
SPS2003 during a previous execution of the Import tool; or fails if the
item doesn’t exist. |
No |
No |
|
Replace |
Replace replaces an existing item imported
intoSPS2003 during a previous execution of the Import tool by executing
a Delete followed by a Create; or fails if the item doesn’t exit. |
Yes |
Yes |
|
Update |
Update adds or replaces the values of
selected attributes of an existing item imported intoSPS2003 during a
previous execution of the Import tool; or fails if the item doesn’t
exit. |
No |
No |
|
Add |
Add a) creates a new instance of the
exported item if the item does *not* exist; or b) replaces an
item if the item was imported into SPS2003 during a previous execution
of the Import tool. This operation shouldn’t fail based on previous
import operations |
a) No
b) Yes
|
a) Yes
b) Yes
|
|
Merge |
Add a) creates a new instance of the
exported item if the item does *not* exist; or b) updates an item
if the item was imported into SPS2003 during a previous execution of the
Import tool. This operation shouldn’t fail based on previous import
operations |
a) No
b) No
|
a) Yes
b) No
|
Custom Iterators: http://msdn2.microsoft.com/en-us/vcsharp/bb264519.aspx
Anders Video on LINQ: http://blogs.msdn.com/charlie/archive/2007/01/26/anders-hejlsberg-on-linq-and-functional-programming.aspx
MmcListView - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/managedMMC/html/41939cc2-3fb4-4a5c-82fe-00ed92f25df1.asp
If you have a deck made with Trex composite decking, I would like to hear from you. Please post a comment or email me at mwherman at parallelspace dot net (make the usual substitutions).
In particular, if you have problems with black mold/mould or you have less than 1/4" gap between your Trex deck boards, I especially want to hear from you: mwherman at parallelspace dot net (make the usual substitutions).
UPDATE: Checkout this June 14, 2007 CTV Toronto Pat Foran consumer alert broadcast:
CLICK HERE (The consumer report starts 15 seconds into this video clip.)