Click here to Skip to main content
15,900,706 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: MScomm32.ocx Pin
Dave Kreskowiak28-Jun-04 15:42
mveDave Kreskowiak28-Jun-04 15:42 
GeneralRe: MScomm32.ocx Pin
Name Removed28-Jun-04 15:53
Name Removed28-Jun-04 15:53 
GeneralRe: MScomm32.ocx Pin
Dave Kreskowiak28-Jun-04 16:20
mveDave Kreskowiak28-Jun-04 16:20 
GeneralRe: MScomm32.ocx Pin
Name Removed28-Jun-04 16:45
Name Removed28-Jun-04 16:45 
GeneralRe: MScomm32.ocx Pin
Dave Kreskowiak28-Jun-04 17:08
mveDave Kreskowiak28-Jun-04 17:08 
GeneralCurrency Validation Pin
Member 117945028-Jun-04 9:32
Member 117945028-Jun-04 9:32 
GeneralRe: Currency Validation Pin
Dave Kreskowiak29-Jun-04 3:20
mveDave Kreskowiak29-Jun-04 3:20 
GeneralBinary Serialization Issue Pin
tmfish28-Jun-04 9:16
tmfish28-Jun-04 9:16 
I'm having some issues with an attempt to serialize an object to file using a BinaryFormatter. The error I keep getting is:

The type System.Runtime.Remoting.ServerIdentity in Assembly mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as serializable.

Problem #1, I have no idea where I am referencing ServerIdentity. This is the method I am running in at the time of error:

Private Shared Sub DumpUnprocessedDeployments()
Try
Dim cntr As Integer = CollInstance.Count

If cntr > 0 Then
logger.WriteLog("Dumping " + cntr.ToString.Trim() + " unprocessed deployments....")
Dim s As Stream = File.Open("bin\webdeploy.dmp", FileMode.OpenOrCreate, FileAccess.ReadWrite)
Dim bf As New BinaryFormatter
Dim dpl As Deployment
Dim al As New ArrayList

For Each dpl In CollInstance
logger.WriteLog(dpl.Project + " " + dpl.State + " " + dpl.Package + " Requester: " + dpl.User, False)
bf.Serialize(s, dpl) ' <=== ERRORS OUT HERE
Next

s.Close()
Else
logger.WriteLog("No Unprocessed Deployments to Dump")
End If
Catch ex As Exception
logger.WriteLog("An ERROR was Encountered while Generating the Dump File....")
logger.WriteLog(ex.Message, False)
End Try
End Sub

Here is the Code for the Serialized Object:
Imports System
Imports CM.WebDeployment.Interfaces

<serializable()> Public Class Deployment
Inherits MarshalByRefObject
Implements IDeployment

Private IsPending As Boolean
Private RunWhen As Date
Private FTPDir As String
Private FTPPwd As String
Private FTPSvr As String
Private FTPUsr As String
Private HPkg As String
Private HPwd As String
Private HProj As String
Private HState As String
Private HUsr As String

#Region " Object Constructor(s) "
Public Sub New()
MyBase.New()
End Sub

Public Sub New(ByVal HarProj As String, ByVal HarState As String, ByVal HarPackage As String, _
ByVal HarUser As String, ByVal HarPassword As String, ByVal FServer As String, _
ByVal FDir As String, ByVal FUser As String, ByVal FPassword As String, _
ByVal RunTime As Date)
MyBase.New()
HProj = HarProj
HState = HarState
HPkg = HarPackage
HUsr = HarUser
HPwd = HarPassword
FTPSvr = FServer
FTPDir = FDir
FTPUsr = FUser
FTPPwd = FPassword
RunWhen = RunTime
End Sub
#End Region

#Region " Implemented Properties From IDeployment "
Public ReadOnly Property FTPDirectory() As String Implements Interfaces.IDeployment.FTPDirectory
Get
Return FTPDir
End Get
End Property

Public ReadOnly Property FTPPassword() As String Implements Interfaces.IDeployment.FTPPassword
Get
Return FTPPwd
End Get
End Property

