Monday, 31 October 2011

Crm 2011 cannot import solution




Make sure all the managed solutions are imported at first.

Sunday, 30 October 2011

Microsoft Dynamics CRM 2011 User’s and Administrator’s Guides

http://blogs.msdn.com/b/crm/archive/2011/08/16/microsoft-dynamics-crm-2011-user-s-and-administrator-s-guides.aspx

Intergen vm platform DC issues. dns doesn't work

try following command

ipconfig /registerdns --register the ip and computer name with the DC server
ipconfig /flushdns

CRM 2011 Update Rollup release build numbers, and how to find them

Version Release Date Build Number KB Article
Release Candidate 5.0.9688.53 2461082
Beta (On Premise) 5.0.9585.106
Beta (Online) 5.0.9585.107
RTM February 16, 2011 5.0.9688.583 Download RTM
Update Rollup 1 April 7, 2011 5.0.9688.1045 2466084
Update Rollup 2 June 2, 2011 5.0.9688.1155 2466086
Update Rollup 3 July 28, 2011 5.0.9688.1244 2547347
Update Rollup 4 September 9, 2011 5.0.9688.1450 2556167
Update Rollup 5 October 20, 2011 05.00.9688.1533 2567454
Update Rollup 6 January 12, 2012 5.0.9689.1985

Adobo - Philippines food

Adobo (Spanish: marinade, sauce, or seasoning) is the immersion of raw food into a preparation, in the form of a stock (or sauce), of different components, including paprika (from red peppers), oregano, salt, garlic, and vinegar — mixed according to the place of origin and the food with which it is intended to be used—primarily to preserve and enhance the flavor of food.

The Atkins diet

The Atkins diet, officially called the Atkins Nutritional Approach, is a low-carbohydrate diet created by Robert Atkins from a research paper he read in the Journal of the American Medical Association published by Gordon Azar and Walter Lyons Bloom. Atkins stated that he used the study to resolve his own overweight condition. He later popularized the method in a series of books, starting with Dr. Atkins' Diet Revolution in 1972. In his second book, Dr. Atkins' New Diet Revolution, he modified parts of the diet but did not alter the original concepts.

Saturday, 29 October 2011

Crm 2011 Report Extensions installation - SrsDataConnector

In short, Crm 2011 Report extension (SrsDataConnector) is required component but it is not installed as the main crm installation. You can find the detailed installation guide in the chapter 2 (Page 13) of the Microsoft Dynamics CRM 2011 Installation Guide.doc

All installations now require the CRM 2011 Report Extensions to be installed and configured on the SQL Reporting Server. If it is not installed, certain features will not work properly: reporting will not function, creating new organizations, and organization imports will be blocked until the extensions are installed and configured.

http://blogs.msdn.com/b/crminthefield/archive/2011/03/11/crm-2011-server-setup-commonly-asked-questions.aspx

http://yellowduckguy.wordpress.com/2011/06/01/microsoft-dynamics-crm-2011-reporting-extensions-is-not-installed/

Thursday, 27 October 2011

Crm 2011 IFD deployment. Internet Facing Deployment

There is a good MSDN blog article at the address below which I’m going to mention here for your reference (and mine for the future).
http://blogs.msdn.com/b/crm/archive/2011/01/13/configuring-ifd-with-microsoft-dynamics-crm-2011.aspx

The video
http://www.youtube.com/watch?v=ZD5qaa-G99E

Some key points
Components required for setting up Crm IFD deployment.
* Installing AD FS 2.0. AD FS has to be installed on the default website
* Configuring the AD FS 2.0 federation server
* Microsoft Dynamics CRM Server 2011 must be running on a Web site that has been configured to use Secure Sockets Layer (SSL).
* Managing certificates
* Configuring Dynamics CRM 2011 for claims-based authentication and IFD
* Creating the relying party trust for CRM and configuring the claims rules on AD FS 2.0

Windows Authentication


Claims-based authentication: internal access


Claims-based authentication: external access

WPF Study Key words

Study strategy: Do Practice exams, then read the self-paced training book on weaknesses.

[Controls]
WPF Controls:
+ individual controls
+ Item controls
+ Layout controls

Attached Properties
e.g.

