locked
CRM 2015 - Publish custom MVC 4 website to virtual directory RRS feed

  • Question

  • I have developed an MVC 4 website that interacts with CRM 2015 (via SDK) and it works fine from my VS 2012. When I publish the website to the CRM Server, I get an error with a dll which I am not using in my website. The website is published inside a virtual directory with it's own application pool. The error I keep getting is the following:

    --------------------------------------------------------------------------------------------------------------------

    Could not load file or assembly 'Microsoft.Crm, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Description:

    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Crm, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    --------------------------------------------------------------------------------------------------------------------

    Can anyone help with this issue?

    Thanks

    Tuesday, October 13, 2015 2:35 PM

Answers

All replies

  • Hello,

    Just for your information. Your scenario is unsupported so there is no 'right' answer. Try to publish your application using separated portal.


    Dynamics CRM MVP
    My blog

    Tuesday, October 13, 2015 3:26 PM
    Moderator
  • Hi Robert,

    If you have ported  Your application under default port (443) you copy "Microsoft.Crm.dll" and other dlls(if any) in BIN folder of your application.

    Hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in

    Tuesday, October 13, 2015 5:41 PM
  • which part of this is not supported? the website is built using the sdk to communicate with CRM. would it be supported if i created another website on the same CRM server to host my custom website?
    Wednesday, October 14, 2015 8:54 AM
  • i have tried this already but still got same error.
    Wednesday, October 14, 2015 8:54 AM
  • which part of this is not supported? the website is built using the sdk to communicate with CRM. would it be supported if i created another website on the same CRM server to host my custom website?

    Publication through Visual Directory is unsupported. Publication through separated website is supported.

    Dynamics CRM MVP
    My blog

    Wednesday, October 14, 2015 9:09 AM
    Moderator
  • Ok Agreed.

    Now I created a separate website with separate application pool.

    Do you have any link I can follow as I am getting another error and cannot find any help.

    The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.

    Thanks

    Wednesday, October 14, 2015 9:38 AM
  • Created a separate website on IIS running CRM and followed this post to solve my error.

    https://consultrikin.wordpress.com/tag/organizationrequest/

    • Marked as answer by Robert Cassar Friday, October 23, 2015 10:02 AM
    Friday, October 23, 2015 10:02 AM