Click here to Skip to main content
15,896,912 members

The page cannot be displayed because an internal server error has occurred.

Ivan Perry asked:

Open original thread
I published my new site to a test folder on my hosting with GoDaddy.com.
Just to mention, I have another site build on the same hosting and it works fine.

After I publish the site I get this error:
The page cannot be displayed because an internal server error has occurred.

I disabled the web.config file and then I get this error on the hosting account.
Changed the name to Web.1config as a temporary move.

then this error comes up:
Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
XML
<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>


I have changed my web.config file in a few different ways and still no success.

XML
<system.web>
        <customErrors mode="Off"/>
        <!--<customErrors mode="RemoteOnly" defaultRedirect="http://apollowebcreations.com"/>-->
        <compilation debug="true" targetFramework="4.0">
            <assemblies>

I have remarked out the
C#
<customErrors mode="Off"/>

and un-remarked the
C#
<customErrors mode="RemoteOnly" defaultRedirect="http://apollowebcreations.com/ipco"/>


I am completely stumped and not sure what to do.
Can anyone help me with this one... and let me know if you need any more information.
Thank you!

Thank you for your answers, and I have done all the changes that you guys have recommended with no success
------------------------------------------------
Here is my complete web.config file:
XML
<?xml version="1.0" encoding="utf-8"?>

<configuration>
    <connectionStrings>
        <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            </assemblies>
        </compilation>
        <authentication mode="Forms">
            <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
        </authentication>
        <membership>
            <providers>
                <clear />
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
            </providers>
        </membership>
        <profile>
            <providers>
                <clear />
                <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
            </providers>
        </profile>
        <roleManager enabled="true">
            <providers>
                <clear />
                <add connectionStringName="ApplicationServices" applicationName="/"
                    name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
                <add applicationName="/" name="AspNetWindowsTokenRoleProvider"
                    type="System.Web.Security.WindowsTokenRoleProvider" />
            </providers>
        </roleManager>
        <pages>
            <controls>
                <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
            </controls>
        </pages>
    </system.web>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>

        <!--<modules runAllManagedModulesForAllRequests="true" />
        <staticContent>
            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
            <mimeMap fileExtension=".m4v" mimeType="video/m4v" />
            <mimeMap fileExtension=".ogg" mimeType="video/ogg" />
            <mimeMap fileExtension=".ogv" mimeType="video/ogg" />
            <mimeMap fileExtension=".webm" mimeType="video/webm" />
            <mimeMap fileExtension=".oga" mimeType="audio/ogg" />
            <mimeMap fileExtension=".spx" mimeType="audio/ogg" />
            <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
            <mimeMap fileExtension=".svgz" mimeType="image/svg+xml" />
            <remove fileExtension=".eot" />
            <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
            <mimeMap fileExtension=".otf" mimeType="font/otf" />
            <mimeMap fileExtension=".woff" mimeType="font/x-woff" />
            <remove fileExtension=".manifest" />
            <mimeMap fileExtension=".manifest" mimeType="text/cache-manifest" />
        </staticContent>-->
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-4.1.60919.0" newVersion="4.1.60919.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
    <system.net>
       
    </system.net>
</configuration>


Does anyone have any ideas with this?
Tags: ASP.NET, SQL Server 2008, Visual Studio 2010, Errors, Web.config

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900