• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 870
  • Last Modified:

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

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

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"?>
<configuration>
      <connectionStrings>
        <remove name="LocalSqlServer" />
            <add name="LocalAccessDatabase" connectionString="~/App_Data/ForTesting.mdb" providerName="System.Data.OleDb" />
      </connectionStrings>

      <system.web>
             <customErrors mode="RemoteOnly" defaultRedirect="errorpage.html"/>
            <roleManager enabled="false" />
                  
  <pages>
                  <namespaces>
                        <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" />
                  </namespaces>
            </pages>

            <authentication mode="Forms">
                  <forms loginUrl="login.aspx" />
            </authentication>
      
            <membership defaultProvider="AccessMembershipProvider">
                        <providers>
                          <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" />
                  </providers>
            </membership>
      </system.web>
</configuration>


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
0
minjiber
Asked:
minjiber
  • 3
  • 2
1 Solution
 
bcaff86Commented:
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.

Regards,

bcaff86
0
 
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 asp.net pages to it. the asp pages are still working normally though.

0
 
ianmair329Commented:
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

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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.

Thanx
0
 
ianmair329Commented:
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.
0
 
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.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now