The Web application at http://localhost could not be found.

Aug 18, 2010 at 2:41 PM


We want to use CMISForSharePoint to use MOSS as Document Management System for our Content Management System.

First tests have been successfully.
The test environment consists only of one server containing all: database, application server and web frontend (MOSS 2007, x32 Windows 2003 server).

But since we deployed the CMISForSharePoint DLLs and WCF services in our production environment we have problems (farm with separate database server, application server and three web frontends (but only one with CMISForSharePoint -> we access this server directly with its URL), MOSS 2007 BUT x64 Windows 2008 server):

We are using the same DLLs, we used also in the test environment (means x32 compiled DLLs). When we try to access the Repository.svc service with a client application based on the implementations described on this web site or in our CMS components we get following error message:

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

The stack trace is:

Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at ClientTestCMIS.CMISForSharePointRepositoryService.IRepositoryService.GetRepositories()
at ClientTestCMIS.CMISForSharePointRepositoryService.RepositoryServiceClient.GetRepositories() in c:\\documents and settings\\user\\desktop\\helper tools .net\\clienttestcmis\\clienttestcmis\\service references\\cmisforsharepointrepositoryservice\\reference.cs:Zeile 6626.
at ClientTestCMIS.Program.Main(String[] args) in C:\\Documents and Settings\\user\\Desktop\\Helper Tools .NET\\ClientTestCMIS\\ClientTestCMIS\\Program.cs:Zeile 20.
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

What can be the reason(s) for this issue? So far I didn't find any solution. Is the problem based in the x32 DLLs on the x64 system? Or is it a permission problem or a setup in the farm?
All settings regarding CMISForSharePoint are equal to our test environment.

Thank you for your support!

Best Regards,


Aug 18, 2010 at 2:47 PM

I forgot to mention the code snippet where the exception occurs in the test application.
It's the following one:

//create a proxy to consume the services
RepositoryServiceClient repositoryClient = new RepositoryServiceClient();
//Open the connection
//Sending the request to get all
cmisRepositoryEntryType[] repositories = repositoryClient.GetRepositories();

The Service Reference is set to:

Aug 19, 2010 at 11:51 AM

OK, I found the issue source. I had to modify the value of the "_SPHost" variable in the "SPHelper.cs".
In our case it must be set to http://<servername>.<domain>.com/sites/teamsites/default.aspx