Link to home
Start Free TrialLog in
Avatar of Melinda Burns
Melinda Burns

asked on

Web.config

After finally getting assistance with my asp code and compiling so it runs properly on my desktop,  I copied files to hosting server and now I get this message from the server:


Server Error in '/' Application.

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


<!-- 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>
Avatar of HainKurt
HainKurt
Flag of Canada image

make necessary change on web config as

<customErrors mode="Off"/>

and you will see detailed errors so you can understand whats going on...
also make this change on IIS to send detailed error messages to browser...

https://blogs.msdn.microsoft.com/rakkimk/2007/05/25/iis7-how-to-enable-the-detailed-error-messages-for-the-website-while-browsed-from-for-the-client-browsers/


1. Open the IIS7 manager
2. Select the Website and on its features view, double click on “Error Pages”.
3. Right click and select the “Edit Feature Settings…” or select the same from the Actions pane (in the right hand side)
4. Select the “Detailed errors” radio button and click on OK
5. Now, even your client browsers will be able to see the detailed error messages.
Avatar of David Johnson, CD
@Huseyin  on the godaddy server which he has no access to iis manager your suggestion won't work. Your first suggestion will work
Avatar of Melinda Burns
Melinda Burns

ASKER

This is hosted on a private hosting server. I was able to get the errors to be displayed now, so now I am trying to decipher what I need to do.

First error after making said changes is the Line 15 was the problem

 <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />

So i checked to see what version the server had installed and it said all the versions except for 4.5.
So i changed to 4.6.1   No Go
So I changed to 4.0    No Go
So I removed these two lines.

Now my error is  

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'WebApplication1.Test_form'.

Source Error:


Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test_form.aspx.cs" Inherits="WebApplication1.Test_form" %>
Line 2:  
Line 3:  <!DOCTYPE html>

Source File: /test_form.aspx    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.8669; ASP.NET Version:2.0.50727.5491
So based on what i can see, it is looking for a file called test_form in a folder called WebApplication1.  But there is no folder in the website called that only locally.
 
So yes the webpage works fine on my local computer which has .net 4.5. It brings up the webpage with the form and I can complete the form and click on the submit button.  It returns a message "Your email was not sent".. which is in one of my if/else statements. I am guessing my local computer just can't send emails from my web browser because it is not setup to send emails.

I will continue to research this but if you have the solution. Let me know.
you should login to godaddy and change the .net version of your web site
did you upload the complete contents of your project folder?
no just the two asp files test_form.aspx and test_form.aspx.cs     There were a bunch of other files that Visual Studio created that were samples as far as I can tell.
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you Huseyin,  you went out of your way to help get this resolved.   I hope the payment I sent you is sufficient.