473,396 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Strange c# Error

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.

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(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& 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(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
Nov 16 '05 #1
0 806

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
0
by: Kris Vanherck | last post by:
yesterday i started getting this strange error when i try to run my asp.net project: Compiler Error Message: CS0006: Metadata file 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net...
2
by: Kris Vanherck | last post by:
yesterday i started getting this strange error when i try to run my asp.net project: Compiler Error Message: CS0006: Metadata file 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net...
11
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
3
by: Shelly | last post by:
I am encountering two strange problems. First one: I get a "server misconfiguration error", but only sometimes. It occurs on the first screen that accesses the database on a submit. This error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.