Error while Connecting Office 365/SharePoint online

Hi,

I m trying to connect to sharepoint online from console application using managed code. But while executing client.executequery, I m getting the error "

System.Xml.XmlException was unhandled
  HResult=-2146232000
  Message=For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
  Source=System.Xml
  LineNumber=0
  LinePosition=0
  SourceUri=""
  StackTrace:
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
       at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
       at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.DoGet(String url)
       at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.RequestFederationProviderInfo(String domainname)
       at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.GetFederationProviderInfo(String domainname)
       at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.InitFederationProviderInfoForUser(String username)
       at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.GetServiceToken(String username, String password, String serviceTarget, String servicePolicy)
       at Microsoft.SharePoint.Client.Idcrl.SharePointOnlineAuthenticationProvider.GetAuthenticationCookie(Uri url, String username, SecureString password)
       at Microsoft.SharePoint.Client.SharePointOnlineCredentials.GetAuthenticationCookie(Uri url, Boolean refresh)
       at Microsoft.SharePoint.Client.ClientRuntimeContext.SetupRequestCredential(ClientRuntimeContext context, HttpWebRequest request)
       at Microsoft.SharePoint.Client.SPWebRequestExecutor.GetRequestStream()
       at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate()
       at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
       at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
       at OneClick.Program.Main(String[] args) in c:\Users\sysadmin\Documents\Visual Studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 33
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

"

Can somebody helps m

July 30th, 2015 3:39pm

Hi,

Everywhere its mentioned as a firewall issue. Can somebody help me out? I need to check my ISP ?

July 30th, 2015 4:58pm

In this link

http://blogs.msdn.com/b/kaevans/archive/2014/02/23/call-o365-using-csom-with-a-console-application.aspx

There is a comment saying that "Its a firewall issue" Can somebody help me out?

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 4:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics