Monday, 9 September 2013

ASP.NET - Lost access to stylesheet and JS after doing SVN update to previous revision

ASP.NET - Lost access to stylesheet and JS after doing SVN update to
previous revision

I am having the strangest behaviour. I recently did a SVN update to an
older revision so I could debug something and I lost access to my main
stylesheet which is located in a styles folder eg:
<link href="/styles/main.css" rel="stylesheet" type="text/css" />
However I can still access (which is located in the same directory):
<link href="/styles/jquery-ui-1.9.2.custom.css" rel="stylesheet"
type="text/css" />
I also found that I could access all of my javascript files located at:
/scripts/<my javascript files>
until I did a second update to a previous revision, and now I cant access
/scripts/jquery-1.9.0.js
but I can still access the other scripts in the same directory!! By not
being able to access them I mean that I get redirected to the log in.
ASP.NET Membership seems to be looking for authorisation to access these
files. ie
http://localhost/Account/Login.aspx?ReturnUrl=%2fstyles%2fmain.css
I am using RBA but not in these directories. My page source looks like this:
<link href="/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/styles/jquery-ui-1.9.2.custom.css" rel="stylesheet"
type="text/css" />
<script src="/scripts/jquery-1.9.0.js"></script>
<script src="/scripts/jquery-ui-1.9.2.custom.min.js"></script>
<script src="/scripts/spin.js"></script>
<script src="/scripts/js.js"></script>
and I find it strange that its only the first css and js file that are
being blocked.
Just to reiterate, this has worked fine until I did the SVN Update To
Revision. Updating to Head revision afterwards does not fix the problem.
Furthermore I have this application deployed and it works fine.
Explicitly setting access in the web.config does nothing....
<location path="styles/main.css">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
If someone has an idea I would be most grateful. Thanks.

No comments:

Post a Comment