The remote server returned an error: (401) Unauthorized

Using the 1.9 ver

Dim client As ExchangeClient = New ExchangeClient("https://exchange.powweb.com/exchange/", "kray@oasys-is.com", "xxxxxxxxx", "MAIL")

I can logon (OWA) using the above URL, pwd & my password

After excuting the Dim statement client.getmailboxsize() returns a 401 unauthorized error. Need some thoughts on how to fix. Exchange is hosted by a 3rd party vendor powweb.com. Not sure what I should be asking them for.

Thanks

Ken Ray

Hi Ken,


Thank you for contacting support.

I think the problem could the domain name. If you are not sure it the domain name is “MAIL” then I would suggest you to try the same code snippet with empty string ("") as domain name. Hopefully it will fix the problem. In case the issue persists, you may need to arrange a test account on same server for our testing.

Looking forward to your kind response.
Regards,

I used an empty string then received an error 404. This exchange server uses a proxy, does that make a difference?

Here is the Outlook Setup Instructions, I have created an account for you

E-mail Address:

Password:

aspose@oasys-is.com

apose

User Name: oasysisc.aspose
Domain: MAIL
Proxy server for Exchange: exchange.powweb.com
Microsoft Exchange Server: MAILR023.mail.lan

Hi,


Thank you for arranging the account for our testing. Unfortunately, I am unable to use these credentials to connect with Outlook Web App. Could you please check the credentials on your end?

Please note, I am getting the same results (401 Unauthorized Access) when I try to connect using Aspose.Email for .NET API.

Regards,

https://exchange.powweb.com/exchange/

userid: [aspose@oasys-is.com](mailto:aspose@oasys-is.com)

password: aspose

I successfully accessed it!

Thanks

Ken

Hi Ken,


Thank you for the confirmation. I can log onto the exchange using the Web Outlook Application and the recently provided credentials. But with Aspose.Email for .NET API, I am still getting the Error 401. Therefore I have logged an investigative ticket NETWORKNET-33351 in our defect database and attached the same to your request for tracking purpose.

We are sorry for your inconvenience.
Regards,

Hi Ken,

Thanks for being patient. We have investigated the issue and following are our findings:

Our component uses two types of protocol to connect to Exchange server i.e. Exchange Web Services (EWS) and WebDAV. The customers hosted on our Exchange are provided access by EWS. So in this case the correct url will be https://exchange.powweb.com/EWS/Exchange.asmx

Please have a look at the following working code for your reference.

const string mailboxUri = "https://exchange.powweb.com/EWS/Exchange.asmx";
const string username = "aspose@oasys-is.com";
const string password = "aspose";

NetworkCredential credential = new NetworkCredential(username, password);

using (ExchangeWebServiceClient client = new ExchangeWebServiceClient(mailboxUri, credential))
{
    ExchangeMailboxInfo ver = client.GetMailboxInfo();
}

The issues you have found earlier (filed as NETWORKNET-33351) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.