473,657 Members | 2,461 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 15476
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
4532
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 (!$_SERVER && !$_SERVER && !$_SERVER) { header('HTTP/1.0 401 Authorization Required'); /*
2
1681
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 list and not the doamin username list. How do I get it to authenticate to the domain when using...
1
2400
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 user is already authenticated to X but since X does
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
4251
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 respond with telnet command - which means server is configured with telnet and the session is...
40
7572
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
1239
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
4478
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
1557
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
1573
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
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8603
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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 we have to send another system
2
1604
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.