Redirection problem with dyndns.org, IIS 6.0 and ASP.NET

M

mwfolz

Hello!

For testing reasons, I am hosting an ASP.NET 2.0 based website on my
local MS Windows Server 2003. Let's say, the application name would be
"foo", so I am publishing the site with VS2005 to my local address:

http://servername/foo

Locally, everything works fine (of couse ;-). The application is
defined in IIS6.0, the SQL Server is up and running and so on.

For testing that web in better context, I set up a dyndns.org acount
for that server. Again, that would be:

http://foo.dyndns.org

When I do access my site via the address http://foo.dyndns.org/foo,
still everything works out fine. But for some cross-site issues and for
field tests I wanted to use a "real" domain name. So I set up a
redirection from http://foo.com to http://foo.dyndns.org/foo by means
of my ISP.

When I now do access the site using http://foo.com, it is perfectly
redirected to http://foo.dyndns.org and I do see the requested page.
But - and this is the problem - all URIs generated by the ASP.NET
engine have the application name inserted after the hostname. In other
words, ASP.NET resolves the link ~/secure/login.aspx to
http://foo.com/foo/secure/login.aspx instead of
http://foo.com/secure/login.aspx.

Strangely enough, this does not seem to be true for all kind of links
generated by ASP.NET. Some are resolved ok, some are broken. In detail:

- Links stated with <asp:HyperLink> are resolved ok (without "/foo"
inserted)
- URLs in <asp:Image> are resolved ok
- Sitemap controls are *not* ok ("/foo" inserted in link address,
~/default.aspx becomes http://foo.com/foo/default.aspx instead of
http://foo.com/default.aspx)
- Method ResolveClientUrl() is *not* ok
- Redirections from web.config are *not* ok (redirect to
http://foo.com/foo/...)

Actually, I really don't understand what I'm getting wrong. Especially
the inconsitant behaviour of the different ASP.NET controls really
leaves me irritated. Any help is appreciated.

Thanks in advance.
Michael W. Folz.

(Crossposted to microsoft.public.interserver.iis)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top