开发者

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

开发者 https://www.devze.com 2023-02-11 07:29 出处:网络
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.

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.

Pl开发者_StackOverflow社区ease 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:

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

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).


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.
0

精彩评论

暂无评论...
验证码 换一张
取 消