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


Post New Web Links

Custom 404 Pages

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :SharePoint
 

I have followed Microsoft's instructions for custom 404 pages in SharePoint by setting the web application's FileNotFoundPage property.  I am now still getting a 404 error if someone types a site collection name incorectly.  For example if the user types http://sharepoint/sites/test and "test" is not a site collection then they will still get a 404 error.  I have tried catching this with a httpModule also, but it looks like the request is returing a 200 code instead of a 404. 

Several of the blogs mention this same problem but I have not seen any solution for it.

"* This seems to be working within a site collection context only, i.e. http://MyMOSSServer/sites/siteA if sites is a wildcard inclusion managed path and siteA doesn't exist in MOSS then this URL will NOT trigger the custom 404 error page set to SPWebApplication.FileNotFoundPage property."

Thanks,




View Complete Post


More Related Resource Links

Custom tree view for navigating wiki pages

  
I'm creating an information resource on our intranet (WSS 3.0) using the wiki style format.  The only trick is, unlike a standard wiki, where all pages are directly under the parent, I want to be able to create a customizable tree view where some pages are nested underneath each other.  For example, this particular site talks about all of our different IT systems.  I'll have a wiki page for each system, then underneath each of those pages, there will be more pages for things like training, documentation, etc.  Even though all those pages are at the same level, I need to be able to nest them in a navigational tree view on the quick launch bar.  I suppose if there were also a way to nest the wiki pages themselves, I could just use the pre-packaged tree view.  Anyone have any ideas?

Sharepoint 2007 - Wiki site - New Pages Not Inheriting Custom Master Page

  

I am working on a SP site (MOSS not WSS) which is heavily customised away from the OOTB layout. I need to create a Wiki site, which was going well - I've created a master page which displays the miniconsole (this was not visible with our customised layout), and made it the default master page for the site. This has been applied to the two standard pages that come with the Wiki site, however when a new page is created, it seems to inherit the default.master, rather than my custom master page - thus not showing the miniconsole.

When I have created a new page, I am able to use SharePoint Designer to attach my custom master page to it, which works perfectly, however this will not be a viable option going forward as end-users create their new wiki pages.

How can I get the new pages to inherit my master page when they are created?

Shark


can template save custom pages?

  

I created a template off a site I made last year (without content). That site had some custom pages with webparts on them.  These pages were linked to from the Quick Launch menu.  I just made a new site using that template and it appears the custom pages weren't part of the template as when I click on the links to them in the QL menu, I get a 404 page not found error. I tried again saving the template with content this time and my custom pages show up - but then I have all the lists/libraries filled with old content.  Any remedy?

I am on MOSS 2007 and can use Designer.


Custom Insert / Edit Pages

  
I'm working with a legacy database that is not normalized, nor can i change it to normalize it and/or add relationships. I've successfully got my List and Details pages up and running and am now moving on to insert/edit. Here's my challenge: The insert page needs to accept data that will be written to multiple tables (i.e. consider a customer call where we're creating the customer, the customer address record, etc. on the fly). In addition, the customer can either be a "customer" or a "prospect", each being a separate table. Any suggestions as the best approach to tackling this issue. My gut feel is that I should write a standard aspx page and hook up the data manually. Not sure how to navigate to this page from the insert / edit button (modified routing). Thanks.

Retract custom master page feature and all site pages stop working

  
There is a requirement to apply custom branding on personal sites in a SP 2010 project. For this I have created a feature which uploads and applies the custom master page on creation of any new personal sites.   I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on a team site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.   I activated the publishing features and looked at the master page applied to the personal site. It was pointing to v4.master.   Any help on this is appreciated. Regards, Neha

Retract custom master page feature and all site pages stop working

  
I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on the root site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.   I activated the publishing features and looked at the master page applied to the personal site. It was pointing to v4.master. Any help on this is appreciated. Regards, Neha    

How to provision custom list and import custom aspx pages automatically in sharepoint?

  
What is best way to create custom list (Document library) and import custom .Net pages automatically. The goal is to avoid create the list and upload those .net page to the list manually. Any code snippet that would be great help. thanks

Custom Webpart not working on "My Profile" page but works on all other pages. Linq Problem?

  
Hi, I created a publication site and in that site i created pages with specifique metadata (using a pagelayout with a custom content type)0. My webpart is getting data from those pages and displaying it. My webpart works on every page except on the "my profile" page(overview tab). I get the following error: Invalid Url: /TestSites/course I used the SPMETAL to create a class and i'm using this class to retrieve the data from the pages (with linq). The url i give to the entity is http://pcp/TestSites/course  this works fine on every site except on the my profile page. Can anybody help me? Here is the code i use to retrieve my data: EntitiesDataContext ctx = new EntitiesDataContext(courseSite); //Code below gets only the pages with a courses contentType. //EXCEPTION TRIGGERT ON THE FOLLOWING LINE IF IN PROFILE PAGE EntityList<Courses> course = ctx.GetList<Courses>("Pages"); //Writing the query to get the correct pages(with the course page layout only! var Query = from myCourse in course.ToList() where myCourse.CourseParticipants.Contains(myWeb.CurrentUser.LoginName) Select new{myTitle = myCourse.CourseTitle, myCompany = myCourse.Company, myPath = myCourse.Path, myName = myCourse.Name }; Thx.    

Provision/Add custom Layout, Master and Default pages in Site Template

  

I'm attempting to use the onet.xml of a custom Site Template to provision/add (same thing?) a custom Master Page, a Custom Layout page and then reference them in Configurations.

