简体   繁体   中英

Access Domino Server from asp.net

I picked up this project which used XML to access a domino server and returns data to a asp.net page. I know nothing about Domino.

The code that it is failing on is

objRequest.Credentials = new NetworkCredential(NSGlobal.User, NSGlobal.Password, NSGlobal.Domain);
            objRequest.PreAuthenticate=true;
            objRequest.Timeout = 1200000;
            objResponse = objRequest.GetResponse();

It fails on the last line and goes to the catch block. The catch error is "The remote server returned an error: (401) Unauthorized."

I have validated that the user, password and domain are valid. I am stumped. Please help.

not knowing much about the Domino APIs and seeing that your code seems to be mostly ok, I would play around with the properties of the objRequest to see if anything important has not been set yet.

see also this question: send email C# smtpclient using ibm lotus especially the answer where he explains that sometimes the order in which properties are set does matter!

this might also help: http://www.codeproject.com/KB/cs/lotusnoteintegrator.aspx

This has been solved. I replaced the web.config with a more recent one. I'm not sure why the difference, but I'm happy it is now working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM