Unhandled exceptions when testing on my dev server

Mar 31, 2009 at 9:22 AM
I've wanted to test this tool on my development server before applying anything to a live site, but I keep getting errors when i try to update a site's settings:

D:\>spmca -enableversioning -url=http://localhost:666

Using Options:
- Enabling versioning
- Using site : http://localhost:666

Unhandled Exception: System.IO.FileNotFoundException: The Web application at http://localhost:666 could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
   at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
   at DanielBrown.SharePoint.Tools.CLI.Program.Process(String requestUrl, Boolean ContentApproval, Boolean Versioning, Boolean IsRecursive)
   at DanielBrown.SharePoint.Tools.CLI.Program.Main(String[] args)

Any ideas on what i'm doing wrong? does the tool support port numbers or does it require qualified domains?

Kind regards,
Rik

Coordinator
Apr 1, 2009 at 11:30 AM

Hi Rik,

I have reproduced the exact same error when the SPMCA is unable to open the website at the specified location.

I have updated the code to first check if the site exists and handle it gracefully if it does not. Rather than throwing the exception you have experienced.

The latest release has this fix.

Regards,

Daniel

Apr 1, 2009 at 12:43 PM
Edited Apr 1, 2009 at 12:55 PM
Surely now i get a more "gracefull" error, but i still don't understand why it can't open the website and apply the changes like i'm trying to?

i'm executing the command as administrator on the virtual server that is hosting the site, i can access the site from it's browser (on the dev machine) and remotely (using it's IP address)

Still when i try to execute the command, i now get an error for the url http://192.168.0.246:666, http://192.168.0.246 or

Web Application at http://192.168.0.246 was not found, please check the "URL" argument and try again.
Completed.
UPDATE:
Your extension doesn't seem to handle port specifications at all, and for my test environment, i'm running different websites on ports 666, 1234 , 1980, ...

I don't get any errors if i don't specify a port of the server

However, when I enable versioning and enable contentapproval for all subsites, when it's completed succesfully i'm checking the permissions for the page library and don't see any changes at all:

D:\Rik>spmca -enablecontentapproval -enableversioning -url=http://localhost -includesubsites
Mass enabling or disabling of Content Approval and Versioning on a sites document libraries.
Developed by Daniel Brown (daniel.brown@internode.on.net)

Using Options:
- Enabling Content Approval
- Enabling versioning
- Using site : http://localhost
- Including Subsites
Completed.
After this completes: approval is still inactive

Apr 1, 2009 at 1:00 PM
Disregarding the issue with the port numbers, i just came to the conclusion that i was expecting different behaviour than you described in your introduction text...

I was assuming it would also be possible to change settings for page and/or image libraries, but you've created this tool specifically for Document libraries...

I guess there's no chance that you've also made versions of this tool for page libraries and image libraries?

Kind regards,
Rik