D
Daniel Friend
I am trying to add the following as my global.asax file in vb. I am getting
errors like crazy. They are as follows
* Error 1 There can be only one 'application' directive.
* Error 4 Validation (ASP.Net): This attribute name must be followed by an
equal (=) sign and a value. If the value is in quotation marks, the
quotation marks must match.
* Error 5 Validation (ASP.Net): Attribute 'Implements' is not a valid
attribute of element 'Application'.
* Error 6 Validation (ASP.Net): Attribute 'Interface' is not a valid
attribute of element 'Application'.
Please help me get this working
Thanks,
Dan
GLOBAL.ASAX
<%@ Application %>
<%@ Implements
Interface="CuteSoft.Chat.IHttpApplicationConnectionStringProvider" %>
<%@ Implements Interface="CuteSoft.Chat.IHttpApplicationUserAdapter" %>
<%@ Implements Interface="CuteSoft.Chat.IHttpApplicationDataProvider" %>
<%@ Implements Interface="CuteSoft.Chat.IHttpApplicationSupportLogin" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="CuteSoft.Chat" %>
<Script runat=server Language=VB>
#Region " IHttpApplicationConnectionStringProvider Members "
'Step 1: Let CuteChat know your databse connection string
Public Function GetConnectionString(ByVal user As
CuteSoft.Chat.UserIdentity) As String Implements
CuteSoft.Chat.IHttpApplicationConnectionStringProvider.GetConnectionString
'Return
System.Configuration.ConfigurationSettings.AppSettings("ConnectionString")
Return "NOT IMPLEMENTED"
End Function
#End Region
#Region " IHttpApplicationUserAdapter Members "
'Step 2: Let CuteChat know who has logged in the website
Public Function GetUserUniqueName() As String Implements
CuteSoft.Chat.IHttpApplicationUserAdapter.GetUserUniqueName
'If Not Context.Request.IsAuthenticated Then
' Return Nothing
'End If
''email
'Return Context.User.Identity.Name
Return "NOT IMPLEMENTED"
End Function
Public Function GetUserIdentity() As CuteSoft.Chat.UserIdentity
Implements CuteSoft.Chat.IHttpApplicationUserAdapter.GetUserIdentity
Dim un As String = GetUserUniqueName()
If un Is Nothing Then
Return CuteSoft.Chat.UserIdentity.CreateNull()
End If
Return New CuteSoft.Chat.UserIdentity(un, Nothing,
Context.Request.UserHostAddress)
End Function
#End Region
</Script>
errors like crazy. They are as follows
* Error 1 There can be only one 'application' directive.
* Error 4 Validation (ASP.Net): This attribute name must be followed by an
equal (=) sign and a value. If the value is in quotation marks, the
quotation marks must match.
* Error 5 Validation (ASP.Net): Attribute 'Implements' is not a valid
attribute of element 'Application'.
* Error 6 Validation (ASP.Net): Attribute 'Interface' is not a valid
attribute of element 'Application'.
Please help me get this working
Thanks,
Dan
GLOBAL.ASAX
<%@ Application %>
<%@ Implements
Interface="CuteSoft.Chat.IHttpApplicationConnectionStringProvider" %>
<%@ Implements Interface="CuteSoft.Chat.IHttpApplicationUserAdapter" %>
<%@ Implements Interface="CuteSoft.Chat.IHttpApplicationDataProvider" %>
<%@ Implements Interface="CuteSoft.Chat.IHttpApplicationSupportLogin" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="CuteSoft.Chat" %>
<Script runat=server Language=VB>
#Region " IHttpApplicationConnectionStringProvider Members "
'Step 1: Let CuteChat know your databse connection string
Public Function GetConnectionString(ByVal user As
CuteSoft.Chat.UserIdentity) As String Implements
CuteSoft.Chat.IHttpApplicationConnectionStringProvider.GetConnectionString
'Return
System.Configuration.ConfigurationSettings.AppSettings("ConnectionString")
Return "NOT IMPLEMENTED"
End Function
#End Region
#Region " IHttpApplicationUserAdapter Members "
'Step 2: Let CuteChat know who has logged in the website
Public Function GetUserUniqueName() As String Implements
CuteSoft.Chat.IHttpApplicationUserAdapter.GetUserUniqueName
'If Not Context.Request.IsAuthenticated Then
' Return Nothing
'End If
'Return Context.User.Identity.Name
Return "NOT IMPLEMENTED"
End Function
Public Function GetUserIdentity() As CuteSoft.Chat.UserIdentity
Implements CuteSoft.Chat.IHttpApplicationUserAdapter.GetUserIdentity
Dim un As String = GetUserUniqueName()
If un Is Nothing Then
Return CuteSoft.Chat.UserIdentity.CreateNull()
End If
Return New CuteSoft.Chat.UserIdentity(un, Nothing,
Context.Request.UserHostAddress)
End Function
#End Region
</Script>