简体   繁体   中英

404 error when running custom asp.net application under CRM 2016 web directory

I am trying to get a custom web application working under CRM's web directory ie C:\\Program Files\\Microsoft Dynamics CRM\\CRMWeb\\ on a new server with CRM 2016. The same setup was working fine on a CRM 2013 server, from which we are trying to upgrade.

The path is correct because when I remove any of the DLLs from my custom app, I get correct ASP.net error about the missing DLL. But as soon as all DLLs are correct, I get a 404 error for my custom web application. 404错误

I know it's not a good news but putting WWW app in CRM Webapp directory is not supported - you can read it here :

Creating an Internet Information Services (IIS) application inside the Microsoft Dynamics 365 website for any VDir and specifically within the ISV folder is not supported. The \\ISV folder is no longer supported.

I can imagine that some httpmodule inside CRM 2016 is catching requests to your site.

Just to add to pens's comment You will need to rewrite the existing web application as standalone web application and use the CRM SDK to access crm.

https://msdn.microsoft.com/en-us/library/gg334357(v=crm.6).aspx

I had do migrate a few of these back in the CRM4 to CRM2011 days and generally it was a pretty painless experience.

The basic things to remember were:

  1. Configure the website to use windows authentication (to allow us to identify the user of the webextension)

  2. Look up the systemuser by domain name to get their system user id and then impersonate in the webapplication where necessary. ( https://msdn.microsoft.com/en-us/library/gg309629.aspx )

  3. Allow Cross Site Scripting between CRM and your web site.
    This allows you to interact with the iframes or rest services hosted by your webapplication using JavaScript from CRM

 <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="http://crmurl" /> <add name="Access-Control-Allow-Credentials" value="true" /> <add name="Access-Control-Allow-Headers" value="Origin, Authorization" /> <add name="Access-Control-Allow-Methods" value="POST, GET, OPTIONS" /> <add name="Access-Control-Expose-Headers" value="WWW-Authenticate" /> </customHeaders> </httpProtocol> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM