"Nick Large" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):
> I have a class library with a class for authentication that uses forms
> authentication.
>
> The RedirectFromLoginPage class is called through my application
> using:
>
> ClassLibrary.Authentication.FormsAuthentication.RedirectFromLoginPage(U
> serID, False)
>
> and, although this method works as intended, it leaves a warning
> (green squiggly) which looks like I don't know what I'm talking about
> (unprofessional). Here is the declaration:
>
> Public Shared mFormsAuthentication As New
> System.Web.Security.FormsAuthentication
>
> Public Shared Property FormsAuthentication() As
> System.Web.Security.FormsAuthentication
Why are you setting up FormsAuthentication as Shared in your application?
The methods are already Shared in nature, so you are not saving anything
here, but you are likely setting yourself up for other problems.
You can access FormsAuthentication at any point in time without wrapping it
in a class as a Shared member.
Peace and Grace,
--
Gregory A. Beamer
Microsoft MVP (Visual C# Architecture)
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
**********************************************
| Think outside the box! |
**********************************************