Question

I have a project that uses a class library for the business layer functionality. A web application sits on top of this. I have a web service that I would like to call in the class library. The web application is hosted in IIS for debugging via Visual Studio 2008. Everything seems to work fine except each time make a call to this web-service (created in Java), I get this error following error “The underlying connection was closed: Could not establish secure channel for SSL/TLS”. I thought this was the cert related error. Hence I installed the cert and loaded the cert at runtime from my local stored and adding the cert to the client proxy (ClientCertificates.Add(certificate)) making sure the ASPNet and other IIS accounts have access to this cert. This didn’t help either. However when I added the web reference to same web-service in the same project to web application the error is gone. I need to call the web service from the class library. I would really appreciate your suggestions.

Was it helpful?

Solution

From what i understand the solution has two projects and the web app is the start project.If so, what you can do is have a web reference in the class library and copy the details of the app.config you get when you add the web reference in the class library to web config of the web app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top