By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,617 Members | 1,605 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,617 IT Pros & Developers. It's quick & easy.

Meta Data not found when using a Windows Service

P: n/a
Yesterday afternoon I was getting the following errors in a windows service:

'DatabaseManager.DataComponent', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found'

Service ran all night fine. This morning I reconnected to the process and
the errors are no longer there. Only thing I can think of is if logging off
and back on did something. I should also note that yesterday visual studio
crashed on me when I had the solution open and tried to connect to the
windows service project.

Does anyone with a better understanding of the CLR have any possible
explaination for the inconsistant errors?

Thanks,
Nathan
Nov 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Nathan,

Are all of these your dlls? Are these exceptions that are being thrown
and logged? If so, what are the types of the exceptions, as well as the
other details?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
Yesterday afternoon I was getting the following errors in a windows
service:

'DatabaseManager.DataComponent', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found'

Service ran all night fine. This morning I reconnected to the process and
the errors are no longer there. Only thing I can think of is if logging
off and back on did something. I should also note that yesterday visual
studio crashed on me when I had the solution open and tried to connect to
the windows service project.

Does anyone with a better understanding of the CLR have any possible
explaination for the inconsistant errors?

Thanks,
Nathan

Nov 17 '05 #2

P: n/a
Scripting Methods.dll I wrote from scratch.

RemoteLoader.dll and wwScripting.dll are mostly code snippets from others
have done online.

In 'DatabaseManager.DataComponent' which is one I wrote I have the following
method. Notice the error handling. All I logged was e.Message. If you
think I should grab more information for next time please let me know. When
I was debugging with a windows form I was logging to a file. When I made it
a service I discovered I couldn't do that, and at the time I got these
errors I was simply having log dump to the Debug.WriteLine. I will have it
logging to Sql soon.

