Hi,
So, I got the web messenger working on our server. Of course, I don't want cutesofts default.aspx page. I want to integrate ONLY the web messenger into our existing website. So I reviewed the cutesoft code a bit and added a testpage. Here's the code:
- testpage.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestPage.aspx.vb" Inherits="TestPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="lblWelcome" runat="server" Text="Welcome, " Width="302px"></asp:Label><br />
<br />
<asp:Button ID="btnLaunch" runat="server" Text="Launch IM" Width="150px" /> <br />
<br />
<asp:TextBox ID="txtAddBuddy" runat="server"></asp:TextBox>
<asp:Button ID="btnAddBuddy" runat="server" Text="Add User" Width="150px" /><br />
<br />
<asp:Label ID="lblUserID" runat="server" Text="UserID: " Width="301px"></asp:Label><br />
<br />
<asp:Label ID="lblError" runat="server" ForeColor="Red" Height="198px" Width="300px"></asp:Label></div>
</form>
</body>
</html>
- testpage.aspx.vb
Imports CuteSoft.Chat
Partial Class TestPage
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
lblWelcome.Text &= ChatApi.GetUser(ChatWebUtility.CurrentIdentity.UniqueName).ToString
End Sub
Protected Sub btnAddBuddy_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAddBuddy.Click
Dim usrMe As CuteChatUser = ChatApi.GetUser(ChatWebUtility.CurrentIdentity.UniqueName)
Dim usrBuddy As New CuteChatUser
usrBuddy.UniqueName = txtAddBuddy.Text
lblUserID.Text &= usrBuddy.UserId
If (usrMe.UserId = usrBuddy.UserId) Then
lblError.Text = "You can't add yourself."
ElseIf (usrMe.UserId = 0) Then
lblError.Text = "No user found."
Else
ChatApi.AddContact(usrMe.UserId, usrBuddy.UserId)
End If
End Sub
End Class
- web.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="CutePortalConfig" type="CutePortal.Config.CutePortalConfig, CutePortal" />
</configSections>
<CutePortalConfig>
<add key="DALAssembly" value="CutePortal" />
<add key="DALNamespace" value="CutePortal.SqlScopeDAL" />
<add key="PasswordLength" value="10" />
<add key="NewTopicTimeSpan" value="5" />
<add key="DefaultRank" value="DefaultRank" />
</CutePortalConfig>
<appSettings>
<!-- Connection String for SQL Server -->
<add key="ConnectionString" value="server=stuffhere"/>
</appSettings>
<system.web>
<httpModules>
<add name="CuteSoft.Chat" type="CuteSoft.Chat.EasyHttpZipModule,CuteSoft.Chat" />
</httpModules>
<pages validateRequest="false" />
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="Off" />
<authentication mode="Forms" />
<authorization>
<allow users="*" />
</authorization>
<trace enabled='true'></trace>
<sessionState mode="InProc" timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>
- directory structure (not sure if this is right or what i need or don't need)
localhost/admin
localhost/avatars
localhost/languages
localhost/theme
localhost/cutesoftclient
localhost/bin
this is the error i'm getting:
Server Error in '/' Application.
Parser Error
Description: An
error occurred during the parsing of a resource required to service
this request. Please review the following specific parse error details
and modify your source file appropriately.
Parser Error Message: Could not load type 'TestPage'.
Source Error:
Line 1: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestPage.aspx.vb" Inherits="TestPage" %> Line 2: Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
Source File: TestPage.aspx Line: 1
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300Thanks in advance...