Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: SaslNtlm problem Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
greenbee
Newbie
Newbie


Joined: 21 July 2008
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 21 July 2008 at 8:26am | IP Logged Quote greenbee

I'm trying to connect to a pop mail server using NTLM.
This code:

Pop3.LicenseKey = licenseKey;
            Pop3 server = new Pop3();
            server.SslMode = MailBee.Security.SslStartupMode.Manual;
            server.SslProtocol = MailBee.Security.SecurityProtocol.Tls1;
            server.Connect(txtServer.Text, int.Parse(txtPort.Text), false);
            server.Login(null, null, MailBee.AuthenticationMethods.SaslNtlm, MailBee.AuthenticationOptions.None, null);


works perfect in a desktop application
but does not work when used in a webform with <identity impersonate="true" />
Error: The server has rejected authentication data sent by the client. The server responded: -ERR Logon Failure.
I've tried many different values for
server.SslMode
server.SslProtocol
AuthenticationMethods
AuthenticationOptions

sometimes I get another error meaning that the method is not supported or something like that. But the most of the time I get the error above.

When I provide my login and password instead of null with the all other settings remaining the same the login is successfull

What to do with that?
Back to Top View greenbee's Profile Search for other posts by greenbee
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 21 July 2008 at 9:10am | IP Logged Quote Alex

Probably impersonation is not working as you expected. You should make sure your web application is actually executed under the context of your user account. For instance, check what System.Security.Principal.WindowsIdentity.GetCurrent().Name returns.

See the following link for more information:
http://msdn.microsoft.com/en-us/library/xh507fc5(VS.71).aspx

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
greenbee
Newbie
Newbie


Joined: 21 July 2008
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 22 July 2008 at 4:25am | IP Logged Quote greenbee

Impersonation works as expected.
System.Security.Principal.WindowsIdentity.GetCurrent().Name returns the current user name - the same as in the desktop application
Back to Top View greenbee's Profile Search for other posts by greenbee
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 22 July 2008 at 7:22am | IP Logged Quote Igor

Please try to check "Load User Profile" setting of your application pool. To find it, open the list of application pools in IIS Manager, select the application pool you are using and open "Advanced Settings..." section.

Regards,
Igor.
Back to Top View Igor's Profile Search for other posts by Igor
 
greenbee
Newbie
Newbie


Joined: 21 July 2008
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 22 July 2008 at 8:15am | IP Logged Quote greenbee

I'm using Windows Server 2003
There is no such option in IIS Manager for Application Pool...
Back to Top View greenbee's Profile Search for other posts by greenbee
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 23 July 2008 at 6:50am | IP Logged Quote Andrew

We're investigating this, but have not succeeded yet.

We found some hints and are trying them:

http://www.velocityreviews.com/forums/t70658-impersonate-and -iis6-driving-me-nuts.html
http://technet2.microsoft.com/windowsserver/en/library/b3d24 617-7673-4f10-8408-5250374fd4311033.mspx?mfr=true
http://technet2.microsoft.com/windowsserver/en/library/06c46 43a-34e8-4d47-a674-89f4e79fd0fa1033.mspx?mfr=true


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 24 July 2008 at 7:37am | IP Logged Quote Alex

Looks like a bug in Windows 2003 POP3 service. SMTP service of the same mail server (Windows 2003 IIS) is working fine with NTLM in Windows Integrated Authentication mode and impersonation.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide