Rexiology::Work

Microsoft, Information Technologies...

Community

News

  • From Taiwan, living and working at Tokyo, Japan.




Recent Posts

Tags

Microsoft Sites

Other Sites

Blog pools

Bloggers

Archives

Site Info



Locations of visitors to this page




Logos & Chicklets


GeoURL


Rex's Certifications
Rex's Certifications


Creative Commons授權條款
本 著作 係採用
Creative Commons 授權條款



August 2008 - Posts

Create Multi-Tenancy Organizations in CRM 4.0

crosspost from http://blogs.msdn.com/rextang

After some basic checking of CRM 4.0 system, it’s now time to import some sample data and test further. As I am working in Japan, besides using the original English contents for testing, also would like to have the sample data to show to my colleagues as well as some Chinese data for self-testing. as I installed only one CRM 4 Server in my dev vm, should consider a way that can make those sample data working in the same time without install / restoring the database. so i think that should be the time for the new CRM 4.0 feature “Multi-Tenancy Support” to on stage.

Multi-Tenancy support means that 1 CRM 4.0 server can host multiple organizations at the same time, so that I can just create 3 organizations for each sample data (English, Japanese, Traditional Chinese).

Although the Implementation Guide did say that it had this new multi-tenancy feature, actually I didn’t see how to do it by reading through the whole documents. found that MSDN CRM Team blog had the post about how to do it, would also leave a note here.

The Administration Console way:

Use Deployment manager to create a new organization (All Programs -> Microsoft CRM -> Deployment Manager). You need to be a member of Deployment Administrators group to run this tool. The user who installed CRM is added as a member of this group automatically. Deployment manager will collect information such as name of the organization, currency settings, sql server etc and create a new organization.

refer to the team blog for SDK way of creating multi-tenancy organizations.

by the way, not all the CRM 4 SKUs support multi-tenancy, I installed Enterprise version and it’s ok. also, before install those multi-language sample data, install the related Language Packs first (also remember to download the Read Me for install steps). the CRM Implementation Guide also states the steps to install language packs.

Also notice that the sample data for each language all trying to create the same organization name “AdventureWorksCycle”, in order to seperate the different languages to different organizations, create the AD OUs and CRM Organizations with different names, also remember to change the sample data’s organization name to match the created OU name before importing to each database using Data Migration Manager.

FYI.

Technorati Tags: ,,
Dynamics CRM 4.0 – Hide the Application Menu Toolbar…

crosspost from http://blogs.msdn.com/rextang

In the main page of Dynamics CRM, there is Application Menu Toolbar for users to do most of actions, also allowed for customizations.

sometimes you may got customization requirements (like me) not to customize this, but to completely remove it so that user would only be allowed to use Application navigation pane and the Wunderbar in the left side (maybe for the single path page transition for making SOP for users). so I spent some time to find a way to do this and would like to leave a note here.

if you go standard (supported) ways, it’s not possible to remove the application menu bar by modify sitemap, ISV.config, etc. but if you are an experienced asp.net / web developer, by examing the aspx code, soon you should find a way to workaround this.

The CRM home page is loaded by the /loader.aspx file, if you look at the code there, you’ll find that the home page is made by several IFrames. the CRM logo image and the menubar is located at top frame, so you can simplely just delete the frame to make it disappear. but if you do so, you’ll soon find that the application won’t function normally anymore and will get errors when you click anything. since actually many of other components are interacting with objects in this application menu bar.

so how do you solve this? well, simple enough, just adjust the frameset row size to “HIDE” this menu bar, and you are done! in the loader.aspx file, locate the line with

<frameset rows="112,*" border="0" style="border:0px;">

and change the row height to 60:

<frameset rows="60,*" border="0" style="border:0px;">

and you got something like this with everything working like nothing happened:

wondering if this modification works in Application Mode?

the answer is YES, it will also work in Application Mode. since it used the same loader.aspx file.

by the way, the source aspx of the top frame is located at [{crm web root}/_root/bar_Top.aspx], in case you want to see what’s it doing inside…

and be caution, this is not a supported customization!!

FYI.

Auto-Indent HTML source in Notepad++ using TextFX Html Tidy

crosspost from http://blogs.msdn.com/rextang

Am started investigating CRM 4.0’s aspx source for custimization. had the requirements of re-indenting aspx/html code so that I can see the table layout structure and others. here is the quick note about using TextFX Html Tidy in Notepad++ to do the html auto-indention.

First of all , HTML Tidy is a project of reformatting/transforming HTML source. and Notepad++ got TextFX plug-in and can work with HTML Tidy.

by referring to the Notepad++ Tidy page, it stated:

As installed, HTML Tidy will not do much - it requires a configuration file to activate it. For Notepad++, create a text file in the folder plugins\NPPTextFX under your Notepad++ installation folder, and name it tidycfg.ini. After creating the file, select TextFX -> TextFX HTML Tidy -> Refresh Menu from TidyCFG.INI from the menu to load the file in Notepad++. Notepad++ will then show a list of possible actions in the TextFX -> TextFX HTML Tidy menu.

so I just followed the instructions above to make the tidycfg.ini file and put those basic formatting rules on that page for testing. after that, just create a simple reformatting rule like this one:

[Re-Indent HTML Source]
indent: yes
indent-spaces: 2

and it’s done. by running this rule under Notepad++, the html source will be re-indented to tag-view-friendly indention for me to check the layout and debug.

pretty nice editor, Notepadd++, and pretty nice plug-in, the TextFX HTML Tidy!!

Change default View Source editor of IE

crosspost from http://blogs.msdn.com/rextang

started playing around CRM 4.0 customization. need to view the page html source often and need a good xml / html tag editor!

I choosed Notepad++ for my tag editor, found it pretty useful. and now got the question about using it by default when I view the page source in IE.

Found the information from Thea Burger’s blog and would like to note here for my further reference…

the registry key for setting the default view source editor for IE is at:

HKEY_LOCAL_MACHINE
|- Software
|-- Microsoft
|--- Internet Explorer
|---- View Source Editor
|----- Editor Name (Default) = C:\windows\notepad.exe

modify or create the key and make whatever editor you like here and you are done.

also by reading the comments of the post, Notepad++ made a exe file called “nppIExplorerShell.exe” that do this for you without get your hand dirty with registry editing (you have to select “As a default html viewer” while in the setup of Notepad++ to get this exe file copied to the working directory, or it won’t be copied. tested in Notepad++ v5.0.3)…

FYI.

Change logo in Dynamics CRM 4.0

crosspost from http://blogs.msdn.com/rextang

start from next month I am officially assigned to a project developing solutions using Microsoft Dynamics CRM 4.0 product. so I guess here would be tips and tricks memo about CRM 4.0 customization later on in this blog. and here is the first one.

How to change the logo image in the home page of CRM 4.0?

although this is still not a supported customization, it's still doable. referencing from Cesar de la Torre blog, here are the ways to do it.

1. change the image file at [C:\Program Files\Microsoft CRM Server\CRMWeb\_imgs\masthead.jpg] and you are done.

or

2. modify the css definition [TD.ms-crm-MastHead-Logo] at [C:\Program Files\Microsoft CRM Server\CRMWeb\_common\styles\global-dynamic-styles.css.aspx] file.

be sure to backup those settings when you are upgrading to new versoin of CRM or applying a patch, since the update might then overwrite your files and lost your logo custimization.

FYI.

Disable iPhone backup while iTunes sync…

quick tip. since everytime when syncing iphone 3g with itunes, it took lots of time backing up the application / data stored in iphone. found a way to disable this to speed up the sync process.

[via here]

for windows vista, locate the [iTunesPerfs.xml] under [C:\Users\<user-name>\AppData\Roaming\Apple Computer\iTunes] folder, open this xml file with xml editor like Notepad++, goto to the XML tag <key>User Preferences<key> and insert the following XML into this section immediately after the first <dict> tag:

<key>DeviceBackupsDisabled</key>
<data>
dHJ1ZQ==
</data>

save the file and done.

remember to remove this setting sometimes to let iTunes backup the iphone settings in case your phone get into some trouble and need a full restore…

FYI.

Technorati Tags: ,,,
Slipstream / Servicing Windows 2008 Server iso image with Hyper-V RTM bits...

crosspost from http://blogs.msdn.com/rextang

Just finished slipstream / servicing the windows 2008 server x64 iso image for using in my HPC server 2008 computing node provisioning (I would like my computing nodes to use Hyper-V Native network driver on Enterprise and MPI NIC to have high-speed access while bare-metal provisioning.) and like to write down the resource I found on net also the steps how I done it here for reference later.

(1) you need WAIK (Windows Automated Installation Kit) for Windows Vista SP1 and Windows Server 2008

