Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have this line of code in ASP.Net 2.0/VB.Net Global.asax file:

 

Try
           If e.Identity.IsAuthenticated And Not (e.Identity.IsAnonymous) And _
             e.Identity.AuthenticationType.Length <> 0 Then
               Dim userIdentity As String
               userIdentity = e.Identity.Name()
           End If
       Catch ex As Exception
           HttpContext.Current.Response.Redirect[b]("[color=Blue]AccessDenied.aspx?Authenticated="[/color] + [color=YellowGreen]e.Identity.IsAuthenticated [/color] [/b] + "&Anonymous=" + e.Identity.IsAnonymous)


       End Try



 

For the Blue text, I get this error msg:

Option Strict On disallows implicit conversions from 'String' to 'Double'

 

For the Green Text, I get this:

Option Strict On disallows implicit conversions from 'Boolean' to 'Double'

 

I tried CType and CDbl but still get errors. Any ideas on what to do? I have

Strict Option On.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...