question

peterliles-4155 avatar image
0 Votes"
peterliles-4155 asked AgaveJoe commented

Return to previous page with sitemap

I currently have the following nodes in my sitemap file

siteMapNode title="Account" url="~/MyProject\Seller\Sellor_Account.aspx" roles="Seller"

         siteMapNode title="Inbox" url="~/MyProject\Messaging\Inbox_User.aspx " 


I now want to add additional node that also links to Inbox_User.aspx file. But i am unable to because the return link when clicked returns to Seller_Account.aspx page instead of back to records2.aspx file?

  siteMapNode title="Account" url="~/Market\records2.aspx"  roles="Services" 
dotnet-aspnet-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @peterliles-4155 ,
How do you write your codes? The title of the sitemapnodes is same in your codes.
Best regards,
Yijing Sun

0 Votes 0 ·
peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered YijingSun-MSFT commented

It is the urls that must be unique. The titles do not matter unless under same hierarchy and get confused.
I cannot link to same node address from two different file directories. When i add the new node url records2 and then link to Inbox_User page it still returns to sellor_account page instead of records2 page?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @peterliles-4155 ,
I still don't understand what's your meanings. You have two sitemapnodes which url are Sellor_Account.aspx and records2.aspx. And then in the two page, you redirect to the Inbox_User.aspx. Finally, you want to return the previous page. Right?
Best regards,
Yijing Sun

0 Votes 0 ·
peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered YijingSun-MSFT commented

When i link to Inbox_User page from either of the other two pages that reside in different directories when i click the return URL node on the sitemap it always links to the Sellor_Account page even though i visited from records2.
I am working on a solution that involves a handler to replace the URL address that i came across. It proved messy, as i have child pages and had to store location in session state for reference. I do not recommend this approach as it has proven unreliable. sometimes the handler does not fire and jumping into and out of session creates errors. I have come up with a alternative plan that i am trying to implement though. Hopefully it will prove a success.
If you still know of a fix, i would be grateful to know.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @peterliles-4155 ,
I think everything have reasons. Could you post your codes to us? Maybe more experts will find your errors.
Best regards,
Yijing Sun

0 Votes 0 ·
AgaveJoe avatar image
0 Votes"
AgaveJoe answered AgaveJoe edited

Please review your code. The URLs use a forward slash "/" not "\".

The sitemap nodes you shared has an associated role. I have to assume you've setup role based security. It seems logical that if the resulting HTML link points to "Sellor_Account.aspx" then the user is in the seller roll.

Please read the sitemap reference documentation to make sure you understand sitemaps with role security.

ASP.NET Site-Map Security Trimming
Securing ASP.NET Site Navigation

When i link to Inbox_User page from either of the other two pages that reside in different directories when i click the return URL node on the sitemap it always links to the Sellor_Account page even though i visited from records2.

What is a return URL node? Is this custom code that you wrote?





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered AgaveJoe edited

my records2 page resides inside root based Market folder whereas Seller_Account page resides inside sub Myproject/Market folder and Inbox_User resides inside sub MyProject/Membership folder.
Does that clarify

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You are not helping us to help you. Are you using role based security and have you properly configured the site map to take advantage of roles? Please see the Securing ASP.NET Site Navigation in my previous post for details. Also, clarify how your security works.

You've made a few references to items such as "previous page" and "return URL". What are the steps to access the "previous page"? What is the "return URL" and how is the "return URL" populated on the page?


0 Votes 0 ·
peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered

i have added the roles property to the sitemapnodes as referred to in previous comments, though they don't make a difference either?
To solve the issue i was using the url referrer but i had to store in memory when traverse other pages so now i use the roles instead. That finally did the trick!
The return url has you mention is the original source page.
I must add that i did come across a explanation long ago about limitations with dynamic pages! i guess this is the problem as two individual pages try to access the same page.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered YijingSun-MSFT commented

What ever happen'd to the website configuration tool available in developer to manage access rules?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @peterliles-4155 ,

What ever happen'd to the website configuration tool available in developer to manage access rules?

What's the website configuration tool you said? Could you tell us what happened to you?

Best regards,
Yijing Sun

0 Votes 0 ·
peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered AgaveJoe commented

That administration tool for membership configuration where you can set up both users and roles using a user interface instead of programmatical.
I often find reference to it on the internet yet it appears unavailable on current V.S.D edition?
time is precious!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The ASP.NET Web site administration tool for membership configuration was removed form Visual Studio a long time ago. If you have .NET 4 installed then you can still run/host the web application and use it to configure your web application.

https://stackoverflow.com/questions/32194465/where-is-web-site-administration-on-visual-studio-2015
http://blog.regencysoftware.com/post/2014/06/22/asp-net-web-site-administration-tool-visual-studio-2013

I recommend writing a SQL script or stored procedure. The code is very basic. Also, creating a web page to assign roles to a user should only take an hour or two.

1 Vote 1 ·