SQL Tracing in WCF environment

Posts   
 
    
kakaiya
User
Posts: 182
Joined: 20-Mar-2004
# Posted on: 16-Nov-2007 00:56:50   

Hi,

I have following application architecture in VS2005.

UI Presenter WCFProxy WCFServiceHost (currently it is WinForms) WCFServiceLayer BusinessLayer DataLayer (LLBLGen) SQL 2005 Database

Now I want to see (enable) the SQL query generated by LLBLGen.

I have app.config in UI, WCFServiceLayer and I have added below code in app.config.

<system.diagnostics>
    <switches>
        <add name="SqlServerDQE" value="4" />
        <add name="ORMGeneral" value="4" />
        <add name="ORMStateManagement" value="4" />
        <add name="ORMPersistenceExecution" value="4" />
    </switches>

    <trace autoflush="true" indentsize="2">
        <listeners>
            <add name="textWriterListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\LLBL_textWriterListener.log" />
        </listeners>
    </trace>
<system.diagnostics>

Where exactly it will read (AND where I need to put app.config file) this Trace configuration?

(edit) Also how can I have ORMConCurrencyException log to above file???

Thanks in advance.

Regards,

Kaksss

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 16-Nov-2007 11:59:22   

Where exactly it will read this Trace configuration?

This trace configurations is read in LLBLGen Pro runtime libraries.

(AND where I need to put app.config file)

In the first application that consumes the LLBLGen Pro runtime libraries, in your architecture I'd say this should be the WCFServiceHost (currently it is WinForms).

(edit) Also how can I have ORMConCurrencyException log to above file???

It will be logged automatically, because you have added the ORMPersistenceExecution tracing.

kakaiya
User
Posts: 182
Joined: 20-Mar-2004
# Posted on: 17-Nov-2007 12:30:52   

Thanks Walla,

As per the below application architecture in VS2005.

UI - project in Solution A Presenter + WCFProxy - project in Solution A

WCFServiceHost (currently it is WinForms) - project in Solution B WCFServiceLayer - project in Solution B BusinessLayer - project in Solution B

Common Contract - project in Solution C DataLayer (LLBLGen) - project in Solution C SQL 2005 Database DAL - - project in Solution C

In the first application that consumes the LLBLGen Pro runtime libraries, in your architecture I'd say this should be the WCFServiceHost (currently it is WinForms).

Now later we are thinking of converting WCFServiceHost to WINDOWS SERVICE, now in this case App.config will be in Windows Service project? or anywhere else?

Thanks in advance.

Regards

Kaksss

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 18-Nov-2007 12:10:58   

kaksss wrote:

Thanks Walla,

As per the below application architecture in VS2005.

UI - project in Solution A Presenter + WCFProxy - project in Solution A

WCFServiceHost (currently it is WinForms) - project in Solution B WCFServiceLayer - project in Solution B BusinessLayer - project in Solution B

Common Contract - project in Solution C DataLayer (LLBLGen) - project in Solution C SQL 2005 Database DAL - - project in Solution C

In the first application that consumes the LLBLGen Pro runtime libraries, in your architecture I'd say this should be the WCFServiceHost (currently it is WinForms).

Now later we are thinking of converting WCFServiceHost to WINDOWS SERVICE, now in this case App.config will be in Windows Service project? or anywhere else?

Thanks in advance.

Regards

Kaksss

A distributed application has multiple running applications: a service and one or more clients. As the service executes code which will target the DQE's, the service has to have the tracing flags in its config file. The client has no use for these as it doesn't use the DQEs.

The SQL is then traced on the system with the SERVICE.

Frans Bouma | Lead developer LLBLGen Pro