using Enterprise Library 4.1 Logging Block in Custom Workflow Acti

crm

    Sponsored Links

    Next

  • 1. Dynamics CRM 4.0 Offline Client: Own ASPX Files
    Hi there, I have written an own aspx webproject to integrate some stuff into ms crm. In the online mode, everything works fine. I've made a virtual directory and there is my webproject inside. Now I wanted to try my extension in the offline client. But there I found some problems. As I know the cassini webserver cannot handel virtual directories, so I created a new real directory inside the offline-web-root and putted my webproject inside there. Then I saw the next an my actual problem. I had to copy all my .dll files into the main bin-directory of the web-root because they were not found im my webproject bin-directory. Is there any way to let my own dll files stay in my webproject bin-directory? Thanks in advance Urs
  • 2. Custom stored procedure for CRM not returning records
    Hi all, We've got a pair of custom stored procedures called from a grid control on an aspx page that are not returning data in a production environment unless you are logged in through the CRM server itself. These procedures work OK in a development environment. As far as we can tell the SQL Access Group has rights to the stored procedures. The fact that they return data when logged in direct makes me think it's some kind of double-hop issue, but the rest of CRM performs as expected. Any suggestions would be appreciated! Thanks Rob
  • 3. Plugin bug (microsoft) urgent
    Hi I am getting "The request failed with HTTP status 400: Bad Request." when using ICrmService createcrmservice() method. CRM asynch service is installed on different server. whenever i try to use crmservice.execute it is giving this error. Has this error is confirmed by microsoft or any other workaround to solve this. Thanks
  • 4. Count Related Records
    Hi, I have two custom entities A and B related to the contact entity in a N:1 relationship each. I added in contact a field that counts how many related entities records each contact has. To count them, i created two workflows(on create of each custom entity) to update the number. It's working well. But the problem is for contacts that already have A and B before creating the workflow(they get a wrong number). So how can i count the number of A and B records and reset the number? Any help would be appreciated.

using Enterprise Library 4.1 Logging Block in Custom Workflow Acti

Postby ZG9taW5pa19odWc » Wed, 22 Jul 2009 22:59:01 GMT

i all

