This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Problem with HttpServerConnection object

Triadian - Monday, February 14, 2011 1:16 AM:

Hi,

I am trying to use Aras (IOM.dll) code in one of our existing product.Coding is in C# and built with VS2008.If I try to use functions like HttpServerConnection.GetDatabases() and Aras.IOM.HttpServerConnection.Login() I get the following exceptions .If I use the same functions in some other project it works fine.

************** Exception Text **************
System.Net.WebException: The remote server returned an error: (403) Forbidden.
   at System.Net.HttpWebRequest.GetResponse()
   at Aras.IOM.HttpServerConnection.GetDatabases()
   at MyProduct.ConnectToPLM()


   ************** Exception Text **************
   System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'System.Xml.XmlElement'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
      at Aras.IOM.HttpServerConnection.seterror(ArasXmlDocument outDOM, String message)
      at Aras.IOM.HttpServerConnection.seterror(ArasXmlDocument outDOM, Exception ex)
      at Aras.IOM.HttpServerConnection.CallActionImpl(String actionName, ArasXmlDocument inDOM, ArasXmlDocument outDOM, String url, Boolean doSetHeaders)
      at Aras.IOM.HttpServerConnection.CallAction(String actionName, ArasXmlDocument inDOM, ArasXmlDocument outDOM)
      at Aras.IOM.HttpServerConnection.Login()

I feel there are some project settings or product package settings which are creating this problem. Any help in zeroing on my problem is appreciated.

Regards,

Triadian