ASPX through proxy

  • Thread starter Thread starter Habib
  • Start date Start date
H

Habib

Hi,

I have a very simple example ASPX file.

<% @Page Language="C#" debug="true" %>
<html>
<script runat = "server">
void Page_Load(Object Sender, EventArgs e)
{
Response.Write("ASPX-Example!<br>");
}
</script>
<body>
<form runat="server">
<asp:label id="nlLabel" text="Company" runat="server" />
<asp:Textbox id="txtBox" runat="server" />
</form>
</body>
</html>


If i call the site directly i.e. without proxy (http://myLocalHost/myApp) it
works fine. If i call it through proxy of company
(http://www.myCompany.com/myApp), the browser returns "HTTP 404 - File not
found".

What is here wrong.

Thanks

Habib
 
Hello Habib

With the information you provided, open your machine.config file on your web server

find the <system.net>

<system.net><defaultProxy><!--
The following entry enables reading of the per user (LAN) Internet settings
Adding additional proxy settings, without first setting to "false"
will individually override. Note that "Automatic configuration" and
"automatic configuration scripts" cannot be read
--><!-
************************************************************************
**
** Examine the <proxy> and <defaultProxy> elements to evaluate if this example fits your needs *
**
************************************************************************
--><proxy usesystemdefault="false" bypassonlocal="true"><bypasslist><add address="[a-z]+\.mycompany\.com" /><add address="192\.168\..*" /></bypasslist></defaultProxy>
 
I tried setting

usesystemdefault = "false"
bypassonlocal="true"

but it didn't work.

Jeffrey Grizzle said:
Hello Habib,

With the information you provided, open your machine.config file on your web server.

find the <system.net> :

<system.net><defaultProxy><!--
The following entry enables reading of the per user (LAN) Internet settings.
Adding additional proxy settings, without first setting to "false",
will individually override. Note that "Automatic configuration" and
"automatic configuration scripts" cannot be read.
--><!--
*************************************************************************
**
** Examine the <proxy> and <defaultProxy> elements to evaluate if this example fits your needs **
**
*************************************************************************
--><proxy usesystemdefault="false" bypassonlocal="true"><bypasslist><add
address="[a-z]+\.mycompany\.com" /><add address="192\.168\..*"
/></bypasslist></defaultProxy>
 
Hi Jeffrey,

It was a problem with the filename in redirect link in proxy
(myserver/myDir/app.aspx). After removing the file name from link it works
fine. As I it unterstand, a redirect does work only with directories, not
with file names.

Habib

Habib said:
I tried setting

usesystemdefault = "false"
bypassonlocal="true"

but it didn't work.

Jeffrey Grizzle said:
Hello Habib,

With the information you provided, open your machine.config file on your web server.

find the <system.net> :

<system.net><defaultProxy><!--
The following entry enables reading of the per user
(LAN)
Internet settings.
Adding additional proxy settings, without first setting
to
"false",
will individually override. Note that "Automatic configuration" and
"automatic configuration scripts" cannot be read.
--><!--
*************************************************************************
**
** Examine the <proxy> and <defaultProxy> elements to evaluate if this example fits your needs **
**
*************************************************************************
--><proxy usesystemdefault="false" bypassonlocal="true"><bypasslist><add
address="[a-z]+\.mycompany\.com" /><add address="192\.168\..*"
/></bypasslist></defaultProxy>
 
Back
Top