public void RunEventsByStockID(int stockID, int eventTypeID, int accountID)
{

//Use AccountID=0 to execute event on all accounts

RefreshEventList();

foreach (StockData.EventListRow r in stockData2.EventList)

{

if (r.StockID==stockID && r.EventTypeID==eventTypeID && (accountID==0 ||
accountID==r.AccountID))

{

wwScripting loScript = new wwScripting(r.EventLanguage);

// loScript.CreateAppDomain("MyAppDomain")
// Add any assemblies referenced

loScript.AddAssembly("ScriptingMethods.dll");

loScript.AddNamespace("ScriptingMethods");

System.Text.StringBuilder sb=new System.Text.StringBuilder("");

sb.Append("public string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionString) {");

sb.Append("\r\n");

sb.Append("ScriptingMethods.StockMethods Stock=new
ScriptingMethods.StockMethods(accountID, eventTypeID, stockID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append("ScriptingMethods.AccountMethods Account=new
ScriptingMethods.AccountMethods(accountID, eventTypeID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append(@"string LogMessage=""Blank Log Message"";");

sb.Append("\r\n");

sb.Append(r.EventCode);

sb.Append("\r\n");

sb.Append("return LogMessage;");

sb.Append("\r\n");

sb.Append("}");

sb.Append("\r\n");

string code=sb.ToString();

object objResult=loScript.ExecuteMethod(code, "ExecEvent", r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnectionString);

string lcResult;

try{

lcResult=(string) objResult;

}

catch(Exception e)

{

lcResult=e.Message;

}
if (loScript.bError)

{

log.LogText(this.ToString(),"Error",loScript.cErro rMsg);

}

else

{

if(lcResult.Length>0)

log.LogText(this.ToString(),"Result",lcResult);

}

loScript.Dispose();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP14.phx.gbl...
Nathan,

Are all of these your dlls? Are these exceptions that are being thrown
and logged? If so, what are the types of the exceptions, as well as the
other details?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
Yesterday afternoon I was getting the following errors in a windows
service:

'DatabaseManager.DataComponent', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found'

Service ran all night fine. This morning I reconnected to the process
and the errors are no longer there. Only thing I can think of is if
logging off and back on did something. I should also note that yesterday
visual studio crashed on me when I had the solution open and tried to
connect to the windows service project.

Does anyone with a better understanding of the CLR have any possible
explaination for the inconsistant errors?

Thanks,
Nathan


Nov 17 '05 #3

P: n/a
What's the identity of the service account?
Where are these dll's located?
What dependencies do they have?
What's are you using in AddAssembly to locate/load the DLL's?

Willy.

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Scripting Methods.dll I wrote from scratch.

RemoteLoader.dll and wwScripting.dll are mostly code snippets from others
have done online.

In 'DatabaseManager.DataComponent' which is one I wrote I have the
following method. Notice the error handling. All I logged was e.Message.
If you think I should grab more information for next time please let me
know. When I was debugging with a windows form I was logging to a file.
When I made it a service I discovered I couldn't do that, and at the time
I got these errors I was simply having log dump to the Debug.WriteLine. I
will have it logging to Sql soon.

public void RunEventsByStockID(int stockID, int eventTypeID, int
accountID)
{

//Use AccountID=0 to execute event on all accounts

RefreshEventList();

foreach (StockData.EventListRow r in stockData2.EventList)

{

if (r.StockID==stockID && r.EventTypeID==eventTypeID && (accountID==0 ||
accountID==r.AccountID))

{

wwScripting loScript = new wwScripting(r.EventLanguage);

// loScript.CreateAppDomain("MyAppDomain")
// Add any assemblies referenced

loScript.AddAssembly("ScriptingMethods.dll");

loScript.AddNamespace("ScriptingMethods");

System.Text.StringBuilder sb=new System.Text.StringBuilder("");

sb.Append("public string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionString) {");

sb.Append("\r\n");

sb.Append("ScriptingMethods.StockMethods Stock=new
ScriptingMethods.StockMethods(accountID, eventTypeID, stockID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append("ScriptingMethods.AccountMethods Account=new
ScriptingMethods.AccountMethods(accountID, eventTypeID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append(@"string LogMessage=""Blank Log Message"";");

sb.Append("\r\n");

sb.Append(r.EventCode);

sb.Append("\r\n");

sb.Append("return LogMessage;");

sb.Append("\r\n");

sb.Append("}");

sb.Append("\r\n");

string code=sb.ToString();

object objResult=loScript.ExecuteMethod(code, "ExecEvent", r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnectionString);

string lcResult;

try{

lcResult=(string) objResult;

}

catch(Exception e)

{

lcResult=e.Message;

}
if (loScript.bError)

{

log.LogText(this.ToString(),"Error",loScript.cErro rMsg);

}

else

{

if(lcResult.Length>0)

log.LogText(this.ToString(),"Result",lcResult);

}

loScript.Dispose();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2****************@TK2MSFTNGP14.phx.gbl...
Nathan,

Are all of these your dlls? Are these exceptions that are being
thrown and logged? If so, what are the types of the exceptions, as well
as the other details?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
Yesterday afternoon I was getting the following errors in a windows
service:

'DatabaseManager.DataComponent', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found'

Service ran all night fine. This morning I reconnected to the process
and the errors are no longer there. Only thing I can think of is if
logging off and back on did something. I should also note that
yesterday visual studio crashed on me when I had the solution open and
tried to connect to the windows service project.

Does anyone with a better understanding of the CLR have any possible
explaination for the inconsistant errors?

Thanks,
Nathan



Nov 17 '05 #4

P: n/a
I have inserted answers below. I won't be able to check this again until
tomorrow.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:u0**************@TK2MSFTNGP12.phx.gbl...
What's the identity of the service account?
I don't know what you mean by identity of the service account. The name of
the service is StockMgrService. Where do I look for this Identity?
Where are these dll's located? The dll's are installed to the same folder as the rest of the application.
What dependencies do they have? SystemMethods.dll
System
System.Data
System.XML
using System;

using System.Data;

using System.Diagnostics;
RemoteLoader.dll
System
using System;

using System.Reflection;

wwScripting.dll
RemoteLoader
System
System.Data
using System;

using System.IO;

using System.Text;

using Microsoft.CSharp;

using Microsoft.VisualBasic;

using System.Reflection;

using System.Runtime.Remoting;

using System.CodeDom.Compiler;
What's are you using in AddAssembly to locate/load the DLL's? /// <summary>

/// Adds an assembly to the compiled code

/// </summary>

/// <param name="lcAssemblyDll">DLL assembly file name</param>

/// <param name="lcNamespace">Namespace to add if any. Pass null if no
namespace is to be added</param>

public void AddAssembly(string lcAssemblyDll,string lcNamespace)

{

if (lcAssemblyDll==null && lcNamespace == null)

{

// *** clear out assemblies and namespaces

this.oParameters.ReferencedAssemblies.Clear();

this.cNamespaces = "";

return;

}
if (lcAssemblyDll != null)

this.oParameters.ReferencedAssemblies.Add(lcAssemb lyDll);
if (lcNamespace != null)

if (this.cScriptingLanguage == "CSharp")

this.cNamespaces = this.cNamespaces + "using " + lcNamespace + ";\r\n";

else

this.cNamespaces = this.cNamespaces + "imports " + lcNamespace + "\r\n";

}

/// <summary>

/// Adds an assembly to the compiled code.

/// </summary>

/// <param name="lcAssemblyDll">DLL assembly file name</param>

public void AddAssembly(string lcAssemblyDll)

{

this.AddAssembly(lcAssemblyDll,null);

}

public void AddNamespace(string lcNamespace)

{

this.AddAssembly(null,lcNamespace);

}

public void AddDefaultAssemblies()

{

this.AddAssembly("System.dll","System");

this.AddNamespace("System.Reflection");

this.AddNamespace("System.IO");

}


Willy.

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Scripting Methods.dll I wrote from scratch.

RemoteLoader.dll and wwScripting.dll are mostly code snippets from others
have done online.

In 'DatabaseManager.DataComponent' which is one I wrote I have the
following method. Notice the error handling. All I logged was
e.Message. If you think I should grab more information for next time
please let me know. When I was debugging with a windows form I was
logging to a file. When I made it a service I discovered I couldn't do
that, and at the time I got these errors I was simply having log dump to
the Debug.WriteLine. I will have it logging to Sql soon.

public void RunEventsByStockID(int stockID, int eventTypeID, int
accountID)
{

//Use AccountID=0 to execute event on all accounts

RefreshEventList();

foreach (StockData.EventListRow r in stockData2.EventList)

{

if (r.StockID==stockID && r.EventTypeID==eventTypeID && (accountID==0 ||
accountID==r.AccountID))

{

wwScripting loScript = new wwScripting(r.EventLanguage);

// loScript.CreateAppDomain("MyAppDomain")
// Add any assemblies referenced

loScript.AddAssembly("ScriptingMethods.dll");

loScript.AddNamespace("ScriptingMethods");

System.Text.StringBuilder sb=new System.Text.StringBuilder("");

sb.Append("public string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionString) {");

sb.Append("\r\n");

sb.Append("ScriptingMethods.StockMethods Stock=new
ScriptingMethods.StockMethods(accountID, eventTypeID, stockID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append("ScriptingMethods.AccountMethods Account=new
ScriptingMethods.AccountMethods(accountID, eventTypeID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append(@"string LogMessage=""Blank Log Message"";");

sb.Append("\r\n");

sb.Append(r.EventCode);

sb.Append("\r\n");

sb.Append("return LogMessage;");

sb.Append("\r\n");

sb.Append("}");

sb.Append("\r\n");

string code=sb.ToString();

object objResult=loScript.ExecuteMethod(code, "ExecEvent", r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnectionString);

string lcResult;

try{

lcResult=(string) objResult;

}

catch(Exception e)

{

lcResult=e.Message;

}
if (loScript.bError)

{

log.LogText(this.ToString(),"Error",loScript.cErro rMsg);

}

else

{

if(lcResult.Length>0)

log.LogText(this.ToString(),"Result",lcResult);

}

loScript.Dispose();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2****************@TK2MSFTNGP14.phx.gbl...
Nathan,

Are all of these your dlls? Are these exceptions that are being
thrown and logged? If so, what are the types of the exceptions, as well
as the other details?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
Yesterday afternoon I was getting the following errors in a windows
service:

'DatabaseManager.DataComponent', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found'

Service ran all night fine. This morning I reconnected to the process
and the errors are no longer there. Only thing I can think of is if
logging off and back on did something. I should also note that
yesterday visual studio crashed on me when I had the solution open and
tried to connect to the windows service project.

Does anyone with a better understanding of the CLR have any possible
explaination for the inconsistant errors?

Thanks,
Nathan



Nov 17 '05 #5

P: n/a
I am not sure why this wasn't sent last week. Here it is again.

I have inserted answers below. I won't be able to check this again until
tomorrow.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:u0**************@TK2MSFTNGP12.phx.gbl...
What's the identity of the service account?
I don't know what you mean by identity of the service account. The name of
the service is StockMgrService. Where do I look for this Identity?
Where are these dll's located? The dll's are installed to the same folder as the rest of the application.
What dependencies do they have? SystemMethods.dll
System
System.Data
System.XML
using System;

using System.Data;

using System.Diagnostics;
RemoteLoader.dll
System
using System;

using System.Reflection;

wwScripting.dll
RemoteLoader
System
System.Data
using System;

using System.IO;

using System.Text;

using Microsoft.CSharp;

using Microsoft.VisualBasic;

using System.Reflection;

using System.Runtime.Remoting;

using System.CodeDom.Compiler;
What's are you using in AddAssembly to locate/load the DLL's? /// <summary>

/// Adds an assembly to the compiled code

/// </summary>

/// <param name="lcAssemblyDll">DLL assembly file name</param>

/// <param name="lcNamespace">Namespace to add if any. Pass null if no
namespace is to be added</param>

public void AddAssembly(string lcAssemblyDll,string lcNamespace)

{

if (lcAssemblyDll==null && lcNamespace == null)

{

// *** clear out assemblies and namespaces

this.oParameters.ReferencedAssemblies.Clear();

this.cNamespaces = "";

return;

}
if (lcAssemblyDll != null)

this.oParameters.ReferencedAssemblies.Add(lcAssemb lyDll);
if (lcNamespace != null)

if (this.cScriptingLanguage == "CSharp")

this.cNamespaces = this.cNamespaces + "using " + lcNamespace + ";\r\n";

else

this.cNamespaces = this.cNamespaces + "imports " + lcNamespace + "\r\n";

}

/// <summary>

/// Adds an assembly to the compiled code.

/// </summary>

/// <param name="lcAssemblyDll">DLL assembly file name</param>

public void AddAssembly(string lcAssemblyDll)

{

this.AddAssembly(lcAssemblyDll,null);

}

public void AddNamespace(string lcNamespace)

{

this.AddAssembly(null,lcNamespace);

}

public void AddDefaultAssemblies()

{

this.AddAssembly("System.dll","System");

this.AddNamespace("System.Reflection");

this.AddNamespace("System.IO");

}


Willy.

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Scripting Methods.dll I wrote from scratch.

RemoteLoader.dll and wwScripting.dll are mostly code snippets from others
have done online.

In 'DatabaseManager.DataComponent' which is one I wrote I have the
following method. Notice the error handling. All I logged was
e.Message. If you think I should grab more information for next time
please let me know. When I was debugging with a windows form I was
logging to a file. When I made it a service I discovered I couldn't do
that, and at the time I got these errors I was simply having log dump to
the Debug.WriteLine. I will have it logging to Sql soon.

public void RunEventsByStockID(int stockID, int eventTypeID, int
accountID)
{

//Use AccountID=0 to execute event on all accounts

RefreshEventList();

foreach (StockData.EventListRow r in stockData2.EventList)

{

if (r.StockID==stockID && r.EventTypeID==eventTypeID && (accountID==0 ||
accountID==r.AccountID))

{

wwScripting loScript = new wwScripting(r.EventLanguage);

// loScript.CreateAppDomain("MyAppDomain")
// Add any assemblies referenced

loScript.AddAssembly("ScriptingMethods.dll");

loScript.AddNamespace("ScriptingMethods");

System.Text.StringBuilder sb=new System.Text.StringBuilder("");

sb.Append("public string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionString) {");

sb.Append("\r\n");

sb.Append("ScriptingMethods.StockMethods Stock=new
ScriptingMethods.StockMethods(accountID, eventTypeID, stockID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append("ScriptingMethods.AccountMethods Account=new
ScriptingMethods.AccountMethods(accountID, eventTypeID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append(@"string LogMessage=""Blank Log Message"";");

sb.Append("\r\n");

sb.Append(r.EventCode);

sb.Append("\r\n");

sb.Append("return LogMessage;");

sb.Append("\r\n");

sb.Append("}");

sb.Append("\r\n");

string code=sb.ToString();

object objResult=loScript.ExecuteMethod(code, "ExecEvent", r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnectionString);

string lcResult;

try{

lcResult=(string) objResult;

}

catch(Exception e)

{

lcResult=e.Message;

}
if (loScript.bError)

{

log.LogText(this.ToString(),"Error",loScript.cErro rMsg);

}

else

{

if(lcResult.Length>0)

log.LogText(this.ToString(),"Result",lcResult);

}

loScript.Dispose();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2****************@TK2MSFTNGP14.phx.gbl...
Nathan,

Are all of these your dlls? Are these exceptions that are being
thrown and logged? If so, what are the types of the exceptions, as well
as the other details?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
Yesterday afternoon I was getting the following errors in a windows
service:

'DatabaseManager.DataComponent', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found'

Service ran all night fine. This morning I reconnected to the process
and the errors are no longer there. Only thing I can think of is if
logging off and back on did something. I should also note that
yesterday visual studio crashed on me when I had the solution open and
tried to connect to the windows service project.

Does anyone with a better understanding of the CLR have any possible
explaination for the inconsistant errors?

Thanks,
Nathan




Nov 17 '05 #6

P: n/a
I keep posting a reply but it isn't going.

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:u0**************@TK2MSFTNGP12.phx.gbl...
What's the identity of the service account?
Where are these dll's located?
What dependencies do they have?
What's are you using in AddAssembly to locate/load the DLL's?

Willy.

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Scripting Methods.dll I wrote from scratch.

RemoteLoader.dll and wwScripting.dll are mostly code snippets from others
have done online.

In 'DatabaseManager.DataComponent' which is one I wrote I have the
following method. Notice the error handling. All I logged was
e.Message. If you think I should grab more information for next time
please let me know. When I was debugging with a windows form I was
logging to a file. When I made it a service I discovered I couldn't do
that, and at the time I got these errors I was simply having log dump to
the Debug.WriteLine. I will have it logging to Sql soon.

public void RunEventsByStockID(int stockID, int eventTypeID, int
accountID)
{

//Use AccountID=0 to execute event on all accounts

RefreshEventList();

foreach (StockData.EventListRow r in stockData2.EventList)

{

if (r.StockID==stockID && r.EventTypeID==eventTypeID && (accountID==0 ||
accountID==r.AccountID))

{

wwScripting loScript = new wwScripting(r.EventLanguage);

// loScript.CreateAppDomain("MyAppDomain")
// Add any assemblies referenced

loScript.AddAssembly("ScriptingMethods.dll");

loScript.AddNamespace("ScriptingMethods");

System.Text.StringBuilder sb=new System.Text.StringBuilder("");

sb.Append("public string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionString) {");

sb.Append("\r\n");

sb.Append("ScriptingMethods.StockMethods Stock=new
ScriptingMethods.StockMethods(accountID, eventTypeID, stockID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append("ScriptingMethods.AccountMethods Account=new
ScriptingMethods.AccountMethods(accountID, eventTypeID,
sqlConnectionString);");

sb.Append("\r\n");

sb.Append(@"string LogMessage=""Blank Log Message"";");

sb.Append("\r\n");

sb.Append(r.EventCode);

sb.Append("\r\n");

sb.Append("return LogMessage;");

sb.Append("\r\n");

sb.Append("}");

sb.Append("\r\n");

string code=sb.ToString();

object objResult=loScript.ExecuteMethod(code, "ExecEvent", r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnectionString);

string lcResult;

try{

lcResult=(string) objResult;

}

catch(Exception e)

{

lcResult=e.Message;

}
if (loScript.bError)

{

log.LogText(this.ToString(),"Error",loScript.cErro rMsg);

}

else

{

if(lcResult.Length>0)

log.LogText(this.ToString(),"Result",lcResult);

}

loScript.Dispose();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2****************@TK2MSFTNGP14.phx.gbl...
Nathan,

Are all of these your dlls? Are these exceptions that are being
thrown and logged? If so, what are the types of the exceptions, as well
as the other details?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nathan Kovac" <na**@tctelco.net> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
Yesterday afternoon I was getting the following errors in a windows
service:

'DatabaseManager.DataComponent', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found'

Service ran all night fine. This morning I reconnected to the process
and the errors are no longer there. Only thing I can think of is if
logging off and back on did something. I should also note that
yesterday visual studio crashed on me when I had the solution open and
tried to connect to the windows service project.

Does anyone with a better understanding of the CLR have any possible
explaination for the inconsistant errors?

Thanks,
Nathan



Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.