Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SharePoint > SharePoint 2007 > BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 31st, 2009, 05: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 05:14 PM.
  #2 (permalink)  
Old September 3rd, 2009, 10:52 PM
Wrox Author
 
Join Date: Jun 2007
Location: Fernandina Beach, FL, USA.
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
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 12:06 PM
unhandled exception dipakp ASP.NET 2.0 Professional 1 July 6th, 2007 03:16 PM
Unhandled NullReference Exception dheeraj1053 C# 1 May 30th, 2006 06: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 06:25 PM



All times are GMT -4. The time now is 11:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.