Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

UltiDev Cassini with Apache as main server
^^Johnny5
#1 Posted : Sunday, November 25, 2007 9:10:42 PM(UTC)
Groups: Member
Joined: 11/25/2007(UTC)
Posts: 1

Hi,
I have installed and tried a few apps. Works better than I thought. Is there a way to route all external traffic silently to all Apps:ports.
This way I could do one proxy pass in Apache to route to All applications sitting locally.

Example:

Locally ->
http://localhost:8089/MyApp1
http://localhost:8089/MyApp2

Cassini registration ->
MyApp1 :
http://localhost:5449
MyApp2 :
http://localhost:5448

Proxy'd UDCassini to a localhost:port with Apache
MyApp1 :
http://MyWebServer:80/UDCassini/MyApp1
MyApp2 :
http://MyWebServer:80/UDCassini/MyApp2

To some degree this works. Only problem is that relative links don't.

How can I solve this problem? Can you help?

This is what I have done so far in Apache...

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyPass /UDC http://127.0.0.1:7756
ProxyPassReverse /UDC http://127.0.0.1:7756
Ultidev Team
#2 Posted : Monday, November 26, 2007 4:58:46 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Johnny,

could you please outline the use-case for us - we may be able to come up with alternatives for how to create the setup you need. The information we are looking for is this: do you plan to make your applications available on the Internet, on the LAN, or only locally on the same machine. This is basically to understand why you need to keep all the applications on the same port.

Another thing you've mentioned is that relative links don't work in your setup. That is something unexpected as long as your browser shows http://localhost:8089/MyAppX/ as the base of the URL, then browser should use that base for building actual URLs from the relative links. If you click such an incorrect link, where does the browser try to go?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
pcstiby
#3 Posted : Tuesday, January 15, 2008 10:43:18 PM(UTC)
Groups: Member
Joined: 1/15/2008(UTC)
Posts: 3

I am having a similar issue with apache proxypass and the web application WebGuide 4.1 which makes use of UltiDev Cassini (I am posting this on both forum's in a hope of getting a resolution).

My use case: I am running the webguide application on my media cente PC on my lan, I wish to make use of the Wake On Lan feature on the PC so other PC's and the XBox 360 can access the media content and media centre interface. I don't want to open a port on my router direct to the media centre which port sniffers and other rouge traffic will cause the media centre to keep waking up. Therefore to get access to WebGuide and other internal applications I use Apache and the ProxyPass directive to provide a public URL to my always on server which can then service requests to the media centre only when a valid and authenticated HTTP request is made.

My diagnoses at present:

If I access locally http://XXX.XXX.XXX.XXX:YYYY/ the browser is redirected to http://XXX.XXX.XXX.XXX:YYYY/login.aspx?ReturnUrl=/default.aspx

If I access remotely http://domainname/guide/ the browser returns 404 error

If I access the login form directly http://domainname/guide/login.aspx I get the login and once I login correctly I get 404 Error

Once authenticated I can then use http://domainname/guide/ which works fine?

My current work around which I have yet to try is to change form based authentication to basic, which I will comment on later.
pcstiby
#4 Posted : Tuesday, January 15, 2008 10:59:05 PM(UTC)
Groups: Member
Joined: 1/15/2008(UTC)
Posts: 3

Using telnet I perform a quick URL request via my domain I get this response
===
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Wed, 16 Jan 2008 08:53:14 GMT
Content-Type: text/html; charset=utf-8
Cache-Control: private
Server: UltiDev Cassini/2.1.4.3
X-AspNet-Version: 2.0.50727
Via: 1.1 mydomain.com (Apache/2.0.52), 1.1 mvo-netcache-02 (NetCache NetApp/6
.0.5)

===

directly to the PC I get

===
HTTP/1.1 200 OK
Server: UltiDev Cassini/2.1.4.3
Date: Wed, 16 Jan 2008 08:54:55 GMT
X-AspNet-Version: 2.0.50727
Transfer-Encoding: chunked
Cache-Control: private
Content-Type: text/html; charset=utf-8
Connection: Close

0
===
pcstiby
#5 Posted : Tuesday, January 15, 2008 11:18:14 PM(UTC)
Groups: Member
Joined: 1/15/2008(UTC)
Posts: 3

Appologies one additional note:

If I use ProxyReverse I can not access the WebGuide application default page using http://mydomain/guide/ but if I remove the ProxyReverse I can access the WebGuide application default page using http://mydomain/guide/ but this is only when I have an authenticated session.

I would like to note that once authenticated and accessing http://mydomain/guide there is no redirection as I assume the server just processes the default document without redirecting the page.

Therefore my work around is to use basic authentication to get around the form based issues, is there an option to change your webservers handling of redirections such as using the HTTP location directive?

Ultidev Team
#6 Posted : Wednesday, January 16, 2008 6:59:07 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

The problem is likely caused by the fact that WG4 is sure it is in the root of the web site http://address:port/, but when you add proxy in the mix, you effectively change the location to the subfolder: http://externaldomain/guide/. WG4, as other .NET applications, may generate URLs using '~/' prefix, because some reusable components on the page (like login control) may be placed on pages with different nesting level, so login control cannot use relative URL for redirection and has to use application-root-based URLs. If that's the case, then it is very possible that when you hit http://mydomain.com/guide/, WG4, thinking it's in the web site root, generates redirect URL like this: /default.apx, which resolves as http://mydomain.com/default.aspx instead of http://mydomain.com/guide/default.aspx.

To verify this theory you may want to install Fiddler http tracer on the client machine and see which URLs are being requested when 404 start to crop in.

If this theory is right, there are a couple of possible workarounds.
1. Instead of using port 80 and /Guide subfolder, configure your proxy to use the same port as the application itself so that the final root URL looks like http://mydomain.com:YYYY/ instead of http://mydomain.com/Guide/.
2. Try (results are not guaranteed) to register WG4 with UltiDev Cassini so that all the WG4 files are in the /Guide subfolder. For example, place all WG4 files in the c:\WG4\Guide folder, then create dummy web.config in the c:\WG4 folder, and register the WG4 application with UltiDev Cassini using physical folder c:\WG4 and default document being Guide/default.aspx. If this works, then both local and external URLs will have the same structure http://host/Guide/...

Please let us know if this has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#7 Posted : Tuesday, September 18, 2018 9:37:12 PM(UTC)
Groups:

Message was deleted by a Moderator.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.