Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reverse proxy issue? Fails on 15.1.5 works on 15.0.17
#11
Look, it is failing now not because 15.1.9 does something wrong, but because UrlRewrite is not able to handle the requests correctly.

UrlRewrite is *not* a reverse proxy, although people use it as such. If you try Apache, for instance, it will work without any modification to your application transparently without rewriting anything, because Apache is actually intended to work as a reverse proxy.

Having said that, setting UrlBase and stopping UrlRerwrite to interfere with headers, addresses and content, it should work.

If it is not working I'll need to recreate *in detail* your environment, so I'll need more information than what you provided so far.

I need to know the exact rules which are active on your IIS/UrlRewrite module, to start preparing it. Later I might need more information.
Reply
#12
Alexandre,

Would it be useful to you to have PDSBILL generate output from the older version which he says works to compare the outputs?
Reply
#13
(11-27-2019, 09:19 AM)Alexandre Machado Wrote: Look, it is failing now not because 15.1.9 does something wrong, but because UrlRewrite is not able to handle the requests correctly.

UrlRewrite is *not* a reverse proxy, although people use it as such. If you try Apache, for instance, it will work without any modification to your application transparently without rewriting anything, because Apache is actually intended to work as a reverse proxy.

Having said that, setting UrlBase and stopping UrlRerwrite to interfere with headers, addresses and content, it should work.

If it is not working I'll need to recreate *in detail* your environment, so I'll need more information than what you provided so far.

I need to know the exact rules which are active on your IIS/UrlRewrite module, to start preparing it. Later I might need more information.

I have sent your response to our customer, will update when I hear back.

(11-27-2019, 01:47 PM)kudzu Wrote: Alexandre,

Would it be useful to you to have PDSBILL generate output from the older version which he says works to compare the outputs?

I am more the happy to perform any tracing that you need in both the 15.0.17 and 15.1.9 versions. ( I updated to the 15.1.9 ) Please advise what settings i need to apply in both versions and any IIS tracing that needs to be enabled.

Bill B
Reply
#14
Hi,

as I mentioned in the other thread regarding the same subject:

As promised, here is a step-by-step guide on how to use IIS and URLRewrite acting as a reverse proxy for IntraWeb applications:

http://docs.atozed.com/docs.dll/deployme...Proxy.html

As I mentioned before, there is no need to rewrite any content generated by IntraWeb. You just need to set ServerController.RewriteURL accordingly, as described on item 7 of the document above.

Please let me know if you have further questions
Reply
#15
Alexandre,

I finally got the web Config file for the rewrite rules on the reverse proxy server. I hope this will help explain why IW 15.0.17 works and IW 15.1.9 does not work.
Please let me know if there is anything else I can provide to help resolve this issue.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://10.10.250.38/{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img, Script, CustomTags" customTags="literal" pattern="^http(s)?://(v-PercontiSrv01.ci.palm-coast.fl.us|10.10.250.38)/(.*)" />
<action type="Rewrite" value="http{R:1}://cdpservices.palmcoastgov.com/{R:3}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1" logicalGrouping="MatchAny">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/xml" />
</preCondition>
</preConditions>
<customTags>
<tags name="literal" />
</customTags>
</outboundRules>
</rewrite>
<httpErrors errorMode="DetailedLocalOnly" />
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
Reply
#16
Have you read the document I posted above?
Reply
#17
(02-04-2020, 04:53 AM)Alexandre Machado Wrote: Have you read the document I posted above?
Yes,

What I posted before, was what the web.config looked like that works with 15.0.17 but fails with 15.1.9.
I was hoping it might help explain why one version works and the other does not.

We are going to setup the proxy this week exactly as shown in your example just changing the URL's and App Name.

Also there is a minor typo in your document. you are missing the ending single quote character at end of self.RewriteURL := '/MyApp;


 Similarly, in case of our ISAPI application we have:
Code:
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
  Self.RewriteURL := '/MyApp;  // this must match the URL Rewrite rule
end;

I just modified my app to go to the next page using the OnClick vs the OnAsyncClick event and it works.
I do not know if this helps, but wanted to let you know.
Reply
#18
Here is the config.web file now running on the proxy server. Also the OnConfig event code in my test app as well.
We still are getting the same error.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>

<rule name="Rewrite rule for ISAPI Intraweb application" stopProcessing="true">
<match url="^MyApp/(.*)" />
<action type="Rewrite" url="http://10.10.250.38/webppreviewer_test/ppwebreviewer.dll/{R:1}" logRewrittenUrl="true" />
</rule>

<rule name="Rewrite rule1 for SA Intraweb application" stopProcessing="true">
<match url="^Proxy/(.*)" />
<action type="Rewrite" url="http://10.10.250.38/{R:1}" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="DetailedLocalOnly" />
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
</configuration>



procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
Self.RewriteURL := '/MyApp';
end;
Reply
#19
Changing forms during an Async event requires redirection (because the URL might change between forms). Redirection certainly is affected by the way reverse proxy related stuff is organized. 

So, regarding your last sentence, yes switching from one to another might affect that. However, and I'd like to emphasize, in a correct setup both forms should just work transparently without any changes to internals of HMTL, JS and XML.

Cheers
Reply
#20
(02-04-2020, 07:50 PM)Alexandre Machado Wrote: Changing forms during an Async event requires redirection (because the URL might change between forms). Redirection certainly is affected by the way reverse proxy related stuff is organized. 

So, regarding your last sentence, yes switching from one to another might affect that. However, and I'd like to emphasize, in a correct setup both forms should just work transparently without any changes to internals of HMTL, JS and XML.

Cheers

So what to I need to do?  Did you look at the Config.web I posted? It appears to be setup correctly. 
It will take a lot of work to change all the buttons that launch a new page to use OnClick instead of OnAsyncClick.
As noted in prior email the  async event created a CData statment with the Proxy server IP address rather than a relative url.
Is there any tracing that I can enable that would help spot the issue?

Thank you
Bill B
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)