[Resource]
Binary resource
Logical resource - can be defined and accessed in XAML files in comparison to Binary resources
Static resource
Dynamic resource

pack URI syntax: pack:////
e.g. Source="pack://application:,,,/myFolder/myPic.bmp"
Use the pack URI syntax to access resources embedded in other assemblies
pack://application:,,,/;component//

siteOfOrigin pack URI syntax:
This is useful for ClickOnce application.

[ClickOnce Application]
ClickOnce application:
Pros: Easy to deploy - just need to click on a link.
Update automatically
Run in a security sandbox.
Cons: Cannot change registry
Cannot manage COM
Cannot manage ODBC
Cannot do other stuff with high security restriction.

Wednesday, 26 October 2011

Crm 2011 installation issues and solutions

Important
After Setup is complete, you cannot change the database collation, base ISO currency code, or the organization unique name. However, you can change the base currency name and base currency symbol.

Issue: What Org Unit should I use to setup Crm 2011?
Solution: Just use the top Unit.



Issue: I can ping the sql server but can not connect to it using Sql Management Studio.
Solution: Turn off the firewall on the sql server.

Issue: Error "The instance name must be the same as computer name."
Solution:
select @@SERVERNAME
go

sp_dropserver 'old server name'
GO

sp_addserver 'new server name', local
GO
http://sandrinodimattia.net/blog/post/Dynamics-CRM-2011-Installation-The-instance-name-must-be-the-same-as-computer-name.aspx

Issue: The reporting server doesn't exist
Solution: Enable the service on Services.msc
Then Start the reporting service via Reporting Services configuration Manager

Issue: "The report server has encountered a configuration error. (rsServerConfigurationError)" And then when you look into the log at C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles. Under the latest ReportServerService*.log, there was the following error: "Message: No DSN present in configuration file".
Solution: Basically you need to setup the sql reporting service database using Reporting Services configuration Manager. http://jessicammoss.blogspot.com/2008/07/reporting-services-2008-configuration.html

Issue: Immediately after the Crm installation, I was not be able to login to Crm with an error says cannot login with my current login.
Solution: Wait. It may take a moment for the changes in AD to take place.

Issue: SSRS errors: (rsReportServerDatabaseUnavailable) The report server cannot open a connection to the report server database.
Solution: http://sqljoe.wordpress.com/2011/02/16/ssrs-errors-rsreportserverdatabaseunavailable-the-report-server-cannot-open-a-connection-to-the-report-server-database/

Reporting Services requires two databases to run:
ReportServer
ReportServerTempDB

To solve the error mentioned above you need the following information:
What is the SQL Server Reporting Services instance you are trying to reach?
Where are the SQL Server Reporting Services databases hosted?

Once you located the SQL Server database instance where the ReportServer and ReportServerTempDB database are hosted you need to follow this checklist:
* Is the SQL Server database instance running? Is the SQL Server service started?
* Can you verify connectivity to the SQL Server database instance?
* Are the ReportServer and ReportServerTempDB databases attached and online?
* Does the Reporting Services service account have read/write access to the ReportServer and ReportServerTempDB databases?

Once all of this is verified to be true and issues have been fixed, than the last step would be to restart the Reporting Services instance. If everything is right you should be able to access your reports.

Tuesday, 25 October 2011

To setup an Exchange Server for an Crm dev environment or not?

The short answer is NO.

* An exchange server is expensive to setup and run. More often than not you will not need it for a dev environment.
* Instead you can use outlook
* Pop3 server. But no need to setup an POP3 email server as you can just use Gmail's pop3 server.
* Even with nothing setup and just see if an email is in the pending state.
* Even you do need to point to an exchange server. Multiple Crm deployments can share the same Exchange server. You probably can use the Intergen old exchange server.

--------------My conversation with Sophie-------------

Sophie Khun-HammondHey Kelvin
i don't think you need to set up an exchange server
instead install the email router


5:41 p.m.Kelvin Shenbut where should I point the router to?
Intergen Exchange server?


5:41 p.m.Sophie Khun-Hammondin order for emails to be sent from CRM it has to either use the email router or outlook client
what are the clients using at the moment for their outgoing emails?


