Unit tests, need good advice ?

From: Claude Vernier (ClaudeVernier_at_discussions.microsoft.com)
Date: 06/28/04

  • Next message: Özden Irmak: "context.GetSavedLicenseKey Bug?"
    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


  • Next message: Özden Irmak: "context.GetSavedLicenseKey Bug?"

    Relevant Pages

    • Accessing Web Services from VC++ 7.1 (NOT MANAGED)
      ... Is it possible to access an Web Service from VC++ 7.1 not managed (actually ... using MFC)? ... the translation. ... Please correct me so I may learn better English! ...
      (microsoft.public.vc.language)
    • accessing Web Services from VC++ 7.1 NOT MANAGED
      ... Is it possible to access a Web Service from VC++ 7.1 NOT MANAGE code? ... so anything strange, or insulting, is due to ... the translation. ... Please correct me so I may learn better English! ...
      (microsoft.public.dotnet.framework.webservices)
    • Web Service and Dataset, my mistake or bug?
      ... I'm relatively new to Web Service, and C# for that matter, so please excuse me if this is a dumb question... ...
      (microsoft.public.dotnet.framework.webservices)
    • Generic Web Service Question
      ... I am a relative newbie to the web services world and hence, do excuse ... We have a request to come up with a ... 'generic web service' for file upload. ...
      (microsoft.public.dotnet.framework.aspnet.webservices)
    • Web Service Client That Doesnt Have IIS
      ... I'm new to web services so excuse me if this is a simple question. ... Can I call a web service from an application (Windows Service written ... please point me to some docs and\or APIs that allow me to do this. ... (The web service is hosted on a web server). ...
      (microsoft.public.dotnet.framework.webservices)