Posts

Debugging Plug ins

Firstly, I’m using Visual Studio 2005. I haven’t done this in any other version so there’s no point in me trying to write about it - please comment if you have and whether these steps differ. Code needs to be deployed with the debug symbols (.pdb file) which must reside in the same directory as your dll assembly - this necessitates registering the plug-in using the “on disk” method - so my dll and pdb files were saved to Program Files\Microsoft CRM\Server\bin\assembly To avoid “file in use” errors when copying dlls from my development directory to my development deployment, I added an “iisreset” command into my Post-Build script in Visual Studio, in addition to an xcopy to move the files where i need them. Since I ran an iisreset, I need to refresh any CRM page after registration to ensure that the w3wp process is available for the debugger to attach to. Once registered, go back to Visual Studio and select Debug > Attach the Process and then select the w3wp.exe process from the ...

IE Crashes on load of incident/case

The IE 6.0 window hangs for 5 minutes when a incident is opened for edit. The solution for this is to add the below registry keys to the Client Machine on which IE runs. 1. Start Registry Editor (Regedt32.exe). 2. Locate the following key in the registry: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings 3. On the Edit menu, point to New click DWORD Value, and then add the following registry values: Value name: MaxConnectionsPer1_0Server Value data: 10 Base: Decimal Value Name: MaxConnectionsPerServer Value data: 10 Base: Decimal Note: This happens on IE 6.0 only.

Plugin development in web farm scenario.

we should not use the web reference to CRM web services. If web references to CRM web references are used, when we run from the second server, plug ins throws error. It says "bad request". If we remove the references to CRM web services, then we cannot access the custom attributes inside the plug ins. We have to use the dynamic entities for accessing the custom attributes.

Method to Check Session Time out in ASP.Net

The below method can be used to check the session time out in MSCRM. Private void CheckSessionTimeOut() { if (Context.Session != null) { if (Context.Session.IsNewSession) { string sCookieHeader = Page.Request.Headers["Cookie"]; if ((null != sCookieHeader) && (sCookieHeader.IndexOf("ASP.NET_SessionId") >= 0)) { Server.Transfer("SessionTimeOut.aspx"); } } }

“Could not load file or assembly ‘ Microsoft..Crm.WebSerices ....or one of its dependences. An attempt was made to load a program with an incorrect f

Error Message : “Could not load file or assembly ‘ Microsoft..Crm.WebSerices ....or one of its dependences. An attempt was made to load a program with an incorrect format." Solution : Check the version of the "Microsoft..Crm.WebServices.dll" file. There are separate versions for 32 bit and 64 bit installations. Use the appropriate dll basded on the operating system type.