5:43 p.m.Kelvin Shenbut do you need to point the email router or outlook client to something?


5:43 p.m.Sophie Khun-Hammondif you are using outlook client, it will use your outlook to send emails
if you choose email router, the email router will send the email but it will still send as the user
the email router must point to the smtp server
or pop server


5:44 p.m.Kelvin ShenBut outlook need to point to an exchange server to do the job.


5:44 p.m.Sophie Khun-Hammondno
it will use Outlook to send the email
so whether your outlook is hooked to exchange or through pop it will send the email out through that way
so for example, my personal Outlook is using my gmail - i've installed the crm outlook client for this outlook
this means CRM will use my outlook to send my email through gmail


5:46 p.m.Kelvin Shenso I will need to setup either a pop server or an Exchanger server. Correct?


5:46 p.m.Sophie Khun-Hammondno
first you need to tell me what setting the outgoing email is set to for the user
is it Outlook or email router?


5:47 p.m.Kelvin ShenI'm setting up the dev envrionment for AMI Insurance who is using crm 2011 online.


5:48 p.m.Sophie Khun-HammondOk but you need to tell me what their user setting is for outgoing emails
are they using the outlook client in general?
if they are, then they should use Outlook for their outgoing emails


5:49 p.m.Kelvin ShenI am not sure how their email is hooked up in the cloud but I just need to setup something similar so I can test thing when doing development. including sending emails.


5:49 p.m.Sophie Khun-HammondBefore you spend time setting up something that may not be needed, you need to first find out whether or not they are using the outlook client
if they are using the outlook client, then their Outgoing email setting for their user settings should be set to Outlook
if that's the case, you do not need to install the Email router or exchange
I don't think you would need to test it either as it's an out of the box feature
if an email is sent from within CRM it will synchronize to outlook and then will send out from there
then you will be able to see the email sent from the user's sent items box
Do you know if they are using the Outlook client?


5:54 p.m.Kelvin ShenSure, I don't need to test the crm email itself. But let's say in the future I am asked to create a workflow which sends email. It will be nice to see the email actually going out to an testing address before I deploy the workflow to UAT.
I will find it out if they are using Outlook. At least some of them should.


5:55 p.m.Sophie Khun-HammondIf they want you to create a workflow that sends out as say the CRM service, then you will need to install the email router
and link it to the exchange of the crm service account
but i wouldn't go that far into installing the email router unless they actually want a workflow like that
otherwise you may be wasting your time
the email router can be installed once and have different deployments. So you can point it to Prod and Dev


5:57 p.m.Kelvin ShenGood point!


5:58 p.m.Sophie Khun-HammondSo first find out exactly what they want and then decide whether or not to install the email router


5:58 p.m.Kelvin ShenDo we have a old not used exchange server in Intergen?


5:58 p.m.Sophie Khun-Hammondno, i wouldnt recommend using a test exchange
you can just use their prod exchange and point it to their test environment
that way the settings are pretty much correct when it works, and all you have to do is copy the settings to the prod deployment under the same email router server


5:59 p.m.Kelvin ShenBut the dev environment is host by us.


5:59 p.m.Sophie Khun-HammondHave you configured the email router before?


5:59 p.m.Kelvin ShenIt is indepent from uat and prod environment.


5:59 p.m.Sophie Khun-Hammondoh i see


5:59 p.m.Kelvin ShenYeah


6:00 p.m.Sophie Khun-Hammondhmm i don't think you need to go as far as setting up the email router
you can tell if your workflow has sent the email by looking at the activities area
it will have emails pending send
if they can't be sent


6:01 p.m.Kelvin Shenno, I didn't realise before we can share exchange server from different crm dev envrionment until you pointed out just now.
Yeah, that is a good idea too. Thanks


6:02 p.m.Sophie Khun-Hammondjust be careful that you don't spend too much time on something that isn't required
can i ask you what the client has requested ?


6:03 p.m.Kelvin ShenSo the Crm email router can not talk in Pop protocal.


6:04 p.m.Sophie Khun-HammondYes email router can be configured for pop


6:04 p.m.Kelvin ShenIn MS, we will setup a dev environment for support during the handover process. So if a case coming in in the future, the developer will have the environment already setup for them to do the job.


