SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a sharepoint site. In its IIS directory I've created an aspx file.

When I browse to it using IE - I get a 404.

I'm using it for testing out controls relating to SharePoint.

How can I make the aspx file that I manually created usable? Not 404?

share|improve this question
up vote 8 down vote accepted

The IIS virtual web of a SharePoint site is off limits :-) Anyway pages are picked up by a module that redirects all parsing of pages (simplified).

Depending on versions you have different options.

For SharePoint 2007 we had Site Pages that could be provisioned using the <Module> element, or you could create Application Pages.

Site Pages lives in the root of a given site and can have code behind. A typical use is a page that should only be visible for a given site.

Application Pages lives in a virtual directory, _LAYOUTS and can be accessed farm wide. A typical use is some application that should be made available from all parts of a farm.

Se here how to create an application page for MOSS / WSS3

Here is a primer on how to use code behind in ASP.NET pages in SharePoint 2007

In SharePoint 2010 the story is somewhat the same, except Site Pages have been moved from the root of a site to the SitePages library. A description of the two types of pages can be found here on MSDN.

share|improve this answer

Deploy page to {SharePointHive}\Templates\Layouts, access from browser by url: {site-url}/_layouts/{page}.aspx

share|improve this answer

This may get you close to what you need:

  • Go to site collection in browser
  • Site Actions -> Edit site in sharepoint designer
  • Navigation -> Site Objects -> All Files
  • Right click -> New -> ASPX
  • Add you sharepoint controls
  • Save
  • Test sharepoint controls
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.