Site Server - An application error occurred on the server while uploading the file.

Asked By Sudhansu shekhar on 17-Sep-12 03:14 AM
 Hi all,

 I have one big problem i.e. in local host it working fine but While uploading that file(aspx) into server its giving error i.e.

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>


Please help me out. Its an very urgent. Thanks.
Danasegarane Arunachalam replied to Sudhansu shekhar on 17-Sep-12 05:36 AM
This means that there is some is thrown from server. As the Custom Error messages are enabled, you are not able to get the Exact error message. You need to disable the custom errors. In the web.config for your application do this one

<configuration>
    <system.web>
      <customErrors mode="Off"/>
    </system.web>
</configuration>
Sudhansu shekhar replied to Danasegarane Arunachalam on 17-Sep-12 06:03 AM
 Thanks for reply Danasegarane Arunachalam. I m already using thye same from before as u said
<customErrors mode="Off" /> Still getting the error. Please help me out. Thanks.
Danasegarane Arunachalam replied to Sudhansu shekhar on 17-Sep-12 06:13 AM
I hope you have done this.

1. Where do you store your files?
2. Do you try to store your files in either c:\ or d:\ drive
3. If yes, then you cannot upload file to either any of the physical drive of the hosting server.
4. Either you can upload to Asp.net Temporary folder path, or the space given for you using Server.Math path Function