Q:

Content Delivery Link Resolution issue in multilingual website setup on Asp.Net platform

I followed the Steps as outlined here:http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Reference%20Implementation-v1/GUID-7D334E4E-72F7-4AAA-B541-7A845E15C88C and few other document as well to setup the Mutilingual websites. We used / as our Publication URL ( don't know why ) and then appropriate settings in cd_link_conf.xml were made for each of our 37 websites.
As of now there are 37 such websites each configured in its own locale specific folder within a same website name: http://exampledomain.com , [ I have replaced the actual name with "exampledomain"].
The problem we are facing is that the Dynamic link resolution doesn't works correctly. Sometimes it is able to resolve the links and sometimes not. For example: for our Italy locale, Below are the 2 links that is resolved for our article page:
1.) exampledomain.com/it/news/article.aspx
2.) exampledomain.com/news/article.aspx [ Locale "it" is MISSING ]
I don't understand why sometimes the locale value "it" is missing from URLs while at other ocassions the locale is there and Linking works perfectly.
Moreover this is happening for many other locales as well.We have rechecked the Tridion config files but couldn't found any clue. 
Please let us know what I should try next ? What is the role of cd_dynamic_conf.xml here as mentioned in the URL above ?

A:

Dynamic Link Resolution makes use of cd_link_conf.xml for resolving URLs to Pages if configured for any Publications. The cd_dynamic_conf.xml  is used for the SiteEdit/Experience Manager thing and probably is NOT related to your issue here.
I suspect the configuration files are missing entries for the Publications for which Link resolution is having the intermittent issue.
All of these 37 locales must have a cd_link_conf.xml in their respctive /bin/config  folder. Each of the config file now must have an entry for all 37 Publications. 
Usually websites configured the way you mentioned all belong to same Application Pool.
So, if at least one Multilingual Website is missing entries in the config file, and when this file gets loaded into the Application Pool, the Tridion's Dynamic Link Resolver will read entries incorrectly and will be able to resolve Links only for the available entries. Therefore in this case Links doesn't gets resolved for missing entries.
On an another occasion, if a config file with all 37 entries gets loaded into Application pool, the Dynamic Link Resolver will read entries for all 37 locales and thus will resolve links correctly this time.
So suggestion is to check all 37 locales cd_link_conf.xml file and see if any one is missing entry for any Publication.

As a side note, to ease your Search, After opening the Config file in Notepad++, Do Ctrl+F, and in Find What type: <Publication Id=".*"> as seen below. Also select the Regular Expression search mode. Click the  "Find All In Current Document" button on Right side. This will directly show the Count. It must be 37
 

