I have a Silverlight 4 Beta application where I'd like to use the SharePoint object model to upload a document to a SharePoint site - should be simple enough, except an exception is thrown at:

using (SPSite siteCollection = new SPSite(siteCollectionUrl))

The Web application at http://intranet.fabrikam.com 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.

This particular exception is actually really well documented out there, it's obviously masking a real underlying issue. Here are some of the things I've read about and tried without success:

DNS / Host Header: This exception occurs when the particular URL isn't in the IIS metabase because it's being handled by DNS. My web application has an AAM set up and a host header on the web site in IIS. I also tried running the code without using the FQDN of the site, e.g. http: //servername:4860.

Permissions: The identity of the the Silverlight application pool has db_owner permissions to my content database, and is also a site collection administrator. I can't have both web sites use the same application pool because the Silverlight application needs to run in a .NET app pool.

x86 vs x64: My Silverlight application has to be compiled for x86 - I'm using some controls that only work in x86. The installed SharePoint version is x64. I've read about people seeing this exception when trying to use the SharePoint object model to hit a x64 SharePoint installation from a x86 app.

Adding then removing permissions for the account: This begins to border on some voodoo magic, but I read about people magically resolving this issue after removing the permissions they set trying to troubleshoot this problem initially. No luck here.

Would appreciate any suggestions, thank you!

2 Answers 2


You cannot/should not use the standard SharePoint object model/API's when creating applications that does not run on the actual SharePoint servers. Here is a list of the Web Services in WSS 3.0

You need to use the web services to interact with SharePoint, or if you are using SharePoint 2010 then use the Client Object Model. Read this overview of the Client Object Model if you are interested


Here is introduction post on Silverlight Client Object Model in SharePoint 2010. This will also helps the devs to understand and create applications. Take a look at it.


All SharePoint 2010 articles here: http://praveenbattula.blogspot.com/search/label/SharePoint%202010

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.