Reputation: 10345
I'm working on a project that accesses the Exchange Server. Before I replaced the project to a server, everything went fine. But now I'm getting this error.
I don't find what I search in Google, so I hope someone of you can help me. I appreciate that.
Upvotes: 2
Views: 16732
Reputation: 747
There are two solutions but depends on which one solves your issue
solution 1- You need to add a Nuget Reference. In your project, right click "References" and click "manage Nuget packages" Then In the browse tab Search microsoft.Exchange.webservices and install :)
solution 2- You need to add a Reference. In your project, right click "References" and click "Add reference" Then go here and add system.web.services to your project.
Upvotes: 0
Reputation: 4868
I had the same exact error, in VS2005, .Net 2 and 3.5
This is how I resolved it, and I had to find another solution, because this always failed and Windows would not let me register the DLL.
regsvr32 "C:\Program Files\Microsoft\Exchange\Web services\1.1\Microsoft.Exchange.WebServices.dll"
I went into the .Net Framework Configuration Wizard from Administration tools in Windows XP. Mine is .NET Framework 2.0 Configuration (version 2.0.50727.42).
I then went into Runtime Security Policy -> Increase Assembly Trust and pointed to the above DLL in my C drive. It was set to NO TRUST, for some reason! I changed it to FULL TRUST.
I then closed and re-opened my VS2005 project and everything is now working fine.
Regards,
Upvotes: 0
Reputation: 10345
The answer is: I copied the dll and xml file (which you get when installing EWS Managed API) to the bin-folder of my project. And it works!
Upvotes: 1
Reputation: 2334
You should provide the specified assembly with your application or install it on your server.
Upvotes: 2