Site Network: Home | Blogcrowds | Gecko and Fly | About

Showing posts with label DotNetNuke. Show all posts
Showing posts with label DotNetNuke. Show all posts

When a .asp file encounters an error, the following standard HTTP 500 error message is displayed instead of an error returned by the 500-100.asp file:

The page cannot be displayed 
There is a problem with the page you are trying to reach and it cannot be displayed. 
...
HTTP 500 - Internal server error 
Internet Explorer
The .asp file is located on a nondefault Web site that, by default, does not use the 500-100.asp file for error handling. 

Note This behavior is described in the Internet Information Services (IIS) product documentation at http://localhost/iishelp/iis/htm/core/iiprstop.htm.



Note The 500-100.asp file should not be implemented on production Web sites. The 500-100.asp file may expose custom code to users.

To use the 500-100.asp file for error handling on the nondefault Web site, perform the following steps:

  1. Start the Internet Service Manager (ISM), which loads the Internet Information Services snap-in for the Microsoft Management Console (MMC).
  2. Right-click the appropriate Web site, click New, and then click Virtual Directory.
  3. In the Virtual Directory Creation Wizard, click Next. In the Alias text box, typeIISHelp, and then click Next.
  4. When you are prompted for the path to the content directory, click Browse, select the WINNT\Help\IisHelp folder, and then click Next.
  5. On the Access Permissions page, accept all the defaults, click Next, and then clickFinish.
  6. Right-click the Web site again, and then click Properties.
  7. On the Custom Errors tab, select the 500;100 error line, and then click Edit Properties.
  8. In the Message Type list box, select URL, and then type /iisHelp/common/500-100.asp in the URL text box.
  9. Click OK twice to return to the ISM.

In asp.net simply changing the attribute "codefile" to "codebehind" should do the trick.

Change:

Control language = "VB" Inherits="Bold.Modules.SupportCase.ViewSupportCases" Codefile="ViewSupportCases.ascx.vb" AutoEventWireup="false" Explicit="True"

To:

Control language = "VB" Inherits="Bold.Modules.SupportCase.ViewSupportCases" Codebehind="ViewSupportCases.ascx.vb" AutoEventWireup="false" Explicit="True"

CodeBehind

Specifies the name of the compiled file that contains the class associated with the page. This attribute is not used at run time.

This attribute is included for compatibility with previous versions of ASP.NET, to implement the code-behind feature. In ASP.NET version 2.0, you should instead use the CodeFile attribute to specify the name of the source file, along with the Inherits attribute to specify the fully qualified name of the class.

CodeFile

Specifies a path to the referenced code-behind file for the page. This attribute is used together with the Inherits attribute to associate a code-behind source file with a Web page. The attribute is valid only for compiled pages.