Could not load file or assembly ‘Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified or Deploying custom web application inside ISV folder of CRM 2011


To deploy our custom web application inside ISV folder of CRM 2011 we need to follow the below steps

Make following changes in the web.config

<configuration>
<configSections>
<remove name=crm.authentication />
</configSections>
<system.web>
<httpModules>
<clear/>
</httpModules>

……………………

And after deploying the application within the ISV folder, place the following dlls within its bin folder

  • AntiXssLibrary.dll
  • Microsoft.Crm.dll
  • Microsoft.Crm.Sdk.dll
  • Microsoft.Crm.Platform.Sdk.dll

We can find these dll’s inside

../Microsoft Dynamics CRM/Server/Bin folder.

The above solution worked perfectly for Beta Versions of CRM 2011.

Recently we upgraded to RTM, and we had to deploy a WCF Service and custom web site inside isv.

For WCF service we had to make following changes to the web.config apart from the changes mentioned above

<serviceHostingEnvironment aspNetCompatibilityEnabled=”false”>
</serviceHostingEnvironment>
</system.serviceModel>

And in case of custom web site we had to add the following additional dll’s

  • Microsoft.Crm.Sdk.Proxy.dll
  • Microsoft.Xrm.Sdk.dll

Hope it helps!

Get the Plugin assembly stored in database in CRM


One of my colleagues faced a situation where he had installed a plugin assembly into database but was not able to locate its dll, and now he wanted to deploy it in some other server.

These are the steps he followed

Get the encoded base 64 string representation of the plugin from PluginAssemblyBase table.

select name,content,*
from PluginAssemblyBase

Use that content and get the dll from the following site.

http://www.motobit.com/util/base64-decoder-encoder.asp

Set decode and export to binary file option there with filename having extension as .dll

Open the dll in the reflector tool and use the source code to build that assembly.

http://reflector.red-gate.com/download.aspx

Bye..

Setting Custom View as default for lookup in Connection entity. (CRM 2011)


To create a custom view for a lookup, we can refer to this blog post

https://nishantrana.wordpress.com/2010/12/31/filtered-lookup-in-crm-2011/

Here

lookupControl.addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);

Setting last parameter as “true” sets the custom view as default. However this was not happening in case of connection entity lookups.

So to finally achieve this we did the following

Modify the lookupinfo.aspx “..\Microsoft Dynamics CRM\CRMWeb\_controls\lookup”.

Find the function named handleView and modify it to show our custom view as default.

function handleView(o, entity){
var selObjectsDropdown = (typeof (selObjectsList) == Mscrm.TypeNames.undefinedType) ? selObjects : selObjectsList;


if (o.innerHTML.indexOf(‘Case Member View’)!=-1){

var sOriginalViewId = “{C0F1DD64-1BF3-450D-BCDE-DF4732DE1001}”;

}
else {

var sOriginalViewId = crmGrid.GetParameter(“viewid”);
if (selObjectsDropdown.selectedIndex != -1 && selObjectsDropdown.options.length > 0) {
var tempDefaultViewId = selObjectsDropdown.options[selObjectsDropdown.selectedIndex].guid;
if (!IsNull(tempDefaultViewId)) {

sOriginalViewId = tempDefaultViewId;}}}

. . . . . . . .

. . .

It is an unsupported customization!!!!

Bye..

Get QueryString values in JavaScript


Hi,

We can make use of the following functions to get the value of querystring parameters through JavaScript

// helper function to get the query string
function Querystring() {

var querystring = location.search.substring(1, location.search.length);

var args = querystring.split(‘&’);

for (var i = 0; i < args.length; i++) {

var pair = args[i].split(‘=’);

 temp = unescape(pair[0]).split(‘+’);

 name = temp.join(‘ ‘);
temp = unescape(pair[1]).split(‘+’);
value = temp.join(‘ ‘);
this[name] = value;
}
this.get = Querystring_get;

}

function Querystring_get(strKey, strDefault) {
var value = this[strKey];
if (value == null) {
value = strDefault;
}
return value;
} 

Suppose our current page url is

http://mycustompage/home.aspx?id=1020

To get the value for id we’ll do this

var qs = new Querystring();

var idValue=qs.get(“id”, “”);

 Bye..

IntelliSense for JavaScript in CRM 2011


Hi,

Follow the instructions in the following post to have the IntelliSense while writing JavaScript for CRM 2011.

http://www.patrickverbeeten.com/pages/ContentItemPage.aspx?id=9&item=118&p=true

Bye..

2010 in review


The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 290,000 times in 2010. If it were an exhibit at The Louvre Museum, it would take 12 days for that many people to see it.

In 2010, there were 86 new posts, growing the total archive of this blog to 346 posts. There were 72 pictures uploaded, taking up a total of 158mb. That’s about 1 pictures per week.

The busiest day of the year was November 10th with 1 views. The most popular post that day was Creating Word document using C#.

Where did they come from?

The top referring sites in 2010 were google.co.in, google.com, social.microsoft.com, social.msdn.microsoft.com, and eggheadcafe.com.

Some visitors came searching, mostly for wpf hyperlink, sharepoint javascript, could not load all isapi filters for site/service. therefore startup aborted., oracle left, and unable to generate a temporary class (result=1)..

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

Creating Word document using C# November 2007
32 comments

2

Using Hyperlink in WPF application March 2009
3 comments

3

Unable to generate a temporary class (result=1). error CS2001: Source file ‘C:\WINDOWS\TEMP\filename.cs’ could not be found error CS2008: No inputs specified February 2008
30 comments

4

(Service Unavailable) Could not load all ISAPI filters for site/service. Therefore startup aborted. September 2008
18 comments

5

Using Left and CharIndex in Oracle October 2007
4 comments

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