Unit tests, need good advice ?
From: Claude Vernier (ClaudeVernier_at_discussions.microsoft.com)
Date: 06/28/04
- Previous message: /kim/birkelund/aka/sekhmet: "Permissions granted based on assembly and user"
- Next in thread: Telmo Sampaio: "Re: Unit tests, need good advice ?"
- Reply: Telmo Sampaio: "Re: Unit tests, need good advice ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 28 Jun 2004 02:08:01 -0700
Hi all,
First, please excuse my english... don't hesitate to ask for more details...
I have a web service that need to be authenticated
to allow users to connect.
I'm building a Web Application to access this WS.
I want every one to be able to acces the application.
I tought, using this code to map outside user to a guest account:
if( System.Threading.Thread.CurrentPrincipal.Identity.IsAuthenticated )
{
_WS.Credentials = System.Net.CredentialCache.DefaultCredentials;
}
else
{
System.Net.NetworkCredential oCreds = new System.Net.NetworkCredential();
oCreds.Domain = "domain";
oCreds.UserName = "user";
oCreds.Password = "password";
_WS.Credentials = oCreds;
}
I have three problems/questions...
a) What do experienced people think of this solution.
b) I need to do Unit Test for this, can I simulate a not logged user ???
c) How should I make the password secure ??
Thanks you very much for any comments.
Claude Vernier
- Previous message: /kim/birkelund/aka/sekhmet: "Permissions granted based on assembly and user"
- Next in thread: Telmo Sampaio: "Re: Unit tests, need good advice ?"
- Reply: Telmo Sampaio: "Re: Unit tests, need good advice ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|