Visual Basic .NET » XML Web Service
How to create login prompt for windows application. -- rhaazy --


Using C#

I want to have a login prompt that authenticates users from an XML file.

The XML file should store the hashed versions of passwords.

I can't seem to find any examples to get me started on this, does anyone have any suggestions?

-- BradleyPeter --


I can't see why you could possibly want to do this, but if you do, all you need is an XML file something like:

<users>
<user uid="user1" pwd="soifjdsofn" />
<user uid="......
</users>

Or alternatively:

<users>
<user>
<uid>user1</uid>
<pwd>soifjdsofn</pwd>
</user>
<user>
........
</users>

Then you can just parse the XML file in the normal way.

You'll probably want a schema and stuff for the XML file, but I assume you've read up about all that stuff.

Once you have your XML file just parse it using the .NET library facilities.

Vastly over-simplified, I know.

HTH
Peter
-----Original Message-----
From: DotNetDevelopment
How to create login prompt for windows application.
Using C#

I want to have a login prompt that authenticates users from an XML file.

The XML file should store the hashed versions of passwords.

I can't seem to find any examples to get me started on this, does anyone have any suggestions?


-- rhaazy --



Bradley, Peter wrote:
I can't see why you could possibly want to do this, but if you do, all
you need is an XML file something like:
I need a login prompt for my application, I don't know of any better way to do it so if you have any other ideas id be glad to hear them. 


-- BradleyPeter --

Forms authentication that authenticates against a secure database. The secure database stores hashed user ids and passwords.

HTH
Peter
-----Original Message-----
From: DotNetDevelopment on behalf of rhaazy Sent: Thu 7/13/2006 8:08 PM To: DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting Cc:
Subject:
Re: How to create login prompt for windows application.

Bradley, Peter wrote:
I can't see why you could possibly want to do this, but if you do, all
you need is an XML file something like:
I need a login prompt for my application, I don't know of any better way to do it so if you have any other ideas id be glad to hear them. 




-- BradleyPeter --

Sorry! I assumed you were doing ASP.NET - which may or may not be true.

If you're using Windows forms its much easier, of course, as you make sure your main form is the login form.
Peter
-----Original Message-----
From: DotNetDevelopment on behalf of rhaazy Sent: Thu 7/13/2006 8:08 PM To: DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting Cc:
Subject:
Re: How to create login prompt for windows application.

Bradley, Peter wrote:
I can't see why you could possibly want to do this, but if you do, all
you need is an XML file something like:
I need a login prompt for my application, I don't know of any better way to do it so if you have any other ideas id be glad to hear them. 




-- Cerebrus --


Peter wrote :

If you're using Windows forms its much easier, of course, as you make sure your main form is the login form.

That will work, no doubt, Peter, but I do not believe that is the best way. The Sub Main procedure should be set as the Startup object, 

instead. :-)

Rhaazy, See this thread where I have explained the procedure.
<
http://groups.google.com/group/DotNetDevelopment/browse_thread/thread/db1591178a256d52 
/>

-- BradleyPeter --


Yeah. I think that's what I meant, but didn't express it very well.

;)

Peter

-----Original Message-----
From: DotNetDevelopment
Re: How to create login prompt for windows application.
Peter wrote :

If you're using Windows forms its much easier, of course, as you make sure your main form is the login form.

That will work, no doubt, Peter, but I do not believe that is the best way. The Sub Main procedure should be set as the Startup object, 

instead. :-)

Rhaazy, See this thread where I have explained the procedure.
<
http://groups.google.com/group/DotNetDevelopment/browse_thread/thread/d 
b1591178a256d52/>


-- rhaazy --


. The Sub Main procedure should be set as the Startup object,
instead. :-)

By that do you means omething like this: 


using System;
using System.Windows.Forms;
namespace testMDI.Classes
{
/// <summary>
/// Summary description for clsMain.
/// </summary>
public class clsMain
{
public clsMain()
{
//
// TODO: Add constructor logic here
//
}

static void Main()
{
try
{
frmSplash objfrmSplash = new frmSplash();
frmSplash2 objfrmSplash2 = new frmSplash2();
objfrmSplash.ShowDialog();
objfrmSplash2.ShowDialog();
clsGlobal.g_objfrmMDIMain = new frmMDIMain();
Application.Run(clsGlobal.g_objfrmMDIMain);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message,"Client Scan",MessageBoxButtons.OK,MessageBoxIcon.Stop);
}
}
//This is the Single Threaded Apartment Model(out of our scope) of the application which will run the Main function
//when the application starts
}
}

-- Cerebrus --


Yep ! ;-)

[Submit Comment]Home