Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
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?
Posted
Updated 7-Jan-13 16:45pm
v5
Comments
Christian Graus 7-Jan-13 20:23pm    
Is there a web.config at a lower level that's overriding this one ? You're doing the right thing.
Ivan Perry 7-Jan-13 20:26pm    
The only other web.config is in the Account folder(for logon and logoff), which I am not using at this time.
Christian Graus 7-Jan-13 20:51pm    
Can't hurt to set that correctly, too. It might be getting picked up

1 solution

According to this GoDaddy article, you need to do the following (rather than comment out the sections of the web.config you indicated in your question):
XML
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>

So, show detailed errors, enable scriptErrorSentToBrowser, disable custom errors, and set compilation to debug. Looks like you haven't tried modifying httpErrors errorMode, so maybe that was the missing piece. Also, I'm not sure which version of asp.net GoDaddy runs by default, so maybe mess with your attribute "targetFramework" on the "compilation" element. Keep in mind that if there is a problem with your web.config, asp.net won't be able to read it to determine that it should show error details.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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