I'm having trouble understanding the steps and order to do this in properly and am getting errors where the Layouts/Master pages cannot be found.  Here is what I have now:

<Module Name="SitesLayout" Url="_catalogs/masterpage" Path="Layouts" RootWebOnly="false">

  <File Url="SitesLayout.aspx" Type="GhostableInLibrary"><Property Name="Title" Value="AEP Sites Layout Template" /></File>

</Module>

<Module Name="AEPMasterPage" Url="_catalogs/masterpage" RootWebOnly="false">

     <File Url="CustomMaster.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="true" />

</Module>

<Module Name="DefaultFunctional" Url="Pages" Path="">

     <File Name="MyDefault.aspx" Url="DefaultOrgFuncHomePage\default.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">

     <Property Name="Title" Val

Cannot edit pages based on custom page layout

  

Hi guys!

I have created a site definition that applies a the publishing features and a feature containing some publishing page layouts before it creates some publishing pages based on these layouts.

My problem is that once I create a site based on this definition the resulting publishing pages are not editable. Also in the site definition one of the pages have a webpart added to one of the layouts containers that it should be based on, but when I try to open the page in the browser I get the error: "One or more Web Parts on this page references a zone that doesn't exist".

It appears that either my layouts or publishing page declarations are incorrect, but I cannot for the life of me figure out where. Any help would be greatly appreciated. I've been googling this problem for well over a week now :S

 

The module part of my site definition:

<Module Name="Homepage" Url="$Resources:cmscore,L

Dynamic Data. Multiple Custom Pages For The Same Table

  

Hello,

I've just started out my first project using Dynamic Data and I've been running into a series of problems. Dynamic Data doesn't seem to be swimming in documentation. Anyway, my setup is:

  • Visual Studio 2010
  •  .net 4.0
  • Dynamic Data Domain Service Web Application Project Template (I have the RIA Services for ASP .net installed)
  • using an Entity Data Model
  • using a DomainService class
  • ASP .net Membership

There are a couple of things I am trying to achieve:

  1. I have my scaffolding turned on for all the tables. I am using the RequiresRole attribute in order to restric access to some tables. I have understood how you can create a Custom Page Template for a certain table, no problems there. I would like to be able to use the default PageTemplates for lets say the Administrator role and the Custom Page Templates for another role; the idea would be that the Administrator would be able to edit anything in the DB, but the restricted user would receive a Custom Page with only a few actions available. Long story short: is there a way to access both the standard and custom templates?
  2. Related to question number 1: Can I have multiple Custom Page Templates for the same table? I saw someone asking

    Retract custom master page feature and all site pages stop working

      

    I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on the root site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.

     

    I activated

Branding with custom master pages

  

Hey all,

  I am branding my sharepoint 2010 install. I have the layout customized (main css changes) and i have the following master pages customized: v4, minimal, dayandnight and mysite. I am having issues applying these across all sites and then making it so when i create a new site/site collection the master page applies to those as well.

Currently i have to manually go in and apply the master page to the site collection or it cant get it to apply (my site - my content page). Any help or thoughts would be apprecated.

 

thanks

jAC


WSP Builder to package custom master pages

  
Hi all,

I know there are various posts on packaging up custom master pages with wspbuilder but I have a bit of a twist with my particular situation.  I'm new to this and need to go from development to staging to production with master pages, web parts, etc.

I have created a custom master page using SharePoint Designer and also needed to modify various other pages (simple.master, signout.aspx, etc) to keep the look and feel intact.  Do I simply place the modified files in the LAYOUTS folder of my solution for wspbuilder?  Please note that I will need to deploy to a farm with multiple WFEs.  Any links to articles showing how to do this is greatly appreciated.

Thanks in advance,
David


Custom Master Pages on View Scopes and Keywords fail?

  

So I'm applying the system master page on my sharepoint 2010 site and noticing that everything is branded (yes!) but a couple pages were not...

these are: viewscopes.aspx and listkeywords.aspx

Has anyone encountered this issue? ... I know that in 2007 the best approach were HTTPModules, and I tried it out here. The pages were branded BUT they crashed on certain operations and were simply not stable. I wonder if this is a product bug or?

Key thing to note is that these pages in the layouts folder do not have the new 'DynamicMasterPage' attribute declared on the directives section of the page. So I really can't figure out if they were intentionally left unbranded (unbrandable if you will).. help?!

Cheers,


Alex Talarico


Custom Application pages with WSP Builder

  

Hi All,

I am trying to add a custom Application page on by using WSP Builder.

while adding a new item it is not displaying the asp.net forms.

Please help

Regards,

Saveesh.S

 


Problem with custom pages using ForeignKey.ascx & ForeignKey_Edit.ascx field templates

  

I have created a DynamicData website with a data model from Northwind (using Orders & Shippers tables Orders.ShipVia-> Shippers.ShipperId) I've turned scaffolding on.

I have then added a custom page by copying ListDetails.aspx from PageTemplate folder to the DynamicData\ CustomPages\Orders folder

Then I have edited the page:

And adding the following to the GridView1:

AutoGenerateColumns="false"

<Columns>
    <asp:DynamicField DataField="OrderID">
    </asp:DynamicField>
    <asp:DynamicField DataField="OrderDate">
    </asp:DynamicField>
    <asp:DynamicField DataField="ShippedDate">
    </asp:DynamicField>
    <asp:DynamicField DataField="ShipVia">

Categories: 
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