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));
}
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...
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.
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.
None
0 Points
6 Posts
Images are not showing up in the Azure Dev Ops Server (on premises) after doing TFS Reverse Proxy...
Aug 31, 2019 01:01 PM|Koala Bear1|LINK
Hi,
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");
return output;
}
All-Star
48490 Points
18068 Posts
Re: Images are not showing up in the Azure Dev Ops Server (on premises) after doing TFS Reverse P...
Sep 02, 2019 11:09 AM|PatriceSc|LINK
Hi,
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...
None
0 Points
6 Posts
Re: Images are not showing up in the Azure Dev Ops Server (on premises) after doing TFS Reverse P...
Sep 02, 2019 11:31 AM|Koala Bear1|LINK
Hi Patrice,
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.
All-Star
48490 Points
18068 Posts
Re: Images are not showing up in the Azure Dev Ops Server (on premises) after doing TFS Reverse P...
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.
None
0 Points
6 Posts
Re: Images are not showing up in the Azure Dev Ops Server (on premises) after doing TFS Reverse P...
Sep 05, 2019 01:05 PM|Koala Bear1|LINK
The following changes in web.config solved the issue:
<!--<validation validateIntegratedModeConfiguration="false" />-->
<modules runAllManagedModulesForAllRequests="false">
<add name="TestModuleHttpModule" preCondition="managedHandler" type="TestModule.TestModuleHttpModule, TestModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8404bgti71a67037"/>
</modules>