SiteMap and Menu behavior on website using host header

G

Guest

I have a site that uses a combination of Web.Sitemap and a SqlSiteMapProvider
that I created (thanks to Jeff Proisse @ MSDN). One node of the Web.Sitemap
is the same as the root node from the SqlSiteMap. Each SiteMapProvider
sources a separate menu. I use this configuration because it allows me to
control static display depth on the menus separately. This worked fine on my
local development machine, but when I moved the site to a development server,
and that site was configured to use a host header, the behavior changed.
It's almost as though the "link" between the node in Web.Sitemap and the root
node in SqlSiteMap is broken.

I can easily reproduce this using a sample site, running under both the
default web site and a host header-site. Code, including the Sql database,
can be downloaded from ftp.seratec-inc.com, login as
(e-mail address removed), and download SqlSiteMap.zip.
 
S

Steven Cheng[MSFT]

Hi Ken,

Thank you for posting.

As for the SiteMapProvider issue you mentioned, I think it is a environment
specific issue, however, not exactly caused by the host header. I've
downloaded the repro application from that FTP site and test in a local IIS
site which is configured to use hostheader. However, it works correctly on
myside. The links on both menus (HOME and SQL Links) work correctly.
What's the expected problem behavior or what does the problem link path
look like? Anyway, I think there may exists something else that cause the
problem.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

Thanks for responding, Steven.

Here's what I expect to happen:
On the Home page, one menu is displayed, showing Home and SQL Links. When
on the SQL Links page, the second menu should be displayed, showing links
under two groups, Search and News. I believe this works because
StartFromCurrentNode=True, and the root node from the SqlSiteMap matches the
page node from Web.Sitemap.

When using a site with a host header, the second menu with Search and News
does not display on the SQL Links page (in my environment). Is this true in
your environment?

I partly suspect my implementation of FindSiteMapNode(), but my debugging
does not necessarily bear that out. Now that you know what I am expecting
specifically, I am interested in what you experience.
 
S

Steven Cheng[MSFT]

Hi Ken,

Yes, I did follow the steps you mentioned, and both the two menus display
correctly. And I can correctly access the menu item under the SQLSiteMap
provider's menu. So I don't think the problem is specific to host header
site.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

Steven-

Are you saying that you created a host header for the default website? If
so, I find that does work; however, I have created a new, non-default
website, and used a host header to direct traffic there. When I do that, I
get the unintended behavior. I used a completely fresh install of Win2k3SP1
w/ all updates and loaded my test site and get the exact same behaviors. I
am not ruling out your suggestion that it is environmental, but I'm not sure
where to go.

Thanks.
 
S

Steven Cheng[MSFT]

Thanks for your response Ken,

Actually my test site isn't the default site on the server. I also created
a new IIS site which is configured to use the host header(changed the host
file on the machine). Also, the host header is mapped to the server's local
intranet ip while the default site use 127.0.0.1

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

Steven-

I have found the source of my problem, and it is indeed my implementation of
the FindSiteMapNode() method. For whatever reason during my testing, when
creating a site within the default web site, I used a virtual directory, but
when creating a site within a new site (using host headers) I *never* used a
virtual directory. Turns out, my code was misbehaving when the virtualpath =
"/".

I thank you for your time, especially since it was your last post that made
me realize my problem.
 
S

Steven Cheng[MSFT]

Thanks for your response Ken,

Glad that you've figured out the problem. Also, if you meet any further
problem or anything we can help, please feel free to post here.

Have a good day!

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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,780
Messages
2,569,611
Members
45,266
Latest member
DavidaAlla

Latest Threads

Top