Last post Sep 05, 2019 01:05 PM by Koala Bear1
Aug 31, 2019 01:01 PM|Koala Bear1|LINK
In Azure Dev Ops Server (on premises), I have done TFS Reverse Proxy & rewritten the Response HTML to change the URL from "http://tfs.abc.com" to "http://tfs.xyz.com" using HTTPModule.
Because of this HTTPModule, I think the images are not shown. Please let me know if I have to make any changes in the HTTPModule in order to display the missing images.
public void Init(HttpApplication application)
application.BeginRequest += (new EventHandler(this.Application_BeginRequest));
private void Application_BeginRequest(Object source, EventArgs e)
HttpContext context = HttpContext.Current;
ResponseFilterStream filter = new ResponseFilterStream(context.Response.Filter);
filter.TransformString += filter_TransformString;
context.Response.Filter = filter;
private string filter_TransformString(string output)
output = output.ToString().Replace("http://tfs.abc.com", "http://tfs.xyz.com");
Sep 02, 2019 11:09 AM|PatriceSc|LINK
What if you check Response.ContentType to do that only for text/html content?
Not directly related but I always try to fix the source issue ie here rather than generating a wrong link and adding a module to fix this I would really double check if I couldn't generate the correct link right away...
Sep 02, 2019 11:31 AM|Koala Bear1|LINK
Sep 02, 2019 12:08 PM|PatriceSc|LINK
What if using F12 Network and F12 Console to see what happens for those http requests ? Do you have a 404 not found or maybe a message on the console because the content is not valid image data? Then only I try to fix the problem I found. Here you already
try to fix the problem without really nothing what is is, which is often slower.
I'm not sure if it is part of the problem but I would try to use response filtering only for HTML content (but first I would prefer to know for sure which problem I'm trying to solve).
Also I'm not sure why TFS couldn't generate the correct links right away. I usally prefer to fix the source issue rather than to have something wrong and adding code to prevent this problem to show up rather than solving why things are wrong to start with.
Sep 05, 2019 01:05 PM|Koala Bear1|LINK
The following changes in web.config solved the issue:
<!--<validation validateIntegratedModeConfiguration="false" />-->
<add name="TestModuleHttpModule" preCondition="managedHandler" type="TestModule.TestModuleHttpModule, TestModule, Version=22.214.171.124, Culture=neutral, PublicKeyToken=8404bgti71a67037"/>