[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Windows Authentication for WinForms Application

kool_sri

10/26/2004 10:45:00 AM

Dear All

I have seen one of the question in this group regarding this and an
answer directing to msdn article. The solution was wrt remoting. Can I
implement windows authentication on a simple windows form application.
If so how can i do so without any remoting/web services.

My scenario is of a simple windows application having only one form
and I want want when the user tries to run the app, I am authenticated
wrt windows. Please suggest.

Thanks n Regards
Sri
4 Answers

Ken Kolda

10/26/2004 3:35:00 PM

0

When the user runs the app, they're already logged into Windows. So is it
that you just want to know who they're logged in as, or do you want to
provide them the opporunity to enter a different login ID/password so the
app can run in another user's context?

Ken


"Sri" <kool_sri@hotmail.com> wrote in message
news:3f2140c3.0410260245.2bf91f1a@posting.google.com...
> Dear All
>
> I have seen one of the question in this group regarding this and an
> answer directing to msdn article. The solution was wrt remoting. Can I
> implement windows authentication on a simple windows form application.
> If so how can i do so without any remoting/web services.
>
> My scenario is of a simple windows application having only one form
> and I want want when the user tries to run the app, I am authenticated
> wrt windows. Please suggest.
>
> Thanks n Regards
> Sri


Srinivas Reddy

10/26/2004 4:33:00 PM

0

Hi Ken

Yes, I would like to know who has logged in and is he the authorised
user or not and which group he belongs to. And also how can i handle
this away from intranet (i mean in internet app or someone outside the
intranet) What is the best solution to handle this scenario.

thanks for replying

regards
sri



*** Sent via Developersdex http://www.develop... ***
Don't just participate in USENET...get rewarded for it!

Ken Kolda

10/26/2004 5:56:00 PM

0

You can get the current Windows identity by using
System.Security.Prinicpal.WindowsIdentity.GetCurrent(). Also, if you set the
Principal Policy on the AppDomain to WindowsPrincipal (using
AppDomain.SetPrincipalPolicy()), then you can get it from
Thread.CurrentPrincipal.

When you say "internet app", are you referring to a web app?

Ken

"Srinivas Reddy" <kool_sri@hotmail.com> wrote in message
news:uqvm0l3uEHA.2016@TK2MSFTNGP15.phx.gbl...
> Hi Ken
>
> Yes, I would like to know who has logged in and is he the authorised
> user or not and which group he belongs to. And also how can i handle
> this away from intranet (i mean in internet app or someone outside the
> intranet) What is the best solution to handle this scenario.
>
> thanks for replying
>
> regards
> sri
>
>
>
> *** Sent via Developersdex http://www.develop... ***
> Don't just participate in USENET...get rewarded for it!


Srinivas Reddy

10/27/2004 6:43:00 AM

0

Hi Ken

I wanted to know that is it possible to access my aplication both from
intranet and from outside teh intranet. If so how can i implement these?
What are the options. As you mentioned abt the windows authentication I
think it is only possible in intranet thing.

I would be thankful if I can get some example link from where I can see
the implementation.

Regards
Sri



*** Sent via Developersdex http://www.develop... ***
Don't just participate in USENET...get rewarded for it!