I want to use the Enterprise Library 4.1 Logging Block to make the tracing
in a Custom Workflow Activity (CWA).
I have written a CrmAsyncService.exe.config as configuration file (reading
settings out of this file from a CWA works.

In the project I referenced the
Microsoft.Practices.EnterpriseLibrary.Logging.dll with "Copy Local" set to
true. In the Windows Explorer in the properties of the assembly I can see
that it is a signed assembly.

I copied the assembly Microsoft.Practices.EnterpriseLibrary.Logging.dll
along with
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.ObjectBuilder2.dll
Microsoft.Practices.Unity.dll
in the bin\assembly folder of CRM.

But every time the CWA ist executed I have the following error in the trace
output of CRM:

[2009-07-21 14:52:26.9] Process:CrmAsyncService
|Organization:a6cc8da2-b53a-47b8-b732-ffa29982cfb1 |Thread: 4 |Category:
Platform.Workflow |User: 00000000-0000-0000-0000-000000000000 |Level: Error |
WorkflowHost.OnWorkflowTerminated
at WorkflowHost.OnWorkflowTerminated(Object sender,
WorkflowTerminatedEventArgs args)
at WorkflowRuntime.OnScheduleTerminated(WorkflowExecutor schedule,
WorkflowTerminatedEventArgs args)
at WorkflowRuntime.WorkflowExecutionEvent(Object sender,
WorkflowExecutionEventArgs e)
at EventHandler`1.Invoke(Object sender, TEventArgs e)
at WorkflowExecutor.FireWorkflowTerminated(Exception exception)
at SchedulerLockGuard.FireEvents(List`1 eventList, WorkflowExecutor
workflowExec)
at SchedulerLockGuard.Dispose()
at WorkflowExecutor.RunSome(Object ignored)
at WorkItem.Invoke(WorkflowSchedulerService service)
at DefaultWorkflowSchedulerService.QueueWorkerProcess(Object state)
at _ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code,
CleanupCode backoutCode, Object userData)
at ExecutionContext.RunInternal(ExecutionContext executionContext,
ContextCallback callback, Object state)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback
callback, Object state)
at
_ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback
tpWaitCallBack)
at _ThreadPoolWaitCallback.PerformWaitCallback(Object state)
File name: 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at
System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
at
System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at
System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord
configRecord, FactoryRecord factoryRecord)
at
System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory..ctor(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at
System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
at
System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary

RE: using Enterprise Library 4.1 Logging Block in Custom Workflow Acti

Postby ZG9taW5pa19odWc » Fri, 24 Jul 2009 00:36:01 GMT

found the solution my self:

Adding
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="assembly"/>
</assemblyBinding>
</runtime>
to the CrmAsyncService.exe.config helped.
Interestingly in the Plugins and CustomWorkflowActities I also reference an
assembly
I developed my self and the calling assembly managed to locate it (without
the probing element).

"dominik_hug" wrote:


Similar Threads:

1.CRM Callouts & Microsoft Enterprise Library Application Blocks

We are writing a callout for a project and we would like to use the Microsoft 
Enterprise Library (MEL) for configuration, logging, and data access.  It is 
our enterprise standard to utilize those blocks for those activities on all 
of our efforts.  The problem is that I don't see a readily available 
app.config or web.config file for which I can add the configuration context 
necessary to utilize those features.

I also am very averse to modifying any core Microsoft Dynamics CRM 3.0 
app.config or web.config file because it has the potential of being wiped out 
during any future upgrades.  So far we have envisioned two options but would 
like some community feedback to help us define a best practice.

Option 1: Use the MEL ConfigurationManager to load context from a file and 
execute against that context
PRO: It seems as if it may get us closer 
CON: Externally loaded context does not become the "current context".  
Existing in-house libraries hard-wired to execute against the "current 
context" may not be utilized.

Option 2: Add the configuration context to the machine.config
PRO: We may utlize all existing in-house libraries 
CON: We have a standard to not use the machine.config for anything to avoid 
potential maintenance headaches.

We are leaning towards [Option 2] and changing our standard to allow 
authorized modifications to the machine.config only.  This is because we 
enjoy leveraging the current context in our core libraries to avoid having to 
pass context and configuration information through every layer of our code.


2.is it possible to have a multiple Lookup in a custom Workflow acti

3.How to get logged in user GUID in custom component using mscrm 3.0

I am using this code to retrive GUID but it's always return same GUID of 
system user(named SYSTEM in the systemuserbase table).

CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

WhoAmIRequest userRequest = new WhoAmIRequest();
WhoAmIResponse user = (WhoAmIResponse) service.Execute(userRequest);
String loggedInUserId = user.UserId.ToString();

I think it is the case of setting the impersonation in the CRM web.config 
and the corresponding application web.config.

Any suggestion would be helpful.

4.How to get logged in user GUID in custom component using mscrm

Hi Tibor,

Thanks for your reply. As you written in step 1 impersonate your user that i 
already done through web.config(<identity impersonate="true" />)

Please explain these steps in some more detail. If you have any sample code 
regarding to this thats is very helpful for me.

Many thanks for your help.

Kedar N. Kumar

"Tibor" wrote:

> Hi Kumar,
> 
> you can use service.caller.callerguid to get/set this property.
> But the call-outs are running under the name of NT AUTHORITY\Network Service 
> = (SYSTEM)
> You can do the following:
> - imersonate your user user using the Credentialcache
> - find you user through crm webservice in the database
> - retrieve the id of your user
> - log this id.
> 
> Regards,
> Tibor
> 
> "Kedar Nath Kumar" wrote:
> 
> > I am using this code to retrive GUID but it's always return same GUID of 
> > system user(named SYSTEM in the systemuserbase table).
> > 
> > CrmService service = new CrmService();
> > service.Credentials = System.Net.CredentialCache.DefaultCredentials;
> > 
> > WhoAmIRequest userRequest = new WhoAmIRequest();
> > WhoAmIResponse user = (WhoAmIResponse) service.Execute(userRequest);
> > String loggedInUserId = user.UserId.ToString();
> > 
> > I think it is the case of setting the impersonation in the CRM web.config 
> > and the corresponding application web.config.
> > 
> > Any suggestion would be helpful.

5.Word templates using WSS as document library

6. Outbound email blocked as SPAM when using the CRM4.0 router

7. Custom Libraries in CRM4.0

8. Calling assembly from workflow - blocking problem?



Return to crm

 

Who is online

Users browsing this forum: No registered users and 13 guest