jao
jao

Reputation: 18620

Cassini: ASPX file: This type of page is not served

When running a ASP.NET 3.5 project in Visual Studio 2010's Casini, I receive the following error:

This type of page is not served.

Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.aspx' may be incorrect.
Please review the URL below and make sure that it is spelled correctly.

Requested URL: /default.aspx

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955

This is a project running in visual studio 2010 in windows 7 64 bit on .NET 3.5

The same error occurs in IIS, although IIS is configured to handle .aspx:

IIS settings

I also executed aspnet_regiis /i from the 2.0.50727 .net folder:

C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i

Finished installing ASP.NET (2.0.50727).

Upvotes: 2

Views: 1804

Answers (1)

user240141
user240141

Reputation:

I concluded the following

  1. Check the target framework of your project.
  2. Also check if default.aspx exists on the disk. If you are redirecting or accessing the page try using ~/DirName/Pagename.aspx if inside root , in some directory or ~/page.aspx if in the root itself. Also .Aspx files are by default added to IIS or any webserver that supports asp.net.

Upvotes: 1

Related Questions