Link to home
Start Free TrialLog in
Avatar of AZZA-KHAMEES
AZZA-KHAMEESFlag for Bahrain

asked on

<customErrors> An application error occurred on the server

Hi experts
i have a .net application that was running perfectly in my local machine, i transferd the application to the production server, but when i run the application i am getting the following 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".
i know that i need to add the following to web.config
     <configuration>
        <system.web>
          <customErrors mode="Off"/>    
        </system.web>
     </configuration>

Open in new window

but still not working still i am getting the same error, with no description of the error

any suggestion
thank you
Avatar of Ronak Patel
Ronak Patel
Flag of India image

Hi,

If only this application is hosted on your Production server then restart the IIS Service on the Production Server and try it again.

Steps:
1) Open Command Prompt as administrator.
2) type iisreset and press Enter.

If other application are also running on the same server, then don't restart the service, just open IIS Manager and select your site and on the right panel of the window in "Manage Web Site" section there is a resart button. Press it. It will reset your application.


Hope this helps.

Regards,
Ronak
Avatar of AZZA-KHAMEES

ASKER

thank you for the reply, i reset the server but still the same error
can you share the config file and error screen shot ?
web.config
<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <add name="OracleDBConnectionString" connectionString="Data Source=DB;Initial Catalog=DB;User ID=testusr;Password=P@ssw0rd" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  
  <system.web>
    <customErrors mode="Off"/>    
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Microsoft.SqlServer.ManagedDTS, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
    <httpRuntime/>
  </system.web>
</configuration>

Open in new window

and the error messageUser generated image
ASKER CERTIFIED SOLUTION
Avatar of Ronak Patel
Ronak Patel
Flag of India 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
Avatar of kaufmed
Are you certain that another web.config at a higher level isn't overriding these settings, and are you sure you've edited the correct application? The settings you have enabled are exactly what should be modified in order to get detailed descriptions from the error. If nothing else works, have your server admin remote into the production server, and bring up your page in the browser there.

Be sure to remove/disable these settings when you are done--since you say that this is a production server.
Hi,

1) As you mentioned that you transferred the application to production server, can you share how it was done?

2) Do you have rights or access to the production server? If yes, then please try to access the very same website from production server's browser. It will let you to see the error in that browser.

I would suggest to go as per point 2 if possible. It's the best way to look out real cause when the other way is failing.
hi thank you all fro the replies and sorry for the delay in response, i followed the steps mentioned by @Ronak Patel
now i am getting this error
Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies
Hi AZZA-KHAMEES,

It means your application includes a reference of Microsoft.SqlServer.ManagedDTS assembly, which might be missing in your application's bin folder.

Please make sure the Microsoft.SqlServer.ManagedDTS.dll is present in your application's bin folder.


Regards,
Ronak
i created a bin folder under the project that i moved to the production server, and i added the Microsoft.SqlServer.ManagedDTS.dll to it, and still i am getting the same error when i run the project from the server

Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
SOLUTION
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
sorry for the delay reply, in my application i included the reference under the bin folder and still i am getting this error
CS0234: The type or namespace name 'Dts' does not exist in the namespace 'Microsoft.SqlServer' (are you missing an assembly reference?)

do i have to add the assembly to the GAC  of the production server ?
the bin folder suppose to solve this as i need to reference to it?
Hi,

If the MS SQL Server SSIS is installed on production server, then the assembly should be present in the GAC.

Please look into this: Can't find package Microsoft.SqlServer.Dts.Runtime for programmatic SSIS execution


Regards,
Ronak
its not installed, sorry for the question, but do i have to install it? why can the application refer to the dll from the bin folder only, instead of installing?
SOLUTION
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
Thanks, need to install sql server client tool in the server