download here and install it on your working machine. (it's a 1375.9mb iso file to download...)

(2) you need Windows 2008 Server iso images (x86 or x64, depends on your needs)

download the image from TechNet or MSDN downloads.

(3) you need Hyper-V RTM bits (KB950050)

x64 bits download here

(4) Some useful information to read

John Howard's Hyper-V RTM slipstream posts - part 1 ( part.2 and part.3 for reference if you are going to setup your own WDS server for PXE boot network installation, or want to service the Vista SP1 image with Hyper-V RTM bits)

The great tutorial post from Ramesh MVP on WinVistaClub forum about Merging Vista x86 and Vista x64 images into a single DVD. key point here is the usage of oscdimg.exe provided from WAIK to create the iso image from serviced bits.

(5) All set! let's get hands dirty!!

(A) Install WAIK to your working machine or working VM

(B) Open "Windows PE Tools Command Prompt" from WAIK start menu group. the rest of commands all happen here.

(C) create some working folder. I created [c:\aik-mount] for mount folder, [c:\aik-temp] for temp folder and [c:\aik-all4iso] for source folder to create serviced iso image.

(D) Extract KB950050 msu file to get the cab file for servicing / slipstreaming.

      cmd> expand –F:* <pathtomsu> <folder>

(E) mount the windows server 2008 iso image and copy all the files to [c:\aik-all4iso] folder.

(F) servicing hyper-v rtm bits to [install.wim] file under [c:\aik-all4iso\sources\]. the install.wim file should contain 6 index for various editions of server installations (Standard, Enterprise, DataCenter editions, with Server and Server-Core installations). do the servicing / slipstream for all the editions and installations. (to see the package content for a wim file, using cmd> imagex /info path-to-wim-file)

      cmd> imagex /mountrw c:\aik-all4iso\sources\install.wim 1 c:\aik-mount
      cmd> start /w pkgmgr /ip /m:c:\path-to-kb950050-cab-file\Windows6.0-KB950050-x64.cab /o:c:\aik-mount;c:\aik-mount\windows /s:c:\aik-temp
      cmd> imagex /unmount /commit c:\aik-mount


      cmd> imagex /mountrw c:\aik-all4iso\sources\install.wim 2 c:\aik-mount
      cmd> start /w pkgmgr /ip /m:c:\path-to-kb950050-cab-file\Windows6.0-KB950050-x64.cab /o:c:\aik-mount;c:\aik-mount\windows /s:c:\aik-temp
      cmd> imagex /unmount /commit c:\aik-mount

      cmd> imagex /mountrw c:\aik-all4iso\sources\install.wim 3 c:\aik-mount
      cmd> start /w pkgmgr /ip /m:c:\path-to-kb950050-cab-file\Windows6.0-KB950050-x64.cab /o:c:\aik-mount;c:\aik-mount\windows /s:c:\aik-temp
      cmd> imagex /unmount /commit c:\aik-mount

      cmd> imagex /mountrw c:\aik-all4iso\sources\install.wim 4 c:\aik-mount
      cmd> start /w pkgmgr /ip /m:c:\path-to-kb950050-cab-file\Windows6.0-KB950050-x64.cab /o:c:\aik-mount;c:\aik-mount\windows /s:c:\aik-temp
      cmd> imagex /unmount /commit c:\aik-mount

      cmd> imagex /mountrw c:\aik-all4iso\sources\install.wim 5 c:\aik-mount
      cmd> start /w pkgmgr /ip /m:c:\path-to-kb950050-cab-file\Windows6.0-KB950050-x64.cab /o:c:\aik-mount;c:\aik-mount\windows /s:c:\aik-temp
      cmd> imagex /unmount /commit c:\aik-mount

      cmd> imagex /mountrw c:\aik-all4iso\sources\install.wim 6 c:\aik-mount
      cmd> start /w pkgmgr /ip /m:c:\path-to-kb950050-cab-file\Windows6.0-KB950050-x64.cab /o:c:\aik-mount;c:\aik-mount\windows /s:c:\aik-temp
      cmd> imagex /unmount /commit c:\aik-mount

(G) now the install.wim is all serviced with hyper-v rtm bits. next to create the new serviced iso using oscdimg.exe

cmd> oscdimg.exe –u2 –bc:\aik-all4iso\Boot\etfsboot.com –lKRMSXVOL_EN_DVD –g –t08/12/2008,23:30:00 –h c:\aik-all4iso c:\win2k8-x64-hyperv-rtm-serviced.iso

And until here, you got the hyper-v rtm serviced windows 2008 server x64 install iso image to use!! LOL!

already tested this iso while installing my HPC computing nodes without problems. all in the Hyper-V virtual environment and during a 8 computing nodes installation (simutaniously), computing nodes successfully found the AD server using the Hyper-V native network card as Enterprise network NIC and complete the bare node installation without human interference!! nice!!! this could expend if I want to simutaniously install 1000 computing nodes in the same time. the latest Windows HPC Server 2008 RC1 bits is really stable and cool on installing and managing nodes! can focus more time on writing codes for HPC now!

FYI.

SQL Server 2008 RTMed!!

crosspost from http://blogs.msdn.com/rextang

for the long waiting, at 8/6 PST time, SQL Server 2008 finally RTMed!

checkout press release here:

http://www.microsoft.com/presspass/press/2008/aug08/08-06SQLServer2008PR.mspx

download place here:

http://msdn.microsoft.com/en-us/sqlserver/default.aspx

product samples available at CodePlex (via reedme):

http://www.codeplex.com/SqlServerSamples/Release/ProjectReleases.aspx?ReleaseId=16037

FYI.

Technorati Tags: ,,
Disable then Delete ActiveX on IE7 under Protection mode won’t install and run again…

crosspost from http://blogs.msdn.com/rextang

Symptoms:

Under IE7, under protection mode on, normally installed an ActiveX control. open IE7 Add-on manager, locate the ActiveX control, and disable it. because the ActiveX control is running, close the IE7 window and open a new one, or open internet settings under control panel. open the Add-on manager again, then delete the control while in disabled status. once deleted, going to the same page to install the control again. it will show a small icon in the status bar indicating that the control cannot be used. double-click the icon will open the Add-on manager, but since the control is not installed, there is no way to make the control to be enabled again.

Cause:

It seems that under IE7 protection mode, the IE or the ActiveX control won’t be able to modify certain registry keys, thus left the Add-on disable bits in the registry. when the control is going to be installing / loading again, IE7 check the disable bit and then prevent the control from running / installing.

Resolution:

Since under protection mode there is limited security context to do the registry modification, by turn off the protection mode, IE7 will be able to modify / delete the Add-on disable bits and the control will install and run again.

More Information:

When disabling an ActiveX control, IE7 will place a registry key under

HKEY_USERS\[User-LONG-SID]\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\[ActiveX CLSID]

under the key there will be a “Flags” DWORD key setting to 1, indicates the control had been disabled. when enable the control again, the [ActiveX CLSID] folder will be all deleted, indicates that the control is not been blocked / disabled.

When under protection mode, IE7 seems not able to modify the registry key here, thus even the control is deleted / unregistred from the registry, this key will remain there. once going to reinstall the control again under protection mode, IE7 checks this key and determine that the control is blocked and preventing from loading / installing it.

When turning protection mode off, or just set the web server to trusted zone (protection mode off by default in trusted zone), IE7 will be able to modify this key and when going to reinstall the control, it will first delete the setting here to let it install.

Remarks:

Those facts were examed by setting a test env. and tested the control behavior, also by comparing the whole registry under various situations, for a feasibility study of a Vista / IE7 infrastructure migration project. this should be a rare case since that for intranet business web applications, normally the intranet web servers will be set into trusted zone thus will be running under protection mode off.

FYI.

Technorati Tags: ,,,,,
SxS (SideBySide) problem, again (on ATL ActiveX control)…

crosspost from http://blogs.msdn.com/rextang

What if you had written an native ATL ActiveX control and just can not let it show on your IE7 browser?

You had considered all those security reasons like:

  • turning on “using unsigned ActiveX control” on IE7 setting for Internet Zone
  • turn off portection mode for Internet Zone
  • put the test webserver url to trusted zone

and if your native ActiveX control still not showing up, you better check out the application log in event viewer!!

I am using VS2008 VC++ to create an ATL 8.0 ActiveX Control, after compiled the dll, only copy the dll to the web server for download. tested my control via IE7 of another Vista VM and the control just won’t show up even I’ve lower the security level.

later found this post from Junfena Zhana, checked the application log and confirmed that it’s indeed a SxS problem, I am lacking VC90 CRT runtime. also knew that I was compiled my control in debug mode so that on the client side there won’t have the debug version of VC90 CRT. by running SxSTrace to confirm the lacking dll, I just installed the VC++ 2008 Redistributable Package on my testing Vista VM, also recompile my dll in release mode, and my ATL ActiveX control finally showed up in IE7 browser!

Another SxS problem faced… feeling so tough living in a world without .NET framework…

FYI.

VS2008, C++ Project, WinSxS requestedPrivileges error…

crosspost from http://blogs.msdn.com/rextang

Got a task to write a native ActiveX control to run under IE7 for testing the security context when the ActiveX control creating another process to run a WinForm application.

It’s pretty easy to create an  ActiveX control using .NET, but this time I have to use native C++ code. been a long time not writing those stuffs, got a tough learning curve to get those thing back last week.

Am going to take the shortest path of using ATL to create ActiveX control under VS2008 C++ ATL Project. following the ATL Tutorial and it also pointed out another MFC example TstCon (ActiveX Control Test Container) for testing the control without using a browser. followed the instructions to build the TstCon example and when going to run it, got the following error:

The application had failed to start because uts side-by-side configuration is incorrect. Please see the application event log for more detail.

By looking to Application event log, got the error as following:

Activation context generation failed for "C:\path-to\TstCon32.exe".Error in manifest or policy file "C:\path-to\TCProps.DLL" on line 1. The requestedPrivileges element is not allowed in component manifest.

by searching the internet, found the info about this problem also got a solution for this. by turning off the UAC linker option (Enable User Account Control (UAC), the /MANIFESTUAC option) that’s defaultly Yes to No, and rebuild the application, the error is vanished the the TstCon application started.

Now I can continue testing my ActiveX control…

FYI.