[THIN] Re: Hide Web interface Apps

  • From: Warren Simondson <caditc@xxxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Mon, 26 Oct 2009 13:24:55 +1100

Hi Jim, there's 2 approaches to this: 

1. using two WI sites with the same URL as to not confuse the end user. Both WI 
configs are on 
the same server and point to the same farm, but one is internal and one is 
external. The 
external one has the modifed code in it for HIDEAPPS and the internal site is 
stock standard. 
You would then put an default.asp file at the wwwroot of your IIS server that 
detects if a user is 
coming from internal or external, and then automatically redirect them your 
Xenapp WI site 
based on their location. Here is some code I use to achieve this. I've been 
using this codesince 
early nfuse days. Just copy and paste the code in a blank default.asp file and 
modify your LAN 
IP address as indicated. Then ensure the IIS default is pointing at this 
location and not directly 
to the WI site. So there's no need to change the URL for the end user and it's 
simple to create 
another WI site.

<%
myLANip = "192" //your internal ip address start
myLOCALip = "127" 
usrip = "127.0.0.1"
if Request.ServerVariables("HTTP_X_FORWARDED_FOR") = null then
        response.write("Cannot retrieve IP address of client")
else

        usrip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
        if usrip = "" then
                usrip = Request.ServerVariables("REMOTE_ADDR")
        end if
end if

ipsubnet = left(usrip,3)
if ((StrComp(ipsubnet,myLANip,1) = 0) or (StrComp(ipsubnet,myLOCALip,1) = 0)) 
then  
        response.write("This is an internal address ... redirecting to Xenapp 
internal site")
        response.redirect "http://mysite/citrix/xenapp1/";

else
        response.write("This is an external address ... redirecting to Xenapp 
external site")
        response.redirect "http://mysite/citrix/xenapp2/";
        //convert this code to c# and put hideapps code here as downloaded from 
http://www.ThomasKoetzing.de

end if
%>


2. The second approach is to use 1 WI site and use the HIDEAPPS code as 
described in the 
download at http://www.ThomasKoetzing.de but then converting my code above to 
c# (very easy 
in this case) and wrapping inserting the hideapps example where I indicate in 
my example. This 
works on all WI versions up to 5.1 but 5.2 has changed the code strcuture a bit 
so some 
modification needs to be done (but not much). By do this the HIDEAPPS feture 
will only operate 
when a client comes in from an external site, otherwise the site operates as 
normal.


-- 
Warren Simondson

Ctrl-Alt-Del IT Consultancy Pty Ltd

Website: http://www.ctrl-alt-del.com.au








On Mon, Oct 26th, 2009 at 2:30 AM, Jim Cannon <Mach1-70@xxxxxxxxx> wrote:

> I know this has been asked already from searches but want to see if
> there
> are any new perspectives I have not found..We have one 4.5 Web
> Interface
> site that hosts internal and external users.We now have a need to
> hide a
> published app from the applist for external users only..Two Web
> Interface
> sites (one internal and one external)  would be a huge undertaking
> as
> everyone has the existing URL and the hide apps mod appears to hide
> the app
> from Web Interface entirely with no regard to internal or
> external...Any
> ideas? 
> 
> 

************************************************
For Archives, RSS, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
//www.freelists.org/list/thin
Follow ThinList on Twitter
http://twitter.com/thinlist
Thin List discussion is now available in blog format at:
http://thinmaillist.blogspot.com
Thinlist MOBILE Feed
http://thinlist.net/mobile
************************************************

Other related posts: