EWS问题:ConnectingSIDType不包含'PrimarySmtpAddress'的定义 [英] EWS issue: ConnectingSIDType does not contain a definition for 'PrimarySmtpAddress'

查看:81
本文介绍了EWS问题:ConnectingSIDType不包含'PrimarySmtpAddress'的定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在使用EWS的应用程序时,我遇到了一个非常奇怪的问题。希望在这里得到一些建议。

I've run into a pretty peculiar issue while doing up my app that utilises EWS. Hope to get some advice here.

我已经利用Visual Studio 2005功能创建了自动生成的代理类,以便与Exchange 2010服务器连接。这些已被编译成一个dll文件,用于我的程序。

I've made use of the Visual Studio 2005 features to create my autogenerated proxy classes to interface with an Exchange 2010 server. These have been compiled into a dll file for use with my program.

由于我需要使用Exchange模拟功能,我按照

As I needed to utilise the Exchange Impersonation feature, I followed the sample code as found in

http://msdn.microsoft.com/en-us/library/exchangewebservices.exchangeservicebinding(v = EXCHG.140).aspx

http://msdn.microsoft.com/en-us/library/exchangewebservices.exchangeservicebinding(v=EXCHG.140).aspx

我无法编译由于以下错误导致的代码。

I have been unable to compile the code due to the following error.

错误1"ConnectingSIDType"不包含"PrimarySmtpAddress"的定义

Error 1 'ConnectingSIDType' does not contain a definition for 'PrimarySmtpAddress'

// Set up the binding for Exchange impersonation.
binding.ExchangeImpersonation = new ExchangeImpersonationType(); binding.ExchangeImpersonation.ConnectingSID = new ConnectingSIDType(); binding.ExchangeImpersonation.ConnectingSID.PrimarySmtpAddress = myEmail;

我无法使用其他子元素,例如ConnectingSID.PrincipalName,ConnectingSID.SmtpAddress等,它们会导致类似的编译错误。即使使用wsdl.exe生成的dll,也会出现同样的问题。

I am unable to use other child elements such as ConnectingSID.PrincipalName, ConnectingSID.SmtpAddress, etc., as they result in similar compile errors. The same problem applies even when using a dll generated by wsdl.exe.

这里的问题似乎是什么?如何解决此问题?

What seems to be the problem here? How can I resolve this issue?

提前致谢。

推荐答案

agg317,

agg317,

你有没有解决这个问题? 我遇到了同样的问题。

Did you ever get this resolved?  I'm having the same issue.

谢谢。


这篇关于EWS问题:ConnectingSIDType不包含'PrimarySmtpAddress'的定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