6:05 p.m.Sophie Khun-Hammondbut in Dev if you are developing something, i don't think you need to test to make sure the email is sent, but more for if the workflow has fired to create the email message in CRM


6:05 p.m.Kelvin ShenI am setting up an environment for this purpose now.


6:05 p.m.Sophie Khun-Hammondok, then i don't think you need to set up the email router at all
hope this helps


6:07 p.m.Kelvin Shenyeah, definitely. I am still absorbing it. Thanks

Crm 2011 Roll Up 4 and Auditing Issues

One of our clients has been experiencing an “Unexpected Error has occurred” error message when viewing auditing records. The error seemed fairly sporadic and would only occur for some entity records. In the trace logs a date format exception could be identified corresponding to the time when an audit record was being viewed.

This issue was raised with Microsoft and a fix was provided in Roll Up 4. The update changes the way date fields are written to the audit table, but nothing is done to the existing records and they will still cause the error. This caused me to re-raise the error with Microsoft; the result of this was that a script would have to be used to repair the data. It took a couple of iterations with MS to get a script which did the job.

Here is what I used to get the job done, note you only want to update the audit records which are in the system prior the Roll Up 4 being applied.

begin transaction

SET DATEFORMAT dmy
GO

declare @rollupDate datetime
set @rollupDate = '4/10/2011 6:35:32 am'


update Audit
set ChangeData = CONVERT(char(11), CAST(REPLACE(ChangeData, ' a.m.', 'AM') as date), 101) + CONVERT(char(11), CAST(REPLACE(ChangeData, ' a.m.', 'AM') as time), 108)
where ChangeData like '%/%/%:%:% a.m.' and CreatedOn < @rollupDate and LEN(ChangeData) < 25


update Audit
set ChangeData = CONVERT(char(11), CAST(REPLACE(ChangeData, ' p.m.', 'PM') as date), 101) + CONVERT(char(11), CAST(REPLACE(ChangeData, ' p.m.', 'PM') as time), 108)
where ChangeData like '%/%/%:%:% p.m.' and CreatedOn < @rollupDate and LEN(ChangeData) < 25


select objectid,changedata from AuditBase
where ChangeData like '%/%/%:%:%' and CreatedOn < @rollupDate and LEN(ChangeData) < 25


commit

Friday, 21 October 2011

English slang, Idiom

Dry as a wooden god
[Definition] Very dry area or very thirsty: That desert is as dry as a wooden god.

Six of one, (and) half a dozen of the other
[Definition] Two things are almost the same or equal

clique - small group of people.

He wears cowboy spurs - He is a cowboy

hip flask

Pink eye

H.P.: Hire purchase

You want to bounce something of/off me = You want to try something with me

cut somebody some slack (spoken)
to give someone additional freedom

straggler -落后者 -someone who strays or falls behind.

cup, car, (beer) stein, tumbler,

squeaky wheel gets the grease

Bob's your uncle = There you have it.

coon: Insulting term for a black person

Thursday, 20 October 2011

Book a meeting room in Intergen

When arranging a meeting and selecting invitees, you must also ‘invite’ the meeting room, but change the ‘All Attendees’ status to ‘Resource’ and not ‘Required’ or ‘Optional’.

Wish list, wishlist

* Leather man multi-tool
* Stand up desk (for work while standing)
* Laptop stand
* iPhone cable
* iPhone holder
* Locker-Locker for sports gears

stand up desk, height adjustable desks

http://officefurniturewarehouse.co.nz/buy-office-furniture-online/office-desking/height-adjustable-desks/kinetic-1800-x-700-desk-frame--top---tech

Wednesday, 19 October 2011

Crm 4 playground

User WMS Dev

Crm 4 Email configuration. Email router configuration

Email router is an interface between a email platform, e.g. Exchange, and the Crm.

E-mail Router can check directly on the user accounts/email boxes. However the down side of that is you will have save user name is password in Crm Personal Options. Once the password of a user changed in AD, the new password need to be updated in Crm too. If you have lots lots of user, it can become unmanageable.

Therefore the "Forward Mailbox" incoming delivery method is used to overcome the issue. "Forward Mailbox" is just another AD user/account/Exchange mail box.

