.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

404 error pages

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
Hi I have two questions1. In Scott Gu's post he writes "It is not enough to simply turn on CustomErrors or have it set to RemoteOnly. You also need to make sure that all errors are configured to return the same error page.  This requires you to explicitly set the "defaultRedirect" attribute on the <customErrors> section and ensure that no per-status codes are set."How should we configure our error handling for per-status codes? We must be able to return a 404 status code.I'm confused in the Advisory they write that sensible encrypted data in the ViewState could be decrypted. Is it just the data IN the ViewState or could they use any ViewState (that's by default encrypted) and then get into the web.config files?

View Complete Post

More Related Resource Links

Web Part working fine on the top-level page but 'Not Safe' error on lower-level pages.


I have created a Web Part which reads and parses the SharePoint logs in order to display usage information of the page it resides on.  The Web Part works perfectly on the top page, reading and displaying the information desired.  However, once the Web Part is added to any page lower in the site heirarchy (sub-page) the same Web Part throws the following error:

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Show Error Details
Hide Error Details

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.]
  at Microsoft.SharePoint.ApplicationRuntime.SafeControls.GetTypeFromGuid(Guid guid)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)

Of course the current version of the Web Part is in the SafeControls list on the web.config.

The Web Part was originally designed to return site activity only for the top default.aspx page and worked fine but started to fail in the manner described above once I added the following line of code to return a SPCo

error provider control in aspx pages?

how can i add error provider control in an asp.net page using c#..  for example,if i am using a textbox control which prompts the user to fill it on clicking the submit button,how should i make the textbox control to prompt the user. someone help me with this!!! and also reply me if v can use status strip control in aspx pages

Sharepoint 2010: Get error: You do not have permissions to have lists and pages within My Site.

I am using the administrator login for the sharepoint 2010 farm.  I'm able to access My Site.  However, when I click on My content, I'm getting You do not have permissions to have lists and pages within My Site.   Any ideas?   Thanks.

Error: Access Denied on default.aspx and other pages of existing and new sites

Hi, since today we can't access the project portals of all our projects (Visual Studio TFS 2008/sharepoint admin 3.0 running on esx 4.0). I already checked every possible security settings, they're all OK. I also tried creating a new site but I can't access the site. I can however access all the settings. For example when I try to access: http://server/Sites/Profel I get the "Error: Access Denied" message and the browser is redirected to http://server/Sites/Profel/_layouts/AccessDenied.aspx?Source=http%3A%2F%2Fserver%2FSites%2FProfel%2Fdefault%2Easpx I have no problem navigating to: http://server/sites/Profel/_layouts/settings.aspx and I can go to al lot of pages, but when I want to create something like a calendar I can specify the parameters but when I click the create button I get the same error. http://server/Sites/Profel/_layouts/AccessDenied.aspx?Source=http%3A%2F%2Fserver%2FSites%2FProfel%2FLists%2Ftest%2Fcalendar%2Easpx&Type=list&name=%7B46CB3B46%2DD0F6%2D47F5%2DBA1A%2D3C9654A24A8E%7D I already tried this: http://support.microsoft.com/kb/926642  http://support.microsoft.com/kb/896861/en-us but no success Any help is welcome, Greetz, Peter

Session State throws error in ASP.NET Site Pages for SharePoint 2010 portal using Visual Studio 2010


I'm developing Visual Studio 2010 solution for site pages. I’ve created Site Pages in SharePoint 2010 and I’m trying to access Session variables in code behind in ASP.NET but it throws the following error.

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

I set the page directive as enableSessionState=&quo

Site owner getting Access Denied error on subsite pages.



I am site collection owner.I have created subsites with number of pages(140 pages) with inherit permission form parent site.After creation of subsite I want to edit subsite pages but I am getting Error Message "Access Denied" on some pages.

Anyone please help me...

I am using WSS 3.0



Handling non-aspx pages 404 error



I have enabled customError in my web.config file and it handles 'Page not found' error for aspx pages or any other files types handled by ASP runtime. My problem is my application is on a remote host and when a user tries a url on my website that ends with something other than those files types handled by ASP run time, for example http://mywesites.com/sdkdhiufuhief.hei, it displays a detailed error page by the IIS which I really don't like the malicious users to see. It contains a lot of information like the physical path of the application.

How can I handle all 404 html error regardless of the file type and URL in my ASP.NET application?

Export to Excel big size files (10000 pages) - HTTP Error 401.1



If you attempt to export a file to Excel, the browser hangs for a long time, then begins to request authorization, several times in succession .
Then displays an error message: "you are not authorized to view this page"

Avoiding Error Pages?


Hi everyone,

Is there a way to avoid error pages?

For example, pop up a window with error messages as a label.text etc.

Right now if any error occurs it shows error page with

all description   :(

Ofcourse I have validation controls all over the form,

making sure almost all kinds of possible error could be handled.

But there could still be errors, so I would like to make sure the users will not

see any error pages.

Thank you in advance!! 

Getting error trying to add pages


I have a site with a pages library. I think there is something wrong with the library. It is the system library for that site, so I can't delete it (or I haven't figured out how to delete it). When I try to add or publish a page to this library I get an error in my browser. I looked up the error and this is the entire block from the logs.

Entering monitored scope (Request (POST:http://sharepoint:80/ourclients/Pages/Home%20-%20Copy.aspx))    
11/12/2010 13:47:52.09     w3wp.exe (0x03B0)                           0x1210    SharePoint Foundation             Logging Correlation Data          xmnv    Medium      Name=Request (POST:http://sharepoint:80/ourclients/Pages/Home%20-%20Copy.aspx)    0fe58862-9c46-4ce9-a6e8-695dd3157de8
11/12/2010 13:47:52.10     w3wp.exe (0x03B0)                           0x1210    SharePoint Foundation             

Publishing portal : Getting error when publishing or approving pages .

When I am trying to publish or approve pages from form list . I am getting error and site stops working in that session for browser "Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above. "

High Performance ASP.NET - Speeding Up ASP.NET Pages

have been writing a series of blog posts, which I have named High Performance ASP.NET Websites Made Easy! There is no rhyme or reason to the order of these posts and certainly can be read in any order:

Developing High Performance and Scalable ASP.NET Websites
Avoid Chatty Interfaces Between the Tiers in Your ASP.NET Web Application
ASP.NET Page Profiling - Page Tracing - High Performance and Scalable ASP.NET Websites Made Easy
Web Applications: N-Tier vs. N-Layer - Benefits and Trade-Offs
Query Analyzer - Sql Server Database Indexes and Execution Plans

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.

SharePoint Application and Site Pages - Part 2 of 2

As the second article in a two part series, Steven examines the attributes and details of a SharePoint 2007 application page, including the construction and feature deployment of the same page based project. Since this is a WSS level objective, as opposed to MOSS, you will not need MOSS to work with the code included in this project. Windows Server 2003, WSS, and Visual Studio 2005 are all that is needed, with no additional add-ons. He provides a detailed analysis of each step involved in the creation and deployment of the project.

Application Vs. Content Pages in SharePoint

SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Master Pages in MOSS 2007

'MasterPages' feature in sharepoint 2007 makes the entire customization job easy.In 2003 we used to face lot of issues to get the same look and feel and the standard behaviour for overall site. In 2007, customizing the look and feel for the entire site can be done in a simple way by using 'MasterPage' feature.

How to Pass Values Between Web Pages ASP.NET

You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend