I have a problem with sitemap localization. Whole app is localized properly but sitemap is not.
I would like to get any error information or know where to put breakpoint to know what is wrong.
I've been using this guide
E:
I forgot to mention that I'm using Kendo MVC Sitemap
Unfortunately it seems that localization of kendo sitemap is not possible at all, and you have to make separate sitemaps for each language ...
Related
In my asp.net forms website, I would like to remove site.mobile.master from my website. I would like to use just site.master. Is this possible? I used the default settings to build the site. I don't have the skills to make a website with a login without using the default asp forms web build. This, unfortunately, makes a mobile.master and a view switcher. I want neither. Thank you for looking at this.
Yes, this is possible. Get rid of ViewSwitcher.ascx and Site.Mobile.Master from your default ASP.NET project - they are neither needed (1) nor desired (2):
(1) You only need Bootstrap to make your site responsive.
(2) These files employ user agent sniffing which is totally unreliable these days.
Once you have this done and your site compiling without them, study up on Bootstrap and integrate the Bootstrap assets into your ASP.NET project assets to get everything working. In the more up-to-date templates, Bootstrap is already being used - have you checked?
I would start reading the Bootstrap documentation.
I've had this issue as well even after removing my ViewSwitcher and Site.Mobile.Master. What solved it for me was going into the RouteConfig.cs file and removing the AutoRedirectMode line:
var settings = new FriendlyUrlSettings();
//settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
How can one build dynamic sitemaps in ASP.Net?
Sql Sitemap Provider
Physical file sitemap provider
You can take a look at these for ideas or just reuse them.
Not sure about your exact context (Forms or MVC, etc), but here are a couple of resources you can take a look at. You have several options, and I don't yet have the rep to post multiple links, so I'll post the google search link I did and call out a few links I found that could work for you.
http://www.bing.com/search?q=ASP.NET+Dynamic+sitemap&form=QBRE&qs=n&sk=&sc=1-23
Scan your site folder structure (using LINQ) and auto-gen a sitemap - 3rd Link (Creating Dynamic ASP.NET SiteMap using LINQ)
Implementing your own SiteMapProvider (MDSN) - 6th link (Implementing ASP.NET Site-Map Providers)
Implement and override the StaticSiteMapProvider - 4th Link (Adding dynamic nodes to ASP.NET site maps at runtime by deriving from ...)
SiteMapProvider for MVC - mvcsitemap.codeplex.com
Simple implementation using RouteTable values (MVC) - 10th link (Dynamic sitemap in ASP.NET MVC - Stack Overflow)
I hope these help, or point you inthe right direction. Feel free to comment with more details if you're looking for something more specific.
I'm building a website. It allows the user to edit their website template, so I need a template engine for asp.net web form (I'm using C#). I'm worry about security problem, about user can write some c# code. So any template engine recommended?
Try http://ndjango.org - which is based from Django template - it supports almost all Django template functionality.
http://www.stringtemplate.org/ is also useful although it is very very strict.
i am not sure but perhaps DotNetNuke can be used. http://www.dotnetnuke.com/
The project I am working allows users to create pages in a CMS type system.
I would like to use an asp.net sitemap to reference these pages. So when a page is added or moved the Xml sitemap would be updated.
Is this a practical solution and are there any solutions available that work similar to this?
You should probably write your own SiteMapProvider see http://msdn.microsoft.com/en-us/library/ms178431.aspx that loads from your CMS.
Mentioned stackoverflow only as an example, but if you look above the URL for ask is
http://stackoverflow.com/questions/ask
which means /ask is a subdirectory, but they also do this for the specific question pages. How do you code this in .NET?
Not a code question as much as a technique. I know this is great for SEO, but how do you create a site so that every "page" is its own directory? Dynamically.
Do you have a template or a hidden redirect???
How?? :)
It's termed URL rewriting:
Url Rewriting with ASP.NET
MSDN: URL Rewriting in ASP.NET
EDIT: As #Justice points out, StackOverflow uses Routing.
StackOverflow uses something called Routing, which comes with .NET 3.5 SP1. Routing is a popular feature of a number of MVC frameworks, such as ASP.NET MVC, Ruby on Rails, and a number of Python and PHP frameworks.
Stack Overflow was built using ASP.NET MVC which uses a technique called Routing, see:
What Was Stack Overflow Built With?
and Routing
Stack Overflow uses ASP.net MVC
MVC uses the URL + Query String to determine the content, so its not like a URL which points to a specific page, but more like a hierarchical path to the properties of some data to be displayed
E.G. https://stackoverflow.com/users/[Put User ID Here]/[Put User Name Here]
prompts the website to display a USER with an ID specified in the path ( in this case the user name is probably just for kicks ) as opposed to a specific page created just for that user.
I have seen this accomplished by simply creating a folder for every web page and then having each folder contain a Default.aspx document (Assuming Default.aspx is setup as a default document in IIS, which it is by default). Then you can navigate to any folder on the site without specifying the page (Default.aspx).
For the dynamic part, I have worked with CMS systems that do it this way and the Default.aspx page simply inherits from some master template and the CMS system utilizes the ASP.NET rendering enginge to dynamically complete the web page.
Using folders may be a little heavy with the site structure, but it is an easy way to eliminate the page names from the browser.
This is how I structure my website and avoid having to use page names... for example http://www.innovaapps.net/Blog simply brings up the default.aspx page without having to specify the page name.