473,888 Members | 1,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Meta Data not found when using a Windows Service

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

'DatabaseManage r.DataComponent ', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMetho ds.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.d ll' could not be found
Line: 0 - Metadata file 'wwScripting.dl l' 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
6 2185
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.co m

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

'DatabaseManage r.DataComponent ', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMetho ds.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.d ll' could not be found
Line: 0 - Metadata file 'wwScripting.dl l' 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
Scripting Methods.dll I wrote from scratch.

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

In 'DatabaseManage r.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 RunEventsByStoc kID(int stockID, int eventTypeID, int accountID)
{

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

RefreshEventLis t();

foreach (StockData.Even tListRow r in stockData2.Even tList)

{

if (r.StockID==sto ckID && r.EventTypeID== eventTypeID && (accountID==0 ||
accountID==r.Ac countID))

{

wwScripting loScript = new wwScripting(r.E ventLanguage);

// loScript.Create AppDomain("MyAp pDomain")
// Add any assemblies referenced

loScript.AddAss embly("Scriptin gMethods.dll");

loScript.AddNam espace("Scripti ngMethods");

System.Text.Str ingBuilder sb=new System.Text.Str ingBuilder("");

sb.Append("publ ic string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionSt ring) {");

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

sb.Append("Scri ptingMethods.St ockMethods Stock=new
ScriptingMethod s.StockMethods( accountID, eventTypeID, stockID,
sqlConnectionSt ring);");

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

sb.Append("Scri ptingMethods.Ac countMethods Account=new
ScriptingMethod s.AccountMethod s(accountID, eventTypeID,
sqlConnectionSt ring);");

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

sb.Append(@"str ing LogMessage=""Bl ank Log Message"";");

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

sb.Append(r.Eve ntCode);

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

sb.Append("retu rn LogMessage;");

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

sb.Append("}");

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

string code=sb.ToStrin g();

object objResult=loScr ipt.ExecuteMeth od(code, "ExecEvent" , r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnect ionString);

string lcResult;

try{

lcResult=(strin g) objResult;

}

catch(Exception e)

{

lcResult=e.Mess age;

}
if (loScript.bErro r)

{

log.LogText(thi s.ToString(),"E rror",loScript. cErrorMsg);

}

else

{

if(lcResult.Len gth>0)

log.LogText(thi s.ToString(),"R esult",lcResult );

}

loScript.Dispos e();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:%2******** ********@TK2MSF TNGP14.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.co m

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

'DatabaseManage r.DataComponent ', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMetho ds.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.d ll' could not be found
Line: 0 - Metadata file 'wwScripting.dl l' 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
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.n et> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Scripting Methods.dll I wrote from scratch.

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

In 'DatabaseManage r.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 RunEventsByStoc kID(int stockID, int eventTypeID, int
accountID)
{

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

RefreshEventLis t();

foreach (StockData.Even tListRow r in stockData2.Even tList)

{

if (r.StockID==sto ckID && r.EventTypeID== eventTypeID && (accountID==0 ||
accountID==r.Ac countID))

{

wwScripting loScript = new wwScripting(r.E ventLanguage);

// loScript.Create AppDomain("MyAp pDomain")
// Add any assemblies referenced

loScript.AddAss embly("Scriptin gMethods.dll");

loScript.AddNam espace("Scripti ngMethods");

System.Text.Str ingBuilder sb=new System.Text.Str ingBuilder("");

sb.Append("publ ic string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionSt ring) {");

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

sb.Append("Scri ptingMethods.St ockMethods Stock=new
ScriptingMethod s.StockMethods( accountID, eventTypeID, stockID,
sqlConnectionSt ring);");

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

sb.Append("Scri ptingMethods.Ac countMethods Account=new
ScriptingMethod s.AccountMethod s(accountID, eventTypeID,
sqlConnectionSt ring);");

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

sb.Append(@"str ing LogMessage=""Bl ank Log Message"";");

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

sb.Append(r.Eve ntCode);

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

sb.Append("retu rn LogMessage;");

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

sb.Append("}");

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

string code=sb.ToStrin g();

object objResult=loScr ipt.ExecuteMeth od(code, "ExecEvent" , r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnect ionString);

string lcResult;

try{

lcResult=(strin g) objResult;

}

catch(Exception e)

{

lcResult=e.Mess age;

}
if (loScript.bErro r)

{

log.LogText(thi s.ToString(),"E rror",loScript. cErrorMsg);

}

else

{

if(lcResult.Len gth>0)

log.LogText(thi s.ToString(),"R esult",lcResult );

}

loScript.Dispos e();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:%2******** ********@TK2MSF TNGP14.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.co m

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

'DatabaseManage r.DataComponent ', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMetho ds.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.d ll' could not be found
Line: 0 - Metadata file 'wwScripting.dl l' 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
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******** ******@TK2MSFTN GP12.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.d ll
System
System.Data
System.XML
using System;

using System.Data;

using System.Diagnost ics;
RemoteLoader.dl l
System
using System;

using System.Reflecti on;

wwScripting.dll
RemoteLoader
System
System.Data
using System;

using System.IO;

using System.Text;

using Microsoft.CShar p;

using Microsoft.Visua lBasic;

using System.Reflecti on;

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="lcAssembl yDll">DLL assembly file name</param>

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

public void AddAssembly(str ing lcAssemblyDll,s tring lcNamespace)

{

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

{

// *** clear out assemblies and namespaces

this.oParameter s.ReferencedAss emblies.Clear() ;

this.cNamespace s = "";

return;

}
if (lcAssemblyDll != null)

this.oParameter s.ReferencedAss emblies.Add(lcA ssemblyDll);
if (lcNamespace != null)

if (this.cScriptin gLanguage == "CSharp")

this.cNamespace s = this.cNamespace s + "using " + lcNamespace + ";\r\n";

else

this.cNamespace s = this.cNamespace s + "imports " + lcNamespace + "\r\n";

}

/// <summary>

/// Adds an assembly to the compiled code.

/// </summary>

/// <param name="lcAssembl yDll">DLL assembly file name</param>

public void AddAssembly(str ing lcAssemblyDll)

{

this.AddAssembl y(lcAssemblyDll ,null);

}

public void AddNamespace(st ring lcNamespace)

{

this.AddAssembl y(null,lcNamesp ace);

}

public void AddDefaultAssem blies()

{

this.AddAssembl y("System.dll", "System");

this.AddNamespa ce("System.Refl ection");

this.AddNamespa ce("System.IO") ;

}


Willy.

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

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

In 'DatabaseManage r.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 RunEventsByStoc kID(int stockID, int eventTypeID, int
accountID)
{

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

RefreshEventLis t();

foreach (StockData.Even tListRow r in stockData2.Even tList)

{

if (r.StockID==sto ckID && r.EventTypeID== eventTypeID && (accountID==0 ||
accountID==r.Ac countID))

{

wwScripting loScript = new wwScripting(r.E ventLanguage);

// loScript.Create AppDomain("MyAp pDomain")
// Add any assemblies referenced

loScript.AddAss embly("Scriptin gMethods.dll");

loScript.AddNam espace("Scripti ngMethods");

System.Text.Str ingBuilder sb=new System.Text.Str ingBuilder("");

sb.Append("publ ic string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionSt ring) {");

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

sb.Append("Scri ptingMethods.St ockMethods Stock=new
ScriptingMethod s.StockMethods( accountID, eventTypeID, stockID,
sqlConnectionSt ring);");

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

sb.Append("Scri ptingMethods.Ac countMethods Account=new
ScriptingMethod s.AccountMethod s(accountID, eventTypeID,
sqlConnectionSt ring);");

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

sb.Append(@"str ing LogMessage=""Bl ank Log Message"";");

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

sb.Append(r.Eve ntCode);

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

sb.Append("retu rn LogMessage;");

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

sb.Append("}");

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

string code=sb.ToStrin g();

object objResult=loScr ipt.ExecuteMeth od(code, "ExecEvent" , r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnect ionString);

string lcResult;

try{

lcResult=(strin g) objResult;

}

catch(Exception e)

{

lcResult=e.Mess age;

}
if (loScript.bErro r)

{

log.LogText(thi s.ToString(),"E rror",loScript. cErrorMsg);

}

else

{

if(lcResult.Len gth>0)

log.LogText(thi s.ToString(),"R esult",lcResult );

}

loScript.Dispos e();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:%2******** ********@TK2MSF TNGP14.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.co m

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

'DatabaseManage r.DataComponent ', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMetho ds.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.d ll' could not be found
Line: 0 - Metadata file 'wwScripting.dl l' 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
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******** ******@TK2MSFTN GP12.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.d ll
System
System.Data
System.XML
using System;

using System.Data;

using System.Diagnost ics;
RemoteLoader.dl l
System
using System;

using System.Reflecti on;

wwScripting.dll
RemoteLoader
System
System.Data
using System;

using System.IO;

using System.Text;

using Microsoft.CShar p;

using Microsoft.Visua lBasic;

using System.Reflecti on;

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="lcAssembl yDll">DLL assembly file name</param>

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

public void AddAssembly(str ing lcAssemblyDll,s tring lcNamespace)

{

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

{

// *** clear out assemblies and namespaces

this.oParameter s.ReferencedAss emblies.Clear() ;

this.cNamespace s = "";

return;

}
if (lcAssemblyDll != null)

this.oParameter s.ReferencedAss emblies.Add(lcA ssemblyDll);
if (lcNamespace != null)

if (this.cScriptin gLanguage == "CSharp")

this.cNamespace s = this.cNamespace s + "using " + lcNamespace + ";\r\n";

else

this.cNamespace s = this.cNamespace s + "imports " + lcNamespace + "\r\n";

}

/// <summary>

/// Adds an assembly to the compiled code.

/// </summary>

/// <param name="lcAssembl yDll">DLL assembly file name</param>

public void AddAssembly(str ing lcAssemblyDll)

{

this.AddAssembl y(lcAssemblyDll ,null);

}

public void AddNamespace(st ring lcNamespace)

{

this.AddAssembl y(null,lcNamesp ace);

}

public void AddDefaultAssem blies()

{

this.AddAssembl y("System.dll", "System");

this.AddNamespa ce("System.Refl ection");

this.AddNamespa ce("System.IO") ;

}


Willy.

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

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

In 'DatabaseManage r.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 RunEventsByStoc kID(int stockID, int eventTypeID, int
accountID)
{

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

RefreshEventLis t();

foreach (StockData.Even tListRow r in stockData2.Even tList)

{

if (r.StockID==sto ckID && r.EventTypeID== eventTypeID && (accountID==0 ||
accountID==r.Ac countID))

{

wwScripting loScript = new wwScripting(r.E ventLanguage);

// loScript.Create AppDomain("MyAp pDomain")
// Add any assemblies referenced

loScript.AddAss embly("Scriptin gMethods.dll");

loScript.AddNam espace("Scripti ngMethods");

System.Text.Str ingBuilder sb=new System.Text.Str ingBuilder("");

sb.Append("publ ic string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionSt ring) {");

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

sb.Append("Scri ptingMethods.St ockMethods Stock=new
ScriptingMethod s.StockMethods( accountID, eventTypeID, stockID,
sqlConnectionSt ring);");

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

sb.Append("Scri ptingMethods.Ac countMethods Account=new
ScriptingMethod s.AccountMethod s(accountID, eventTypeID,
sqlConnectionSt ring);");

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

sb.Append(@"str ing LogMessage=""Bl ank Log Message"";");

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

sb.Append(r.Eve ntCode);

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

sb.Append("retu rn LogMessage;");

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

sb.Append("}");

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

string code=sb.ToStrin g();

object objResult=loScr ipt.ExecuteMeth od(code, "ExecEvent" , r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnect ionString);

string lcResult;

try{

lcResult=(strin g) objResult;

}

catch(Exception e)

{

lcResult=e.Mess age;

}
if (loScript.bErro r)

{

log.LogText(thi s.ToString(),"E rror",loScript. cErrorMsg);

}

else

{

if(lcResult.Len gth>0)

log.LogText(thi s.ToString(),"R esult",lcResult );

}

loScript.Dispos e();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:%2******** ********@TK2MSF TNGP14.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.co m

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

'DatabaseManage r.DataComponent ', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMetho ds.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.d ll' could not be found
Line: 0 - Metadata file 'wwScripting.dl l' 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
I keep posting a reply but it isn't going.

"Willy Denoyette [MVP]" <wi************ *@telenet.be> wrote in message
news:u0******** ******@TK2MSFTN GP12.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.n et> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Scripting Methods.dll I wrote from scratch.

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

In 'DatabaseManage r.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 RunEventsByStoc kID(int stockID, int eventTypeID, int
accountID)
{

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

RefreshEventLis t();

foreach (StockData.Even tListRow r in stockData2.Even tList)

{

if (r.StockID==sto ckID && r.EventTypeID== eventTypeID && (accountID==0 ||
accountID==r.Ac countID))

{

wwScripting loScript = new wwScripting(r.E ventLanguage);

// loScript.Create AppDomain("MyAp pDomain")
// Add any assemblies referenced

loScript.AddAss embly("Scriptin gMethods.dll");

loScript.AddNam espace("Scripti ngMethods");

System.Text.Str ingBuilder sb=new System.Text.Str ingBuilder("");

sb.Append("publ ic string ExecEvent(int accountID, int eventTypeID, int
stockID, string sqlConnectionSt ring) {");

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

sb.Append("Scri ptingMethods.St ockMethods Stock=new
ScriptingMethod s.StockMethods( accountID, eventTypeID, stockID,
sqlConnectionSt ring);");

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

sb.Append("Scri ptingMethods.Ac countMethods Account=new
ScriptingMethod s.AccountMethod s(accountID, eventTypeID,
sqlConnectionSt ring);");

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

sb.Append(@"str ing LogMessage=""Bl ank Log Message"";");

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

sb.Append(r.Eve ntCode);

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

sb.Append("retu rn LogMessage;");

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

sb.Append("}");

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

string code=sb.ToStrin g();

object objResult=loScr ipt.ExecuteMeth od(code, "ExecEvent" , r.AccountID,
r.EventTypeID, r.StockID, this.sqlConnect ionString);

string lcResult;

try{

lcResult=(strin g) objResult;

}

catch(Exception e)

{

lcResult=e.Mess age;

}
if (loScript.bErro r)

{

log.LogText(thi s.ToString(),"E rror",loScript. cErrorMsg);

}

else

{

if(lcResult.Len gth>0)

log.LogText(thi s.ToString(),"R esult",lcResult );

}

loScript.Dispos e();

}

}

}

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:%2******** ********@TK2MSF TNGP14.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.co m

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

'DatabaseManage r.DataComponent ', 'Error', '3 Errors:
Line: 0 - Metadata file 'ScriptingMetho ds.dll' could not be found
Line: 0 - Metadata file 'RemoteLoader.d ll' could not be found
Line: 0 - Metadata file 'wwScripting.dl l' 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
37242
by: Dylan | last post by:
Hello, I was trying to do a WCF tutorial (http://wcf.netfx3.com/content/ BuildingHelloWorld.aspx). I need to get the meta data from my service usin svcutil.exe why is not working? Please see below: E:\Program Files\Microsoft SDKs\Windows\v6.0\Bin>svcutil http://localhost/hello?wsdl Microsoft (R) Service Model Metadata Tool
0
9961
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10886
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5824
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.