473,472 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

NTLM Authentication

Hello,

i need to perform NTML Authentication with SMTP against a exchange server. I
cant use existing libraries like CDO. The type1 and type2 mesages work OK.
Now i have to create the type3 message to authenticate. Are there any .NET
classes that i could use to create the NTLM response? Or smth else that can
do the NTLM authentication for me?

Thanx Alex
Nov 16 '05 #1
6 15452
Alexander,

You are handling the NLTM authentication yourself? I think that is not
a good idea, since you probably will not get it right, and if you do, you
will have to maintain that code.

Why can't you use libraries like CDO?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alexander Gnauck" <gn****@ag-software.de> wrote in message
news:2p************@uni-berlin.de...
Hello,

i need to perform NTML Authentication with SMTP against a exchange server.
I cant use existing libraries like CDO. The type1 and type2 mesages work
OK. Now i have to create the type3 message to authenticate. Are there any
.NET classes that i could use to create the NTLM response? Or smth else
that can do the NTLM authentication for me?

Thanx Alex

Nov 16 '05 #2
hello,
You are handling the NLTM authentication yourself? I think that is not
a good idea, since you probably will not get it right, and if you do, you
will have to maintain that code.
yes i handle it myself. I have seen internal classes in the framework with
the Reflector that are sealed :(. So i have no other chance i think.
Why can't you use libraries like CDO?


only one reason is that there is no support for Socks 4 and 5 Proxies in
CDO. What do you mean with "maintain the code"?

Alex

Nov 16 '05 #3
Alexander,

Following [1] article explains how one can add NTLM/Kerberos authentication
handshake protocols to the remoting channels. It includes a module
(Microsoft.Samples.Security.SSPI) written in MC++ (sources included) that
uses spnego (and SSPI) to handle authentication handshakes. I'm sure this is
what you are looking for.

Willy.

[1]
http://msdn.microsoft.com/library/de...ml/remsspi.asp

"Alexander Gnauck" <gn****@ag-software.de> wrote in message
news:2p************@uni-berlin.de...
Hello,

i need to perform NTML Authentication with SMTP against a exchange server.
I cant use existing libraries like CDO. The type1 and type2 mesages work
OK. Now i have to create the type3 message to authenticate. Are there any
.NET classes that i could use to create the NTLM response? Or smth else
that can do the NTLM authentication for me?

Thanx Alex

Nov 16 '05 #4
Hello,

found a Java Library at http://jcifs.samba.org/ and managed c# code from
Mono. So i extended this code a bit and it works pretty well. Similar code
is already in the Framework. Why does Microsoft seal this classes? Much
easier to develop with Mono here.

Alex
Nov 16 '05 #5
Not sure why you don't simply use System.Web.Mail here to connect to
Exchange server using smtp?
The Mailmessage class makes it possible to select NTLM as authentication
protocol when connecting to Exchange.

Here is how you could do this:

MailMessage mail = new MailMessage();
.....
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"2"); // select NTLM (2) authentication

// add user and password
mail.Fields.Add(http://schemas.microsoft.com/cdo/configuration/sendusername",
"usernameHere");
mail.Fields.Add(http://schemas.microsoft.com/cdo/configuration/sendpassword",
"userPwd");

SmtpMail.Send( mail );

Willy.

"Alexander Gnauck" <gn****@ag-software.de> wrote in message
news:2p************@uni-berlin.de...
Hello,

found a Java Library at http://jcifs.samba.org/ and managed c# code from
Mono. So i extended this code a bit and it works pretty well. Similar code
is already in the Framework. Why does Microsoft seal this classes? Much
easier to develop with Mono here.

Alex

Nov 16 '05 #6
> Not sure why you don't simply use System.Web.Mail here to connect to
Exchange server using smtp?


because it has no support for SOCKS4, SOCKS5 and other Proxies i need. Also
this class is only a wrapper to cdo which is not available on 9x Systems.

Alex
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bruce Lewis | last post by:
I've gotten NTLM authentication working with PHP 5.0.2 and IIS 5.0, so long as I use Internet Explorer 6.0.2800. Using IE 6.0.2900 authentication doesn't happen. IE displays a "Cannot find Server...
2
by: Buddy Ackerman | last post by:
If my web site is setup for NTLM authentication and the user is using IE the context.user.identity.name property is the domain user that is currently logged into the local client workstation. Wehen...
1
by: Andy Fish | last post by:
Hi, I have an asp.net application in several tiers and I would like to enable it for NTLM. Say the web front end is running on server X and the business logic is running on server Y. In the...
1
by: r0main | last post by:
Hi, I'm building a .NET C# Windows Forms Application, and I am facing authentication issues. The application makes requests to an http web server using the HttpWebRequest class. But it...
2
Bhanu Murthy
by: Bhanu Murthy | last post by:
I have Win2000 Server having 30 clients. I wanted to configure the server for Remote access with telnet application. I configured the server. But still I am not getting connected from the Client...
40
by: webrod | last post by:
Dear All, let's say I have a web service. I would like to authenticate users who try to access it. I am on a winnt server so I will have to use NTLM but I don't want to use IIS settings. Is...
0
by: test777 | last post by:
I want to get the machine name of the logged on user via an ASP page. I'll be using NTLM authentication, any idea? Thanks!
1
mageswar005
by: mageswar005 | last post by:
hi, How to integrate windows ntlm authentication in php, how to get windows login name by using ntlm authentication in php,if any one knows,please share with me its very urgent for me.... ...
1
by: Tim Golden | last post by:
Neuberger, Sheldon N. wrote: Frankly, I'd hate to try. Have a look at this: http://sourceforge.net/projects/ntlmaps/ in case it helps, either by providing a solution or at least by...
0
by: usmanbinasif | last post by:
Dear All, I am trying to implement NTLM Authentication on POP3 Server, anyone worked on it ??? I need help.............
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.