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!


[...] http://nishantrana.wordpress.com/2011/01/20/could-not-load-file-or-assembly-microsoft-crm-version5-0… Filed under: CRM 2011 [...]
[...] http://nishantrana.wordpress.com/2011/01/20/could-not-load-file-or-assembly-microsoft-crm-version5-0… Share this:EmailDiggRedditStumbleUponTwitterFacebookPrintLinkedInLike this:LikeBe the first to like this. Posted in: CRM 2011 ← CRM 2011 – Understanding document locations Be the first to start a conversation [...]
Thanks. It work’s for me. Great
[...] post: http://nishantrana.wordpress.com/2011/01/20/could-not-load-file-or-assembly-microsoft-crm-version5-… Share this:TwitterFacebookLike this:LikeBe the first to like this post. [...]
[...] post: http://nishantrana.wordpress.com/2011/01/20/could-not-load-file-or-assembly-microsoft-crm-version5-… Share this:TwitterFacebookLike this:LikeBe the first to like this post. [...]
Great solution, thanks
I have a question. I have a web application hosted in side the ISV folder, my installation is claim configured, when accessing the page from isv folder i get the error page not found. What should be the reason…? im not able to solve the isuse….
I’m trying to put WCF data service in ISV folder. That service need to access other database for integration purpose. I followed all the steps and it’s keep on asking user name and password when I browse that service. After three times of asking credential it’s shows blank. Any idea on that?? Please help me. Thanks in advance.
i am getting handler error when executing the button click event when the web page is deployed to ISV folder. But when the page is hosted as separate application it runs correctly. Please let me know why it behaves like this.
this worked a treat for me. nishant rana is a top bloke. cheers.
Well, I am not a developer but I got to deploy a project which actually send fax using the fax services on windows 2008 server 64bit. the project was developed on a windows 32bit platform and I was setting all the information according to the given instruction but still I this annoying error and then I found the solution and that was to change the platform from anycpu to x86 and it worked. for a complete setting list please follow the link below:
http://www.sizledcore.com/2011/10/could-not-load-file-or-assembly/
sorry, it deleted my copy paste stuff
You need to declare the clear tag in the httpmodules tag
Hey itvti,
It’s just like Nishant posted.
I had the same problem as you until I realised that I forgot to state the
below the system.web tag.
This clears the settings of the machine.config and doesn’t request all these dlls anymore.
Thorsten
thanks for posting this, you saved me heaps of time
Thanks Nishant.
It helped resolving my issue.
Thanks,
Krutika Vanazara
i am having the exact issue as Luiz getting,
any one having solution for it?
Appreciate any gd suggestion.
Sudhanshu
It’s working when,
I added the httmodule clear tag in web.config
and added the dlls in application bin folder
•AntiXssLibrary.dll
•Microsoft.Crm.dll
•Microsoft.Crm.Platform.Sdk.dll
Good it worked for you
It’s working when,
I added the tag in web.config
and added the dlls in application bin folder
•AntiXssLibrary.dll
•Microsoft.Crm.dll
•Microsoft.Crm.Platform.Sdk.dll
It’s working when,
I added the tag in web.config
and added following dlls in application bin folder
•AntiXssLibrary.dll
•Microsoft.Crm.dll
•Microsoft.Crm.Platform.Sdk.dll
Hi Nishant,
I cannot make it work. Are you interested in work with me to find a solution for my problem? If you are, send me an email at luiz.guimaraes@rogers.com and we can discuss your hour rate.
Regards,
Luiz
Hi Luiz,
Let me know how can I help you.
Putting those dlls in the bin worked for me, that’s why I had suggested it on my blog.
But as you can see somebody mentioning in comment to the post that he had to put some other dlls as well to get things working.
Earlier I used to get error on deploying application inside ISV, however in one of the developers forum, I saw someone suggesting to put all the dlls of the server/bin folder of crm to the bin folder of the custom web application. Give that a try as well.
Regards,
Nishant Rana
In our case the three DLLs aren’t enough. We had to copy the following DLLs for the Custom-Page to run inside the CRM Website (with its own VDir and NET4/Classic AppPool):
AntiXssLibrary.dll
Microsoft.Crm.Admin.AdminService.dll
Microsoft.Crm.ADUtility.dll
Microsoft.Crm.dll
Microsoft.Crm.ObjectModel.dll
Microsoft.Crm.Platform.Sdk.dll
Microsoft.Crm.Platform.Server.dll
Microsoft.Crm.Sdk.dll
Microsoft.Crm.Tools.ActiveDsWrapper.dll
Microsoft.Crm.Tools.Admin.DMSnapinLib.dll
Microsoft.Crm.WebServices.dll
(in addition to the SDK DLLs:
microsoft.crm.sdk.proxy.dll
microsoft.xrm.sdk.dll)
What I would be interested to know is if there is a better way to solve this issue since you have to keep in mind that CRM Updates might change those DLLs.
Is this stable now?
Hi Nishant,
I deployed the application using VS (Publish). The error is the same you solved: Could not load file or assembly ‘Microsoft.Crm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified
I started an application from scratch. This time I didn’t convert from 4.0. I did a new one using CRM 2011 and VS 10. I got the same error.
Regards,
Luiz
Hi Luiz,
When i am doing it, it is working absolutely fine for me.
I am also creating a new blank website, simply adding a default.aspx page in it.
And then publishing it inside ISV folder of CRM.
After publishing just placing the above mentioned dll’s inside the bin folder.
Regards,
Nishant Rana
Hi Nishant,
I am getting the same problem as Luiz. When I try to add
it says that this is an invalid property
Jason
Hi ,
What steps have you followed for deploying your application and what error are you getting ?
Try the steps mentioned in the post with some other simple web application first. If it succeeds then try with your application.
Regards,
Nishant Rana
Hi Nishant,
I did what you said but still I am getting the same error:
Could not load file or assembly ‘Microsoft.Crm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.
Here it is my web.config.
<!–
The section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
–>
<!–
The section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
–>
Let me give you some history about what I did:
1) I have a tool (magicQuestionnaire) running for CRM 4.0 inside many IFrames
2) I upgraded the environment to CRM 2011
3) I upgraded my project to VS 2010, .Net 4
4) I changed the web.config to include the entries you suggested
5) I Built the project to ISV/magicQuestionnaire Web Application
6) I got the warning “The element ‘configSections’ has invalid child element ‘remove’” but I am ignoring it
7) I published the project to the ISV/magicQuestionnaire folder as I was doing before in CRM 4.0
6) I copied the three dlls from CRM 2011 bin folder to ISV/magicQuestionnaire/bin folder
What I am doing wrong? Please help me.
Also, I noticed that I get the same error if I try to change the project to release and build it. It fails with the same error message. It only rebuild if I leave the project as debug
Thanks in advance,
Luiz