473,569 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ 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 15470
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.co m

"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.Samp les.Security.SS PI) 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.microso ft.com/cdo/configuration/smtpauthenticat e",
"2"); // select NTLM (2) authentication

// add user and password
mail.Fields.Add (http://schemas.microso ft.com/cdo/configuration/sendusername",
"usernameHere") ;
mail.Fields.Add (http://schemas.microso ft.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
4524
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 or DNS Error" page ("friendly HTTP message") or just hangs. Anybody know a workaround? Here's the current incarnation of my code: if...
2
1673
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 the user is using FireFox the user is presented with a login dialog box and that login info is validated against the web servers local user name...
1
2392
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 non-NTLM case, the user types his password into the web front end and server X passes it to Y in order to authenticate him. In the NTLM case, the...
1
875
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 doesn't pass through NTLM authentication without login and password. Internet explorer and Firefox do ! UseDefaultCredentials has been set to 'true'
2
4248
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 (Win Me O/s). It displays connection failed with a message displaying NTLM authentication is required. (when I tested on the server, server is able to...
40
7546
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 there a way to authenticate a user using WSE 3.0 against NTLM?? All the samples I have found on the web provide a solution based on
0
1237
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
4469
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.... with regards, mageswaran
1
1553
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 illustrating some code. In addition, look at the sspi package in the latest
0
1568
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
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.