Implement A Custom 404 Page On Sitefinity 3.5
Aug 25, 2010How do I implement a custom 404 page on Sitefinity 3.5 using ASP.NET?
View 1 RepliesHow do I implement a custom 404 page on Sitefinity 3.5 using ASP.NET?
View 1 RepliesHere is what I have:
Dim cmsManager As New Telerik.Cms.CmsManager()
Dim currentNode As Telerik.Cms.Web.CmsSiteMapNode = CType(SiteMap.CurrentNode, Telerik.Cms.Web.CmsSiteMapNode)
Dim currentPage As Telerik.Cms.ICmsPage = currentNode.GetCmsPage()
Dim currentPageId As Guid = currentPage.ID
Dim pageFromDb As Telerik.Cms.IPage = cmsManager.GetPage(currentPageId)
Me.LastUpdateDate = pageFromDb.DateModified
Unfortunately .DateModified returns the last time that a page was edited instead of when it was last published.
how we can create the dynamic page ex. help.aspx and write the code in sitefinity. Because i facing a problem I create a page but i unable to know in which directory the page is lived.
[URL]
I am using ASP.NET 4.0 Web Forms. I learned that, in order to optimize my Web Application for Search Engine, I must implement custom 404 page. But the way Microsoft tell us to implement custom 404 (within Web.Config file), that is not good for SEO. Microsoft says,
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="404" redirect="Page-Not-Found.aspx" />
</customErrors>
But when the page is not found, IIS issue 302 redirect to Page-Not-Found.aspx page which is not good. So, I implemented custom 404 page using Routing technique that is available in ASP.NET 3.5 SP1 and 4.0. I used the following router in Global.asax page
I create custom principal for implement logic for users. In identity I store Id, Name. But it abnormally - this classes must use for authenticate and authorize.
I can implement custom MembershipUser, custom Roles and Membership provider.
How to do it? What best practices are?
I have read your article from aspsnippets.com about custom paging it really work, but there are a problem that if there are more record in database (2000 to 5000) than number of page index will be goes in large number. like 1 to 200, any way which can divide it like 12345678910...2000.
View 1 RepliesI just finished installing SiteFinity 3.7 standard version on windows server 2008. Is there a way to entirely/partially import an already existing .NET project (ASP.NET) into SiteFinity with some minor changes in the code of course (may be by changinf a couple of xml files or something similar). I could only see an "export" under Administration->Tools section but no import.
View 2 RepliesI am getting a large website developed. The develop has asked me which do I prefer either sitefinity or umbraco. The site will be similar to wikipedia where users can come and edit pages without having to login. I would like to ask your opionions on these two csm systems and which one would you recommend for content website with a community feel and wiki features.
View 5 RepliesI'm struggling with a URL Rewriting rule for SiteFinity. I am trying to make sure that you can only access the homepage via / and not /default.aspx.
I tried the following rule:
<rule mode="PermanentRedirect">
<url>/default.aspx</url>
<rewrite>/</rewrite>
</rule>
Which actually works perfectly on the homepage - however it also catches /sitefinity/default.aspx and redirects off the homepage - not content editors!
I essentially need a rule that will match when there is nothing prior to the string /default.aspx.
Over the past 3 years I have been using (...shamefully) SharePoint 2007, DNN and Tridion to develop web portals. I am however looking to move off SharePoint and Tridion (lack of control over urls, markup and tdd) and am looking for alternatives.
Which of these would your vote go to and why? Could you share any experiences you have with these:
Orchard
Sitefinity
Umbraco
N2
Although Orchard and Sitefinity seem easily extensible, I am worried about community support.
I try to implement a Custom MembershipPriver with a Custom MemberShipUser in my own database (with a specifics Users Table Model) : This is ly diffent files:
iTwitterMembershipProvider.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Collections.Specialized;
using iTwitter.Models;
public class iTwitterMembershipProvider : MembershipProvider
{
public override string ApplicationName
{
get { return _ApplicationName; }
set { _ApplicationName = value; }
}
public override bool ChangePassword(string username, string oldPassword, string newPassword)
{
throw new NotImplementedException();
}
public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer)
{
return false;
}
public override iTwitterMembershipUser CreateUser(string login,
string password,
string email,
string tokenKey,
string tokenSecret,
string twitterUserId,
object providerUserKey,
out MembershipCreateStatus status)
{
ValidatePasswordEventArgs args = new ValidatePasswordEventArgs(login,
password,
true);
[Code.....]
I have used standard asp.net roles and membership provider in my asp.net mvc project. The resources like creating an employee and setting its role can only be done by administrator. Now at first delivery of software to client, there will be no user, i want to implement a functionality where if there are no users in the system user can directly create new employee and assign roles without logging in. Once the roles are assigned user will have to log in to access authorized resources. Can i implement custom action filters that will assist me in implementing this functionality? How can i impelment this functionality?
View 1 RepliesI'm trying to implement a custom panel control that would act as a naming container. So far here is so what I've done.
First this is my custom control, MyPanel...
[ToolboxData("<{0}:MyPanel runat=server></{0}:MyPanel>")]
public class MyPanel: Panel, INamingContainer
{
}
And I try using it like so:
<cc1:MyPanel ID="A" runat="server">
<asp:HyperLink ID="TestHyperLink" runat="server" />
</cc1:MyPanel>
<cc1:MyPanel ID="B" runat="server">
<asp:HyperLink ID="TestHyperLink" runat="server" />
</cc1:MyPanel>
Obviously it doesn't work, that would have been too easy. ASP.net still complains about there being 2 DocumentHyperLink:
The ID 'DocumentHyperLink' is already used by another control.
how to write/implement custom authorization filter , i am using my own custom Authentication module and roles and not ASP.net forms authentication and have my user and role information in my sessions...
say Session["role"] = "Admin" or Session["role"] = "User"
how can i write custom filter to prevent users to access certain functionalities i.e Controller actions.
i am in the process of developing an asp.net mvc 2 social web app and some of the requirements have to do with users authentication and personalization. Site visitors should be able to login using credentials not only by registering to my site but also by entering external account credentials (Live ID, facebook, etc...). Also, users should have a custom profile, where they could enter personal details, preferences, etc...
Is there any good tutorial on how to implement custom membership and profile providers? The default Role provider that comes with asp.net mvc is ok and does not need to be re-implemented.
I m working in Asp.net 2.0 with C#.... I have a custom control and i have to use 'Datasource' property which is exactly like a repeater having.
View 1 RepliesHow can i implement Custom Paging for ListView control using row_number in sql server 2005 stored procedure.
View 2 RepliesWe are trying to implement Custom Role membership provider for our web app. For authorization we want to check for one more field like Facilityid for the logged on user along with role he has. eg. my User1 having Role1 with Facility1 can access some option and same user role for Facility2 have different option. So is there a way we can extend the existing role/profile provider to authorize user with this additional field along with role assigned.
View 1 Repliesredirect me to your own blog link or any other link explaining complete tutorial about how to implement gridview custom paging using stored procedure?
My search in google giving me old articles from year 2006. Right now I am using asp.net 3.5 and c#.
n my Asp.net / C# page I have 1 drop down and 1 date field. Dropdown contains 2 items "Item1", "Item2" and "Item3" I want to implement following logicBy Default datefield will not visible Once user select "Item2" thne this field will be visibile and this field should be required and check for entered date should not be less than toays date. If select "Item1" or "Item3" thne this field should not be visible and there should be no validation on date field.
View 3 Replieshow to implement a custom role provider which has support for parent and child roles?
I have a requirement to have high level Role permissions as per the usual Role provider functionality. However, I also have a requirement to further breakdown permissions into sub roles. I toyed with the idea of having further role instances for sub permissions but I'd prefer to have a native solution which allows for sub roles.
For instance:
[IT]
[IT] > [Admin]
[Extranet]
[Extranet] > [Admin]
In this scenario, the "Admin" role is actually 2 distinct roles, one for IT and one for Extranet scenarios. Ideally, there is no association between the 2 "Admin" roles because they are unique sub roles.
[Edit]: Following Igor's comment I feel I should clarify. The aspnetdb is already hosting multiple applications and therefore the use of the Application Name is not possible to segregate the sub roles as it is already being used to seperate the roles by application.
I want to comments and this comments users will like but with in update panel. I have problem click buton like number rising in database. But in page don't rise. Update Panel below.
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:LinkButton ID="lnkbegen" data-toggle="tooltip" data-placement="bottom" title="Beğendim" runat="server" OnClick="lnkbegen_Click">
<i class="fa fa-futbol-o"></i>
[Code] .....
I'm trying to implement an ASP.NET DataBoundControl that supports two-way databinding. Unfortunatelly I can't find any documentation on how to do this on the web and even Dino Esposito in his ASP.NET 2.0 Advanced Topics only handles one-way databinding (also the contact form on his blog isn't working). Can anyone provide me with documentation or samples on how to do this?
View 2 RepliesI've been working on this for a while now and nothing has been a bigger pain in asp.net. I'm trying to implement custom profile fields in my visual studio 2008 web application project. I've read a lot of tutorials but they all seem to be either out dated or don't apply to web application projects. Last night I got a little closer to solving the problem when I found the "Web Profile Builder" for web applications. I've successfully set this up and can handle static profile data.I've got my web.config file setup and I can access my custom profile fields by Profile.CustomField. Now I want to figure out how I integrate this with the database and data connection. I know there are two standard ways to handle this, I would like to create new columns in the aspnet_Profile database (rather than the delimited key/value option).I'm pretty new to asp.net and this is my first project with c#, .net, and asp.
View 3 RepliesI created an application and implemented IHTTPHandler for all incoming request ending with ".aspx" extension.Under "ProcessRequest" module, I am creating an instance of HttpContext (with URL attributes different from my application's URL i.e. if I am working on localhost then speciying Yahoo.com as its URL) and assigning it to "context" which comes as method argument.After redirection, an error is generated. Also, the custom HTTPContext is not passed to the requested page (default.aspx, in my case.)Code is as follows.
[Code]....