We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Need Help for setup rulesRSS

14 replies

Last post Jan 13, 2011 02:06 PM by wonyoo

  • Need Help for setup rules

    Jun 16, 2009 05:25 AM|Coroebus|LINK

    Hello,

    I'm trying to publish Owa and MSCRM 4 with ARR.

    OWA is exposed on port 80 and MSCRM on port 5555 on the same machine

    from the ARR server I can use Owa with this URL : http://10.0.0.3/OWA

    and MSCRM http://10.0.0.3:5555

    Can you tel me what rules i have to create to publish them ?

     Thanks a lot

    Excuse me for my froggy english !
  • Re: Need Help for setup rules

    Jun 16, 2009 09:11 AM|ganeshanekar|LINK

    Not sure. Sorry.

    ~ Ganesh

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: Need Help for setup rules

    Jun 16, 2009 10:46 AM|wonyoo|LINK

    I would need to know a few more details.

    1) Is OWA and MSCRM 4 running on the same machine?

    2) What ports are they running on (80 and 5555)?   Are they all via clear text?  No SSL?

    3) How many such machines do you have?

    4) Are you trying to deploy an ARR in front of such machines for load balancing purposes?

    5) What ports do you want to expose OWA and MSCRM 4 on ARR?

     

    ARR Application Request Routing

  • Re: Need Help for setup rules

    Jun 16, 2009 11:56 AM|Coroebus|LINK

    Hello,

    thank you for your help.

    1) Is OWA and MSCRM 4 running on the same machine?
    Yes, and they works fine

    2) What ports are they running on (80 and 5555)?   Are they all via clear text?  No SSL?

    CRM : http://10.0.0.3:5555 port 5555
    OWA : http://10.0.0.3/owa port 80
    SSL is configured but not used

    3) How many such machines do you have?

    only 1

    4) Are you trying to deploy an ARR in front of such machines for load balancing purposes?

    no, only for NAT purposes, it is a virtual machine with NAT and I only want to expose web ports

    5) What ports do you want to expose OWA and MSCRM 4 on ARR?

    only 80 and 443, i want to acces it by http://corp.mydomain.com/crm and http://corp.mydomain.com/owa

    Thank you for your help

     

    Excuse me for my froggy english !
  • Re: Need Help for setup rules

    Jun 18, 2009 12:52 PM|wonyoo|LINK

    Here is what I would recommend as a start.  Although you do not have to use a server farm in this case (as you are not using it as a load balancing scenario), I would still recommend using the server farm as using ARR in the context of server farm provides additional features, such as health monitoring, run time statistics, etc.

    I would create two farms - your config would look something like:

        <webFarms>
            <webFarm name="OWAFarm" enabled="true">
                <server address="10.0.0.3" enabled="true" />
            </webFarm>
            <webFarm name="CRMFarm" enabled="true">
                <server address="10.0.0.3" enabled="true">
                    <applicationRequestRouting httpPort="5555" />
                </server>
            </webFarm>
            <applicationRequestRouting>
                <hostAffinityProviderList>
                    <add name="Microsoft.Web.Arr.HostNameRoundRobin" />
                    <add name="Microsoft.Web.Arr.HostNameMemory" />
                </hostAffinityProviderList>
            </applicationRequestRouting>
        </webFarms>

    Basically, what you have there is a farm for OWA and another farm for CRM.  The main difference is the HTTP port.  (80 is default for HTTP so you do not need to specify it for the OWA case.)

    Then, I would write the URL rewrite rules that look something like:

            <rewrite>
                <globalRules>
                    <rule name="ARR_OWAFarm_loadbalance" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="owa*" />
                        <action type="Rewrite" url="http://OWAFarm/{R:0}" />
                    </rule>
                    <rule name="ARR_CRMFarm_loadbalance" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="crm*" />
                        <action type="Rewrite" url="http://CRMFarm/{R:1}" />
                    </rule>
                </globalRules>
            </rewrite>

    What you are doing there is the following:

    • <div mce_keep="true">If the URL looks like http://corp.mydomain.com/owa, then route it to OWA farm.  (Note that it is reference 0 - meaning it forwards everything starting /owa.... - this is okay, since your OWA on 10.0.0.3 is also expects /owa...</div>
    • <div mce_keep="true">If the URL looks like http://corp.mydomain.com/crm, then route it to CRM farm.  (Note that it is reference 1 - meaning it forwards everything after /crm... - this is necessary since your CRM is running on the root of the server (ie. It does not expect /crm/someurl.  It expects /someurl).</div>

    As a precautionary measure, you may also want to add the following rule to block everything else.

                    <rule name="No match" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*" />
                        <action type="CustomResponse" statusCode="400" subStatusCode="0" statusReason="" statusDescription="" />
                    </rule>

    That is to say that, if the URL does not look like either http://corp.mydomain.com/owa or http://corp.mydomain.com/crm, then respond 400.

    Finally, because you are rewriting the URL for your CRM app (ie. the client sends /crm/someurl but your server receives /someurl), it may or may not work correctly depending on whether your crm application uses relative path everywhere.  It it uses an absolute path somewhere to reference a resource on the machine, then it may not work correctly.  For your OWA, it should work fine.

    ARR Application Request Routing

  • Re: Need Help for setup rules

    Jun 25, 2009 04:03 PM|mihoge|LINK

    Using the information posted by wonyoo I was able to setup a reverse proxy using a server farm and a rewrite rule routing to this server farm. My problem is while the main URL works, https://host.domain.com:7004/directory1, when I click on a link for https://host.domain.com:7004/directory2 I get a page not found message because the URL still has directory1 in the path. Right now my pattern is just "*" and if i change it seemingly anything else, even the working main page then breaks with the same page not found message. Any help would be appreciated.

    ARR Reverse proxy URLRewrite

  • Re: Need Help for setup rules

    Jun 25, 2009 04:21 PM|wonyoo|LINK

    Could you provide more info on where you are getting the /directory2/ path?  Is that embedded in the entity body of the response?  I am little bit puzzled as to where you might be getting that info.  Also, could you provide the URL rewrite rules and the scenarios that you are trying to enable.

    ARR application Request Routing reverse proxy

  • Re: Need Help for setup rules

    Jun 25, 2009 04:51 PM|mihoge|LINK

    Thanks for the fast reply! The /directory2/ is coming from a link on a page in /directory1/ both directories are on the server farm member, not the proxy. The rewrite rule is configured in the GUI as follows:

    Name: ARR_title_loadbalance

    Requested URL: Matches the pattern

    Using: Wildcards

    Pattern *

    Ignoring case

    no conditions

    action type: route to server farm

    https://FarmName/{R:0}

    Stop processing of subsequent rules

    Scenario is AAR server is making an internal web application, the RSA Two-Factor self service console, available to the Internet. Internal server has a weblogic site running on HTTPS port 7004. I've created the server farm server specifying the https port to be 7004.  I have not created any web.config file on the ARR server in the default directory. I don't this this matters in this case, but there are SSL certificates on the RSA server that I've imported into the ARR server. Failed request traces currently show a 302 error, but I know the path is invalid, but I'm unable to determine how to make toe URL dynamic after the port is specified. I need to be able to be on https://host.domain.com/directory1/ and click a link to get to https://host.domain.com/directory2/sub/blah/blah but right now, clicking that link give me https://host.domain.com/directory1/sub/blah/blah

  • Re: Need Help for setup rules

    Jun 25, 2009 08:57 PM|wonyoo|LINK

    Because your rule is matching everything (Pattern *), neither the URL rewrite or the ARR is manipulating the path (ie. It is not rewriting /directory2/ to /directory1/).   I suspect that the 302 is actually coming from the content server.

    If you bypass ARR and entered https://host.domain.com/directory2/sub/blah/blah directly on the content server, does it redirect you to https://host.domain.com/directory1/sub/blah/blah?

     

  • Re: Need Help for setup rules

    Jun 29, 2009 11:09 AM|mihoge|LINK

    No, if I enter https://host.domain.com/directory2/sub/blah/blah directly on the content server it does bring up the proper page, however there is a invalid certificate warning. While on the content server I did notice that on the main page (https://host.domain.com:7004/directory1/) when I hover over the link that fails, the URL displayed is as https://host.domain.com:7004/directory1/sub/blah, but when I click it the actual URL in the address bar becomes https://host.domain.com:7004/directory2/sub/blah. It seems the content server is flipping the URL from directory1 to directory2, but the ARR server doesn't know about the swap. If it's at all helpful, there is a setup how-to for this application and reverse proxy using ISA, would there be useful information in there that might translate into ARR?

  • Re: Need Help for setup rules

    Jun 29, 2009 01:16 PM|anilr|LINK

    Please collect failed request tracing for all requests passing via ARR - this will clear up exactly what is going on - you can e-mail them to me at anil (dot) ruia (at) microsoft (dot) com

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: Need Help for setup rules

    Jun 30, 2009 10:53 AM|mihoge|LINK

     Trace logs sent.

     as another test, from the Internet  I tested typing the failing link by directly typing that url into the browser. oddly enough, the RSA security console page does come up, but there is an authentication warning stating "you need to open a new window with the correct url to login". I know this is coming from the content server and i'm wondering if the error is due to the proxy rewrite or if some cookie based authentication is getting lost.

  • Re: Need Help for setup rules

    Apr 21, 2010 08:50 PM|kendlenichols|LINK

    I would create two farms - your config would look something like:

        <webFarms>
            <webFarm name="OWAFarm" enabled="true">
                <server address="10.0.0.3" enabled="true" />
            </webFarm>
            <webFarm name="CRMFarm" enabled="true">
                <server address="10.0.0.3" enabled="true">
                    <applicationRequestRouting httpPort="5555" />
                </server>
            </webFarm>
     

    I am using ARR for the first time to perform a similar setup. Are you suggesting here that we edit the applicationHost file directly? When I add </server> on the line immediately above </webFarm> it tells me that the "Configuration file is not well-formed XML." If I remove that line, it stops complaining about the XML, but when I run: 

    %windir%\System32\inetsrv\appcmd.exe list config -section:webFarms

    It gives me an error saying Unrecognized attribute 'httpPort'

    I understand that it should also be possible to add the non-standard ports via the command prompt like this...

    %windir%\System32\inetsrv\appcmd.exe set config -section:webFarms -[name='WMSReverseProxy'].[address='192.168.1.111'].applicationRequestRouting.httpPort:15010 

     It gives me an ERROR ( Message:Cannot find requested collection element. )

    Your assitance would be greatly appreciated.

     

  • Re: Need Help for setup rules

    Jan 13, 2011 09:27 AM|sanjay kohli|LINK

     Did you find any solution for updating httpPort to non standard http port for server in Farm, i am also getting same error when running

     

    %windir%\System32\inetsrv\appcmd.exe set config -section:webFarms -[name='WMSReverseProxy'].[address='192.168.1.111'].applicationRequestRouting.httpPort:15010 

     

     

  • Re: Need Help for setup rules

    Jan 13, 2011 02:06 PM|wonyoo|LINK

    You can specify a non-http port either using the UI (it is under "advanced" when you add the server to the server farm - but you will need to expand the "advanced" link.) or script it

    appcmd.exe set config -section:webFarms /[name='a'].[address='foo'].applicationRequestRouting.httpPort:"82" /commit:apphost

    (where "a" is server farm and "foo" is the server).  Looks like you have the syntax correct - but depending on the error that you are getting from the appcmd code, you might need to play with the quote (`).

    ARR & Firefox Cookie Issue