473,791 Members | 2,899 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 2180
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
37233
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
9669
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
10426
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
10154
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
9993
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...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
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();...
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.