473,657 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remoting Authentificatio n

Hello! I have HttpChannel (client server) and I want to authenticate users
(username and password, specified not by system, but myself). Can you help
me please? Thanks a lot

My connection codes:
Server:
IDictionary props = new Hashtable();

props["typeFilterLeve l"] = "Full";

ListDictionary channelProperti es = new ListDictionary( );

channelProperti es.Add("port", 1185);

channelProperti es.Add("secure" , true);

channelProperti es.Add("imperso nate", true);

props["useDefaultCred entials"] = false;

HttpChannel chan = new HttpChannel(cha nnelProperties,

new SoapClientForma tterSinkProvide r(),

new SoapServerForma tterSinkProvide r(props, null));

m_objActSrv = (RemObj)Activat or.GetObject(

typeof(RemObj),

"http://localhost:1185/WTRemoteServer" );

if(ChannelServi ces.GetChannel( chan.ToString() ) == null )

ChannelServices .RegisterChanne l(chan);

RemotingConfigu ration.Register WellKnownServic eType(

typeof(RemObj),

"WTRemoteServer ", WellKnownObject Mode.Singleton) ;

Client:

channelProperti es = new ListDictionary( );

channelProperti es.Add("name", string.Empty);

channelProperti es.Add("port", 0);

channelProperti es.Add("secure" , true);

channelProperti es.Add("connect ionTimeout", 5000);

IDictionary props = new Hashtable();

props["typeFilterLeve l"] = "Full";

props["useDefaultCred entials"] = false;

NetworkCredenti al credentials = new NetworkCredenti al("usernamevr" ,
"passwordpass") ;

HttpChannel chan = new HttpChannel(cha nnelProperties,

new SoapClientForma tterSinkProvide r(),

new SoapServerForma tterSinkProvide r(props,null));

if(ChannelServi ces.GetChannel( chan.ToString() ) == null )

ChannelServices .RegisterChanne l(chan);

registedChan = chan;

string url = String.Format(" http://{0}:{1}/WTRemoteServer" , ip, port);

ISrvObj = (RemObj) (Activator.GetO bject(typeof(Re mObj), url));

ChannelServices .GetChannelSink Properties(ISrv Obj)["credential s"]=credentials
;
Nov 17 '05 #1
1 5438
Hope this helps you...

http://msdn.microsoft.com/library/de...tml/remsec.asp
http://www.rassoc.com/gregr/weblog/a....aspx?post=490

Regards,
--
Angel J. Hernández M.
MCP - MCAD - MCSD - MCDBA
http://groups.msn.com/desarrolladoresmiranda
http://www.consein.com
"teddy" <di****@email.c z> escribió en el mensaje
news:et******** ******@TK2MSFTN GP14.phx.gbl...
Hello! I have HttpChannel (client server) and I want to authenticate users
(username and password, specified not by system, but myself). Can you help
me please? Thanks a lot

My connection codes:
Server:
IDictionary props = new Hashtable();

props["typeFilterLeve l"] = "Full";

ListDictionary channelProperti es = new ListDictionary( );

channelProperti es.Add("port", 1185);

channelProperti es.Add("secure" , true);

channelProperti es.Add("imperso nate", true);

props["useDefaultCred entials"] = false;

HttpChannel chan = new HttpChannel(cha nnelProperties,

new SoapClientForma tterSinkProvide r(),

new SoapServerForma tterSinkProvide r(props, null));

m_objActSrv = (RemObj)Activat or.GetObject(

typeof(RemObj),

"http://localhost:1185/WTRemoteServer" );

if(ChannelServi ces.GetChannel( chan.ToString() ) == null )

ChannelServices .RegisterChanne l(chan);

RemotingConfigu ration.Register WellKnownServic eType(

typeof(RemObj),

"WTRemoteServer ", WellKnownObject Mode.Singleton) ;

Client:

channelProperti es = new ListDictionary( );

channelProperti es.Add("name", string.Empty);

channelProperti es.Add("port", 0);

channelProperti es.Add("secure" , true);

channelProperti es.Add("connect ionTimeout", 5000);

IDictionary props = new Hashtable();

props["typeFilterLeve l"] = "Full";

props["useDefaultCred entials"] = false;

