Resolving HTTP 500 server errors in ASP. NET and IIS 5.1

Source: Internet
Author: User
Resolving HTTP 500 server errors in ASP. NET and IIS 5.1 «h e» ASP. NET: General: emailposted Monday, 4 then l 2005

Every developer likes to take certain things for granted-like ASP. net being configured correctly with IIS. however sometimes there will just be something non-obvious that is preventing ASP. net pages from being served, returning an HTTP 500 error instead. the frustrating thing is that these are often caused by system configuration issues that most developers shoshould never need to worry about. below I offer some advice intended for IIS 5.1 on a local Dev machine that resolves some of these errors. the problem is most likely:

    1. IIS or ASP. NET simply not installed correctly
    2. Security Configuration

0. The Basics

First, try the classic: reboot your machine.

If that doesn' t work, then turn off friendly errors in IE (tools> Options> turn of friendly errors ). this will give you a more helpful message like "Logon Failure: user not allowed to log on to this computer. "instead of just" 500 server error ".

1. Check that IIS works

Be aware of the difference between ASP. NET and IIS. asp may be installed fine, but IIS may be messed up. Some general tips:

    • See if you can view http: // localhost/IISHelp
    • Try viewing an HTML page through IIS. This totally bypasses any ASP. NET issues.

If you can't view IIS, then perhaps IIS is disabled or turned off.

2. Other Web servers interfering with IIS

If this is the first time you installed IIS, perhaps there is another webserver running on your machine that is interfering with it (or if you disabled IIS and installed another Web Server ). for example sometimes Java developers have another server using port 80 that blocks IIS. try turning this other server off.

3. Uninstall and reinstall IIS and ASP. NET

Perhaps uninstalling and reinstalling will fix it.

    • Restart IIS by typing iisreset at the command line.
    • Reinstall ASP. NET by typing "aspnet_regiis.exe-I" at the command line.

If that doesn' t work, You can uninstall IIS and ASP. net, rename the inetpub directory to define tively delete it (while still saving your files), and then reinstall IIS and ASP. net. this may reset user account systems.

4. Set ASP. NET security permissions

Make sure that the ASP. Net user has rights on inetpub. Add the ASPNET user to inetpub folder's users (Security tab in properties) and granted it full control.

5. Check the Local Security Policy

In Admin Tools> Local Security Settings> Local Policies> Security Options> Audit Shut Down System immediantly if unable to log secuiryt aufits --> shocould be disabled.

6. Check the Registry

In the Registry Editor (type regedit at the command line), Check HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA \ crashonauditfail

Set default = "0" (shocould not be "value not set ")

7. Check the machine. config for Security Settings

As a last resort, change machine. config, probably located in a directory like: C: \ WINDOWS \ Microsoft. NET \ framework \ v1.1.4322 \ config \ machine. config

Look for the XML tag "<processmodel". This will have an attribute username = "system". Change this from "system" to "machine ".

Note that this is highly un-secure, but may be useful for leader you continue development while your IT staff investigates issues further.

 

Conclusion

I 've had the misfortune of needing to fix this on your laptops now, and these hard-learned-tips have helped me out.

 

Reprinted: http://timstall.dotnetdevelopersjournal.com/resolving_http_500_server_errors_in_aspnet_and_iis_51.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.