Hosting asp .net application on remote server

Hi all,

I'm trying to upload an asp .net application to a remote server, this application uses the vs login controls, and i used ms access as the provider.

The application is working perfectly on localhost but once i upload it to the remote server, am getting an error message that says

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

        <customErrors mode="Off"/>

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

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

Although i tried setting the customerrors mode to off, it still gave me the same error message, and i was very careful with the case sensitivity issue.

below is my web.config file.

i'll greatly appreciate your help

<?xml version="1.0" encoding="UTF-8"?>
        <remove name="LocalSqlServer" />
            <add name="LocalAccessDatabase" connectionString="~/App_Data/ForTesting.mdb" providerName="System.Data.OleDb" />

             <customErrors mode="RemoteOnly" defaultRedirect="errorpage.html"/>
            <roleManager enabled="false" />
                        <clear />
                        <add namespace="System" />
                        <add namespace="System.Collections" />
                        <add namespace="System.Collections.Specialized" />
                        <add namespace="System.Configuration" />
                        <add namespace="System.Text" />
                        <add namespace="System.Text.RegularExpressions" />
                        <add namespace="System.Web" />
                        <add namespace="System.Web.Caching" />
                        <add namespace="System.Web.SessionState" />
                        <add namespace="System.Web.Security" />
                        <add namespace="System.Web.Profile" />
                        <add namespace="System.Web.UI" />
                        <add namespace="System.Web.UI.WebControls" />
                        <add namespace="System.Web.UI.WebControls.WebParts" />
                        <add namespace="System.Web.UI.HtmlControls" />

            <authentication mode="Forms">
                  <forms loginUrl="login.aspx" />
            <membership defaultProvider="AccessMembershipProvider">
                          <clear />
                          <add name="AccessMembershipProvider" type="Samples.AccessProviders.AccessMembershipProvider, AccessProviders" connectionStringName="LocalAccessDatabase" enablePasswordRetrieval="false" enablePasswordReset="false" requiresUniqueEmail="false" requiresQuestionAndAnswer="false" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" applicationName="Test" hashAlgorithmType="SHA1" passwordFormat="Hashed" />

By the way i disabled the roles because it was giving me an error message on my localhost and i'm only interested in authenticated and unauthenticated users, i.e; i dont need different access rules for different members. please tell me if am on the right way
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hello minjiber,

Change the part of your web config that reads: "customErrors mode="RemoteOnly" to "customErrors mode="Off".  Then then you'll see the real error coming back from the app.  We'll need to see that error to determine the root issue.


minjiberAuthor Commented:
Tnaks bcaff86 for you reply, but I've tried that like million times and i've just tried it again, it's still giving the same error message. and i repea,t i was being very careful about the case sensitivity.

i dont know if this could be the reason: i'm uploading this asp .net application, to an asp website, i'e; there is a perfectly working asp website and i'm adding this pages to it. the asp pages are still working normally though.

Silly question, but you have definitely re-uploaded your web.config file having made the changes? (sorry but have to ask!)

Also check your pages. See the code below. It is an extract from the top of a .aspx file. See debug="true" - try adding that to one of your pages and see if it works.

As a side thought, if you want to carry on editing your pages in spite of this problem you could always put try-catches in your code and add exceptions to a log file rather than read them on the screen.
<%@ Page Language="VB" AutoEventWireup="false" Debug="true" CodeFile="thePage.aspx.vb" Inherits="thePage" %>

Open in new window

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

minjiberAuthor Commented:
Don't worry about silly questions, because it might be a silly solution. yes i've uploaded the web,config and the page is in debug mode.

i'm hosting this site on a webhosting company not on my server. i think i need to convert it to an application. i can convert it to an application when its on my pc, but now that i've uploaded the files, how can i convert them to application on the remote server, is it possible to do that myself or usually i should ask the host to do that for me.

That depends on your host. On a few of my hosted servers i can create applications, but it just depends how advanced your host's control panel is and how much they let you do yourself!

Generally speaking they will happily do this for you if you ask.
minjiberAuthor Commented:
The reason why i wasn't able to read the error messages is that the remote server's machine.config file is set to override my customerror mode="Off".

And the reason why its giving an error is because the host is running under Medium Trust which prevents authentication and Jet Provider.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.