Create the Forward Mailbox/User. Once you created an AD user, and exchange email box will be setup automatically. So User =[1 to 1 relationship]= User’s mail box

Setup forwarding rules using Rule Deployment Wizard.


Configure email router screen
Configuration Profiles: Define where the Exchange server is.
Deployment: Defines where the Crm server is.
Users, Queues, and Forward Mailboxes: Defines Forward Mailbox account/email account.

Just as a side note. "Set Personal Opitons | E-mail" AND "User | [E-mail Access Configuration] section go hand by hand.

Ref: http://video.mikelu.org/emailrouterfwd/emailrouterfwd.html

Tuesday, 18 October 2011

Troubleshooting the Microsoft Dynamics CRM Client for Outlook

http://blogs.msdn.com/b/crm/archive/2009/05/29/troubleshooting-the-microsoft-dynamics-crm-client-for-outlook.aspx

Troubleshooting Client Configuration

Check Managed Passwords:

When logging in through Internet Explorer from the client machine do you Get Prompted for Credentials?
Set “Automatic Logon with current user name and password” for the zone where the CRM URL was located. In Internet Explorer click Tools-Internet Options then under Security check the custom level options for User Authentication and select “Automatic Logon with current user name and password”
Remove Stored Passwords which are located in Control Panel | User Accounts | Managed Passwords
If you’ve upgraded from the 3.0 Client:

