Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handled exception appears to crash IIS

Status
Not open for further replies.

mrsnrub

Programmer
Mar 6, 2002
147
AU
Hi everyone,

I have an ASP.NET application that is calling some custom functions in SAP. One of these functions throws an exception when no data is available, and I catch this in my code. This works fine when I run the application in debug mode locally.

However, when this site is published and the code is run from the server (running IIS6 on Windows Server 2008), the application appears to time out - the page that contains this code does not load. Running on a client PC presents the user with a series of username/password boxes.

If the exception is not thrown, or I comment out the code altogether, the page loads without problems.

The snippet of code in question looks like this:

Code:
try
 {
                proxy.Connection.Open();
                proxy.Z_Hr_Get_Managers_Employees(PersonnelNo, ref sapTeamOrg, ref sapTeamPers);
}
catch (Exception e)
{
                // do nothing..
            }
finally
{
                proxy.Connection.Close();
}

In the Event Viewer of the IIS server I have the following error associated with this problem.

Log Name: Application
Source: Application Error
Date: 11/09/2009 8:04:02 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: VMXYZ
Description:
Faulting application w3wp.exe, version 7.0.6001.18000, time stamp 0x47919413, faulting module ntdll.dll, version 6.0.6001.18000, time stamp 0x4791a783, exception code 0xc0000374, fault offset 0x000aada3, process id 0x1138, application start time 0x01ca3272f4a13874.
Event Xml:
<Event xmlns=" <System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2009-09-11T00:04:02.000Z" />
<EventRecordID>1053</EventRecordID>
<Channel>Application</Channel>
<Computer>VMXYZ</Computer>
<Security />
</System>
<EventData>
<Data>w3wp.exe</Data>
<Data>7.0.6001.18000</Data>
<Data>47919413</Data>
<Data>ntdll.dll</Data>
<Data>6.0.6001.18000</Data>
<Data>4791a783</Data>
<Data>c0000374</Data>
<Data>000aada3</Data>
<Data>1138</Data>
<Data>01ca3272f4a13874</Data>
</EventData>
</Event>

Any advice would be greatly appreciated.

Best regards,

Steve
 
looks like
Code:
catch (Exception e)
{ 
   // do nothing.. 
}
is masking your problem.
1. you are catching Exception. Chances are what is causing the failure is not what you assume to be failing. Catch the specific exception type that the is thrown when no data is present, not Exception.
2. at a minimum log the error so you can see why. this will give you some insight into how to handle the exception moving forward.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
Thanks for the reply Jason. I know what exception is being thrown, I had changed this code as part of my debugging before posting, sorry.

The exception is an RfcAbapException, which is part of the .NET Connector proxy tool that I am using to communicate with SAP.

Unfortunately further research on this issue looks like it might be a problem with .NET connector no longer being supported by SAP or Microsoft. Others have had this problem on Windows Server 2008, but I am yet to find a resolution without using a different adapter or OS.


Cheers,
Steve
 
Looks like you will need to migrate to the web services.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top