This project is read-only.
2
Vote

First time connecting with 2 Browsers generates wrong links

description

When connecting parallel with 2 browser to our web-application and the ___generated folder/files have not been created yet, the headadapter generates wrong lines to the css/js files.
 
Example: http://localhost/MyApp   Correct: <script type="text/javascript" src="/MyApp/___generated/123741047102,js"> Incorrect (what we get here): <script type="text/javascript" src="/___generated/123741047102,js">   Same pattern for css files.
I couldn't reproduce it when debugging so i added some debug-logs which show that when calling "FinalUrl" on a combined file while rendering the head content through the headadapter, the processedUrl and AbsoluteUrlWithQueryAndFragment variables/properties are null so that the OriginalUrl is returned.
 
oddly enough this sometimes only happens for 1 of the 2 requests, so sometimes a refresh fixes it. but sometimes we have to reset the app pool to get this fixed.

comments

Epicycle23 wrote Aug 28, 2012 at 2:31 PM

just found the problem:

File: UrlProcessor

catch(Exception e)
        {
            // Something went wrong. 
            // Rather than crashing the page, in Release mode just return the original url.

          .... throw only in debug

            return new ProcessedUrl(url);
        }
this is causing the worng links, since both requests trying to write the files at the same time, one of them gets a "System.IO.IOException: The process cannot access the file...".

wrote Feb 13, 2013 at 11:52 PM

wrote Jul 18, 2013 at 4:06 PM