Remove the MSCRM Data File and CRM Address Book Provider per steps in KB 948312 (http://support.microsoft.com/kb/948312)
If still failing: Uninstall 3.0, uninstall and reinstall CRM 4.0.
Permissions Issues when configuring:

The error message is "Action Microsoft.Crm.Config.Client.InstallPstAction failed. LaunchOutlookInstallerProcess failed."
Use ProcessMon to see if it’s registry or file access issues. (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)
Active Directory DNS Issues:

The following error is shown when configuring - “The configuration wizard cannot connect to the Microsoft CRM server. This might indicate that the server is down.”
Add DNS Record for Organizations being accessed over IFD
Add DNS Records if you are using a Host Header on the CRM Website
Verify you have the correct SPN set on the Account running the AppPool. (http://support.microsoft.com/kb/929650)
Remove Duplicate SPNS http://support.microsoft.com/kb/911353
Check the Deployment Properties table:

KB 970630 (http://support.microsoft.com/kb/970630)
KB 947423 (http://support.microsoft.com/kb/947423)
Check Website for Host Header and Port that where updated post CRM Server install.
You may have an issue with MAPI . This is not as frequent, and this would be a last step.

You receive the error "Action Microsoft.Crm.Config.Client.InstallPstAction failed. LaunchOutlookInstallerProcess failed."
Run the fixmapi.exe which is located at %windir%\system32\fixmapi.exe
Login Issues

Check the URL you are using:

Can you login in from the client machine within Internet Explorer successfully?
Does the User in CRM, have a Role?
Is the user set to Administrative Mode on the user record?
If so the users set to Administrative Mode will not be able to successfully launch the Microsoft Dynamics CRM Client for Outlook.
Check Managed Passwords:

When logging in through Internet Explorer from the client machine do you Get Prompted for Credentials?
Set “Automatic Logon with current user name and password” for the zone where the CRM URL was located. In Internet Explorer click Tools-Internet Options then under Security check the custom level options for User Authentication and select “Automatic Logon with current user name and password”
Remove Stored Passwords that are located in Control Panel | User Accounts | Managed Passwords
Permissions may be causing a problem:

Permissions on Role
Turn on Platform Tracing to see if any CheckPrivilege errors occur
- CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: 8bebb2df-3ac8-dc11-8d71-005056000030 and PrivilegeId: 588725dd-c878-41c5-a4c3-5efc93cd3ffd

- If permissions are missing look in the Organization database to find out what privilege is missing.

Select * from privilegebase where PrivilegeID = ‘id of privilege GUID from the trace’
On the User Record check the Access Mode and see if it is set to Administrative Mode and if it is change it to Full
If there could be a permission issue on the Website in IIS look at IIS Logs & Plat Trace
Sync IWAM and IUSR passwords KB 906365 (http://support.microsoft.com/kb/297989)
Do you have any 3rd Party Addin’s?

Do you have the latest updates to other Addin’s?
Temporarily disable 3rd party Addin’s to find the Addin that is causing the issues.
Check the IFD Settings if it is enabled:

Setup IFD if accessing externally using the Microsoft Dynamics CRM Client for Outlook over the internet requires that IFD be enabled.
More info on IFD here (http://www.microsoft.com/downloads/details.aspx?familyid=3861E56D-B5ED-4F7F-B2FD-5A53BC71DAFC&displaylang=en)
CRM Outlook Add-in Responsiveness

Apply the latest Update Rollup for Microsoft Dynamics CRM 4.0

Disable other Outlook Add-ins to see if the issues still occur.

Start enabling the Add-ins one at a time to find out what Add-ins are causing the issues.
Check to see if there are any new updates for the Outlook Add-ins that are installed on the client machine. We have seen issues where older versions of some Outlook Add-ins have caused issues with Microsoft Dynamics CRM.
Gather a crash dump or hang dump to send into Technical Support using the ADPlus Tool at http://support.microsoft.com/kb/286350

ADPlus is a tool that will allow us to get a memory dump from a process that is giving you problems. To get this tool, please install the most current version of “Debugging Tools for Windows" from http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Once these tools are installed, do the following to capture a Crash Dump or a Hang Dump:

1. Create a directory called c:\adplus

2. Open a command prompt and change to the directory where you installed the debugging tools. By default, this is c:\Program Files\Debugging Tools for Windows

3.a. Crash Dump - If Outlook crashes (restarts or the Outlook.exe process disappears), then a crash dump is required. This can be captured using the following commands and needs to be run before the Outlook crash occurs.

To capture a Crash Dump type the following:

cscript adplus.vbs -crash -pn Outlook.exe -o c:\adplus
Note: a WARNING window will pop-up regarding debugging symbols - click OK

3b. Hang Dump - If Outlook is hanging or non-responsive to mouse clicks or keyboard commands for at least a minute or more than a hang dump may be required to troubleshoot the issue and can be captured using the steps below. The hang dump is a point in time capture and must be performed after the hang has occurred. Do not perform the steps to capture a hang dump before the problem has occurred, but after the Outlook.exe process has hung.

To capture a Hang Dump type the following:

cscript adplus.vbs -hang -pn Outlook.exe -o c:\adplus
Note: A WARNING window will pop-up regarding debugging symbols - click OK
Note: It is best to take three different Hang Dumps usually 30-60 seconds apart from each other.

4. Do not interfere with the windows that are opened, just let it run minimized.

5. You will not be able to log off the system while you are monitoring.

6. After the hang/crash occurs, please zip and send the contents of the c:\adplus directory.

If help is required with these procedures, please open a support case.

How to do nested table in ssrs

Option 1: SSRS Grouping

Option 2: Sub-report - this option can handle more complicated situations.

http://stackoverflow.com/questions/2261004/sql-reporting-nested-table-data

Monday, 17 October 2011

Sencha - great for making mobile phone apps

Sencha provides JavaScript web app frameworks and tools to develop rich web apps based on HTML5. - Cached

Sunday, 16 October 2011

Intergen Wellington tfs migration - new server folder

wlgtfs1v:8080/tfs/new_tfs1 = (On old server) wlgtfs1
wlgtfs1v:8080/tfs/old_tfs1 = (On old server) wlgtfs2

Manifest file = Program Meta data.

Manifest file = Program Meta data.

How to apply an annual leave/holiday in Intergen

http://kernel2.intergen.org.nz/teams/Corporate%20Services/Application%20Forms/Forms/AllItems.aspx

Annual leave calculation, Holiday calculation

4 weeks annual leave / 52 weeks = 0.0769 annual leave week per working week = 3.077 annual leave hours per week = roughly 12 annual leave hours per month

OR

11.5 hours per month on average roughly. (Averaged from 3 of my pay slips)

Saturday, 15 October 2011

ELIZA an early example of primitive natural language processing

ELIZA is a computer program and an early example of primitive natural language processing and AI.

http://en.wikipedia.org/wiki/ELIZA

Thursday, 13 October 2011

Things learnt 13/10/2011

Green sleeves song is the ice cream truck sound.

harmonica = 口琴

acoustic guitar (Under $200 is a very cheap guitar)
Electric guitar (Easy to learn)
Bass Guitar

How to make estimation?

* Don't change on your estimation
* Give assumptions and if the assumption breaks, re-estimate.

Wednesday, 12 October 2011

How to deal with bitch customers?

How to register Window Eventlog sources.

The issue:
I use the following code to register a windows eventlog source in code. It worked in the dev environment but not in UAT or PROD

// Create the source, if it does not already exist.
if(!EventLog.SourceExists("MySource"))
{
//An event log source should not be created and immediately used.
//There is a latency time to enable the source, it should be created
//prior to executing the application that uses the source.
//Execute this sample a second time to use the new source.
EventLog.CreateEventSource("MySource", "MyNewLog");
Console.WriteLine("CreatedEventSource");
Console.WriteLine("Exiting, execute the application a second time to use the source.");
// The source is created.  Exit the application to allow it to be registered.
return;
}

// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "MySource";

// Write an informational entry to the event log.    
myLog.WriteEntry("Writing to event log.");

The Cause:
Permission! The app is run as a scheduled task. It turns out the account the app is running under is no enough for creating a eventlog source. And windows keeps silent about it.

The Solution:
You can add a eventlog source directly into the registry. Best of all when you deploy, you can just export and import the registry.
HKEY_LOCAL_MACHINE
SYSTEM
CurrentControlSet
Services
Eventlog

http://msdn.microsoft.com/en-us/library/windows/desktop/aa363648(v=vs.85).aspx

定语和补语的区别

定语是形容名词的,有前置定语和后置。补语一般修饰一句话,起补充说明的作用。区别他们,你就把句子成分分一下,把所以修饰的词去掉,不该变句子意思的就是定语,少了成分的就是补语!

Tuesday, 11 October 2011

windows service vs windows scheduled tasks

In general, I prefer windows scheduled tasks as long as the running frequency is less frequent than once every 30 seconds. I.e. more than 30 seconds between two consequent tasks.

windows scheduled tasks
* Easy to debug
* Easy to setup
* Can be run in silent mode, i.e. no console window flashes every time when the program is run.

windows service
* Run in background by default
* Can start and stop the service in the windows services.exe
* Can be run very frequently

Hide Console Window in C# Console Application; Run console application in a silent mode, KeepAlive Application or Service

The problem:
I created an window console application and run it as a windows scheduled task. But the console window flashes and goes back every time the app is run.

The solution
Option 1: (Best Option)
Change the output type from Console Application to Windows Application. This can be done under Project -> Properties -> Application in Visual Studio:

Option 2: Make a window service app using windows servicebase class

Monday, 10 October 2011

Outlook for Microsoft dynamics crm add-in will not install, Crm outlook client

One of the reasons can be some other Microsoft or Non-Microsoft add-ins is interfering with the install process.

To disable outlook add-in.

In outlook 2010, Outlook Options -> Add-Ins -> Click on "go" next to Manage COM Add-ins

In outlook 2007, Trust Center -> Click on "go" next to Manage COM Add-ins

Often forgotten added dll references and namespace, Crm gotyas

using System.Web.Services.Protocols; // for SoapException

System.Web.Services dll and a references

Sunday, 9 October 2011

Intellisense not working in Visual Studio 2008

Since I upgraded my VS2008 Beta2 to the RTM, the intellisense has not been working. I have seen a few posts about this, some suggesting you need to reset the configuration by running

devenv.exe /safemode

(see http://msdn2.microsoft.com/en-us/library/ms241278(VS.80).aspx)

but this did not work for me.

So I had a poke about in Tools|Option and found that on the Text Editor|All Languages that the three checkboxes for Statement Completion where showing neither empty or checked but a fully coloured box - which usually means an unknown settings. So a set these all to checked (a tick) and my Intellisense started working.

http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2007/12/01/intellisense-not-working-in-visual-studio-2008.aspx

Thursday, 6 October 2011

Monday, 3 October 2011

Extract Plugins Crm utility

http://blogs.infinite-x.net/free-utilities/

Saturday, 1 October 2011