Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SharePoint > SharePoint 2007 > BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9
|
BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9
This is the forum to discuss the Wrox book Professional SharePoint 2007 Development by John Holliday, John Alexander, Jeff Julian, Eli Robillard, Brendon Schwartz, Matt Ranlett, J. Dan Attis, Adam Buenz, Tom Rizzo; ISBN: 9780470117569
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2009, 04:10 PM
Authorized User
 
Join Date: Jul 2009
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Chapter 12 - Running OfficialFileSTSADMCommand project gets Unhandled Exception.

When I run the OfficialFileSTSADMCommand project from Chapter 12 in Debug, the project executes the following command: "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -help submitofficialfiles.

But that command generates an error: Unhandled Exception: System.ArgumentNullException: Value cannot be null.

See results of command prompt below.

But a similar STSADM command that does not use OfficialFileSTSADMCommand code, "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -help sync, work OK.

What is wrong with the OfficialFileSTSADMCommand project code ?

Results of command execution:

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -help submitofficialfiles


Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.SharePoint.StsAdmin.SPStsAdmin.GetExtend edCommand(String type)
at Microsoft.SharePoint.StsAdmin.SPStsAdmin.Main(Stri ng[] args)

Last edited by dbaechtel; August 31st, 2009 at 04:14 PM..
 
Old September 3rd, 2009, 09:52 PM
Wrox Author
 
Join Date: Jun 2007
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to jholliday
Default Re: OfficialFileSTSADMCommand

Don,

You will get this error if you have not built and installed the assembly that contains the custom STSADM command code. From the exception trace, it appears that STSADM.EXE is recognizing the command, but is unable to load the code which implements the command.

Remember, that you have to build the assembly and you also have to install the assembly into the GAC so that STSADM can find it.

Hope this helps,
John
__________________
John F. Holliday, Author, MOSS MVP





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 - WebServiceExample project gets exception dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:06 AM
unhandled exception dipakp ASP.NET 2.0 Professional 1 July 6th, 2007 02:16 PM
Unhandled NullReference Exception dheeraj1053 C# 1 May 30th, 2006 05:55 PM
Unhandled Exception stu9820 ASP.NET 1.0 and 1.1 Basics 11 January 14th, 2004 05:55 PM
Unhandled Exception: mbarrett C# 3 August 1st, 2003 05:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.