I'm creating a web service using Port CMIS to connect to Alfresco via browser binding. Long story short, I am unable to even really begin because I can't successfully create a session. It seems like it should be fairly straightforward, but here we are...
HttpRequestException: An error occurred while sending the request.
WebException: The underlying connection was closed: An unexpected error occurred on a send.
IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
SocketException: An existing connection was forcibly closed by the remote host.
I've dumbed it down a bit, but this is basically the code I I'm trying to run. There's really not much to it:
private static void TestConnectToAlfresco()
// default factory implementation
SessionFactory factory = SessionFactory.NewInstance();
Dictionary<string, string> parameters = new Dictionary<string, string>();
// user credentials
parameters[SessionParameter.User] = Utils.GetAppSetting("ALFRESCO_USER");
parameters[SessionParameter.Password] = Utils.GetAppSetting("ALFRESCO_PASS");
// connection settings
parameters[SessionParameter.BrowserUrl] = Utils.GetAppSetting("WebURL");
parameters[SessionParameter.BindingType] = BindingType.Browser;
IList<IRepository> repos = factory.GetRepositories(parameters);
foreach (IRepository repo in repos)
System.Diagnostics.Debug.WriteLine("Repository Name: " + repo.Name + " RepositoryID: " + repo.Id);
ISession session = factory.GetRepositories(parameters).CreateSession();
For a while, I thought maybe I was just using an incorrect URL (which is still possible), but I feel like I've tried every iteration of URL suggestion I've seen. Pretty much always the same error. I KNOW the credentials are good, because I can get into the Alfresco UI (or to the API) through a web browser using them.
I'm not specifying a port because it's currently just the default, but I did try explicitly specifying one for a while, but it seemed to have no effect. Any thoughts? Please ask if I've left out any information that might be helpful. TIA.