Public ReadOnly Property FTPServer() As String Implements Interfaces.IDeployment.FTPServer
Get
Return FTPSvr
End Get
End Property

Public ReadOnly Property FTPUser() As String Implements Interfaces.IDeployment.FTPUser
Get
Return FTPUsr
End Get
End Property

Public ReadOnly Property Package() As String Implements Interfaces.IDeployment.Package
Get
Return HPkg
End Get
End Property

Public ReadOnly Property Password() As String Implements Interfaces.IDeployment.Password
Get
Return HPwd
End Get
End Property

Public ReadOnly Property Project() As String Implements Interfaces.IDeployment.Project
Get
Return HProj
End Get
End Property

Public ReadOnly Property RunTime() As Date Implements Interfaces.IDeployment.RunTime
Get
Return RunWhen
End Get
End Property

Public ReadOnly Property State() As String Implements Interfaces.IDeployment.State
Get
Return HState
End Get
End Property

Public ReadOnly Property User() As String Implements Interfaces.IDeployment.User
Get
Return HUsr
End Get
End Property
#End Region

Public Property Pending() As Boolean
Get
Return IsPending
End Get
Set(ByVal Value As Boolean)
IsPending = Value
End Set
End Property
End Class

Problem #2, this was working 3 days ago (no changes made to the Deployment class).

Any help on this would be great.
QuestionSetup Project for 2 0r 3 solutions? Pin
mythinky27-Jun-04 18:02
mythinky27-Jun-04 18:02 
AnswerRe: Setup Project for 2 0r 3 solutions? [EDITED] Pin
Dave Kreskowiak28-Jun-04 0:46
mveDave Kreskowiak28-Jun-04 0:46 
Generaltab command Pin
GaryKoh27-Jun-04 16:46
GaryKoh27-Jun-04 16:46 
GeneralRe: tab command Pin
bneacetp27-Jun-04 18:33
bneacetp27-Jun-04 18:33 
GeneralRe: tab command Pin
GaryKoh28-Jun-04 3:07
GaryKoh28-Jun-04 3:07 
GeneralRe: tab command Pin
Dave Kreskowiak28-Jun-04 3:30
mveDave Kreskowiak28-Jun-04 3:30 
QuestionSelect Expert in CrystalReportViewer? Pin
mythinky27-Jun-04 15:31
mythinky27-Jun-04 15:31 
AnswerRe: Select Expert in CrystalReportViewer? Pin
Dave Kreskowiak28-Jun-04 3:17
mveDave Kreskowiak28-Jun-04 3:17 
GeneralRe: Select Expert in CrystalReportViewer? Pin
mythinky28-Jun-04 15:34
mythinky28-Jun-04 15:34 
GeneralRe: Select Expert in CrystalReportViewer? Pin
Dave Kreskowiak28-Jun-04 15:39
mveDave Kreskowiak28-Jun-04 15:39 
GeneralManually disposing objects with API Pin
Name Removed27-Jun-04 13:45
Name Removed27-Jun-04 13:45 
GeneralRe: Manually disposing objects with API Pin
Dave Kreskowiak27-Jun-04 14:31
mveDave Kreskowiak27-Jun-04 14:31 
GeneralRe: Manually disposing objects with API Pin
Name Removed27-Jun-04 15:36
Name Removed27-Jun-04 15:36 
GeneralRe: Manually disposing objects with API Pin
Dave Kreskowiak27-Jun-04 18:18
mveDave Kreskowiak27-Jun-04 18:18 
GeneralConverting C# code to VB.NET code... Pin
milkmood27-Jun-04 12:54
milkmood27-Jun-04 12:54 
GeneralRe: Converting C# code to VB.NET code... Pin
milkmood27-Jun-04 13:26
milkmood27-Jun-04 13:26 
GeneralRe: Converting C# code to VB.NET code... Pin
Christian Graus27-Jun-04 13:35
protectorChristian Graus27-Jun-04 13:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.