Newbie - please help with wierd unhandled exception issue

  • Thread starter Thread starter Daniel Reber
  • Start date Start date
D

Daniel Reber

I am getting a strange unhandeled exception message. The same code is
working on many serevrs but I am getting an error at this one. The server is
locked down security wise and many of the windows services are disabled. The
code and unhandeled exception message, is below.

Any ideas?

Thanks

Dan Reber



try

{
//only open file if it exists
if (File.Exists(filePath + "ServerSettings.osl"))
{
ServerSettings server = new ServerSettings();
EncryptDecrypt cypher = new EncryptDecrypt();

//Open the serialized file.
Stream stream = File.Open(filePath + "ServerSettings.osl", FileMode.Open);
BinaryFormatter bformatter = new BinaryFormatter();

server = (ServerSettings)bformatter.Deserialize(stream);
stream.Close();

this.txtPath.Text = cypher.Decrypt(server.WatchPath); <-- Seems to be
failing here!
this.txtFile.Text = cypher.Decrypt(server.WatchFile);
this.txtSyntax.Text = cypher.Decrypt(server.ExeSyntax);
this.txtAcctFrom.Text = cypher.Decrypt(server.AcctFrom);
this.txtAcctName.Text = cypher.Decrypt(server.AcctName);
this.txtDatabase.Text = cypher.Decrypt(server.DatabaseName);
this.txtPassword.Text = cypher.Decrypt(server.AcctPassword);
this.txtServer.Text = cypher.Decrypt(server.ServerName);
this.txtSMTPServer.Text = cypher.Decrypt(server.SMTPName);

emailIsOk = ValidateEmailValues();
databaseIsOK = ValidateDBValues();
this.cmdOK.Enabled = emailIsOk & databaseIsOK;

}
}
catch(Exception eGet)
{
MessageBox.Show (this,"Error getting
settings.","PXPMonitorSetup",MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
eventLog1.WriteEntry(eGet.Message,
System.Diagnostics.EventLogEntryType.Error);
}


************** Exception Text **************
System.MissingMethodException: Method not found: System.String
PXP.JobLib.ServerSettings.get_WatchPath().
at PXP.Monitor.frmSettings.frmSettings_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
 
For some reason yr server object doesnt seem to have a get property
defined. This could be because your library (PXP.Joblib??) may not be
upto date? HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top