0

This is my Web.config File......Following is the error

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.

<?xml version="1.0"?>  
<configuration>
  <appSettings>
     <add key="SqlCon" value="Data Source=173.192.89.445;Initial Catalog=Rent_Driver; user
  </appSettings>
<location path="driversonrent.com" allowOverride="true">
 <system.web>
  <customErrors mode="Off" />
  <roleManager enabled="true"/>
  <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"/>
      <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Web.DynamicData.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </assemblies>
  </compilation>
  <authentication mode="None">
    <forms name="Loginnew" path="/" loginUrl="Loginnew.aspx" protection="Validation" timeout="30"></forms>
  </authentication>
  <pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID"/>
</system.web>

user2732906
  • 31
  • 1
  • 7

2 Answers2

0

Add a ~ here : path="~/" or before login.aspx for the server to take the relative path.

nimisha shrivastava
  • 2,357
  • 2
  • 16
  • 31
0

Although the previous answer is technically correct (and acceptable) but it's normally not a good practice to show raw errors to remote users from your production server as they could potentially contain sensitive information and are a put-off to general public.

You might be better off by:

  1. Making a custom error page and handling displaying graceful error message to the users.
  2. Logging errors to an external source (DB, text whatever) for later diagnosis.

There are a lot of articles out there to help you with this kind of implementation if that is what you require.

Imran Saeed
  • 3,414
  • 1
  • 16
  • 27
  • Are you using Internet Explorer? If that's the case then there is a setting in IE to show friendly errors which might be overriding your settings. – Imran Saeed Sep 19 '13 at 10:34
  • In that case, maybe, we need more information to help you out... Is your site a virtual directory or an application? I am trying to work out why your customErrors settings are not working. – Imran Saeed Sep 20 '13 at 08:13