NetworkCredenti al credentials = new NetworkCredenti al("usernamevr" ,
"passwordpass") ;

HttpChannel chan = new HttpChannel(cha nnelProperties,

new SoapClientForma tterSinkProvide r(),

new SoapServerForma tterSinkProvide r(props,null));

if(ChannelServi ces.GetChannel( chan.ToString() ) == null )

ChannelServices .RegisterChanne l(chan);

registedChan = chan;

string url = String.Format(" http://{0}:{1}/WTRemoteServer" , ip, port);

ISrvObj = (RemObj) (Activator.GetO bject(typeof(Re mObj), url));

ChannelServices .GetChannelSink Properties(ISrv Obj)["credential s"]=credentials
;

Nov 17 '05 #2

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

Similar topics

0
1443
by: maxx | last post by:
Hi, I want use the header authentification (HTTP/PHP module), and i've a big problem for to get the varaibles 'PHP_AUTH-*". This is my source code : --------------------------------------------------------------------------------- <?php function authentificate() { header('WWW-Authenticate: Basic realm="My Realm"');
1
1725
by: Jonas S. | last post by:
Hi all, I need some simple component (COM+ or just DLL) source to perform Basic Authentification for ASP solution. Short explanation what I mean: In non secure area I've a form with fields Login name and password. After pressing submit button that component has to redirect to page in secure area (https://) and perform NT Basic authentification [ or redirect to another page saying about failing). .. That has to be replacement of that...
2
1224
by: Junky | last post by:
Hi folks, well, I've read some articles on authentification, but somehow I can't get along with what I need. I need to get the login name from the OS to check if this person is even able to start the application. If so, the person should get login window for the web application that is checked against a user database. I tried to use "Windows" and "Forms" authentification, but it doesn't
6
1274
by: Ivan Demkovitch | last post by:
Hi! I'm reading thru everything I could find on "user Authentification" topic. There is couple of options ASP.NET suggest: Forms, Passport, etc... My application is simple portal with forums and Online store will be added in future. It will be hosted using hosting provider (no way to setup security, etc..)
6
1492
by: SalamElias | last post by:
I have an application where I added the attribute requireSSL="false" in the authentification elemnt in the dev environment and the apllication compile with no problem. What I want to do is, In production, is to use forms authentification, so when somebody clicks to view a protected page, he should be redirected to https://myserver/login.aspx instead of http://myserver/login.aspx I moved this application (Copy/paste) into a Virtual...
1
1810
by: bob | last post by:
1) Authentification NT: En ASP (pas ASP.Net), comment on recupere le login/pwd windows ? On veut automatiquement authentifier un utilisateur d'après son login NT (il a pas besoin de se connecter sur le site, on verifie qu'il a les droits d'apres son login). 2) Manipulation HTTP
3
2400
by: serge calderara | last post by:
Dear all, I clearly underdand the advantage of both type of authentification but is it allowed or possible to set the Authentication mode to Windows and then handle a login form for defined users in Credential section like as follow : <authentication mode="Windows" > <forms loginUrl="Login.aspx"> <credentials passwordFormat="Clear"> <user name="Jessee" password="JuneBug"/>
1
1263
by: HIK | last post by:
I am porting an ASP.net 1.1 application from a win2K server to win2k3 server. The application uses forms authentification. The authentification information is in a query string. The user goes to A.htm A refers to B.htm for validation and if valid goes back to A. htm with the following code in the validating page: Dim strredirect As String = Request("ReturnURL") Response.Redirect(strredirect, True)
2
1454
by: Greg Hill | last post by:
Hi I'm trying to access a web server that requires authentification for a https page. I can access http pages on that server but get "(401) Authentification Error" for the https page. I have a login for that page but don't know where my code is wrong. Any hints will be appreciated. TIA Greg Code:
4
1748
by: baramuse | last post by:
Hi all, before starting I must say that I'm a remoting beginner so I certainly didn't assimilate all the tricks of remoting so please be kind ;) Now here is my interrogation: I'm working on a client/server architecture for a callcenter software. The server is the only one connected to the oracle database and all the different clients (operator/admin...) are "connected" to the server via remoting (it's the best I've found to...
0
8413
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
8842
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
8740
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
7352
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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
5642
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
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
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
1970
muto222
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.