Hello all!  I am having trouble deploying an Ajax.NET application
behind a proxy server.  The problem is that the proxy server has rules
that essentially appends information to the URL.  For example, the
application is installed in a virtual directory with the URL being:

http://server.com/virtualdir/default.aspx

The proxy rule exposes the site as:

http://server.com/addedbyproxy/virtualdir/default.aspx

where "addedbyproxy" is appended to the beginning of the virtual root.

So inside the application the root is "/virtualdir" but to the internet
it appears as "/addedbyproxy/virtualdir".  Therefore all paths to
resources (images, files, etc.) sent to the client must either be
relative or if absolute, must include "/addedbyproxy/virtualdir".  So I
think the problem with Ajax is that
Utility.RegisterRegisterTypeForAjax() writes out the path to the ashx
as:

<script type="text/javascript" src="/virtualdir/ajax/MyAjaxType,
AssemblyName.ashx"></script>

The client does not find the js since it needs to go to:

<script type="text/javascript"
src="/addedbyproxy/virtualdir/ajax/MyAjaxType,
AssemblyName.ashx"></script>

I have assumed this because I cannot browse to
"/virtualdir/ajax/MyAjaxType, AssemblyName.ashx".  But when I browse to
"/addedbyproxy/virtualdir/ajax/MyAjaxType, AssemblyName.ashx" I get the
js code. I looked at the source code and
Utility.RegisterRegisterTypeForAjax() writes the virtual root in the
src path using
"System.Web.HttpContext.Current.Request.ApplicationPath".

If anyone has a workaround it would be appreciated.  Or Michael, if
there is any alternative please let me know (perhaps a overload of
Utility.RegisterRegisterTypeForAjax() that writes a relative path or
accepts a path as an  argument).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to