asp .net web服务问题

时间:2011-02-03 20:20:18

标签: asp.net

我在Asp.net中使用C#提供了一个Web服务,它给出了以下错误:

Server was unable to process request. ---> Exception of type 'System.Exception' was thrown.

例外情况如下:

The Following Application Error Occurred. Error Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: Exception of type 'System.Exception' was thrown.
   at DataProcessing.Class1.getData(String dbObjectName_SP_Querry, ObjectType dbObjectType, SqlDbType[] dbObjectDataType, String[] dbParamterName, String[] dbparameterValue, Int32[] dbParameterSize)
   at HAPS_BusinessLogic.EditMaster.edit(String sqlConnection, String PANUMBER, String PASUFFIX, String CLIENTFNAME, String CLIENTLNAME, String LEASETYPE, String AMOUNTTOPAY, String PMTFROMDATE, String PMTTODATE, String PymtToDateReasonCode, String OORID, String APTNO, String APTADDRESS, String APTBORO, String APTZIP, String LLDTIN, String LLDLEGALNAME, String LLDAPTNO, String LLDADDRESS, String LLDCITY, String LLDSTATE, String LLDZIP, String VendorChangeReasonCode, String MONTHLYRENT, String LEASEDATESTART, String LEASEDATEEND, String MONTHREMAIN, String BALANCEREMAIN, String CLIENTCONTRIBUTION, String LEASEDATESIGN, String DATESEND, String LEASEID, String CLIENTSSN, String PRGIND, String RECTYPE, String MonthlyCityShareOfRent, String MODBY, String MODDTE, String PAUSRCOMMENT, String PRID, String status) in C:\Documents and Settings\tveli3517\My Documents\Visual Studio 2005\Projects\HAPS_Dev\HAPS_BusinessLogic\EditMaster.asmx.cs:line 33

1 个答案:

答案 0 :(得分:0)

很难说缺少详细信息,但如果你正在使用一个Web服务并获得一个Exception,你可能会尝试捕获这样的FaultException:

        try
        {
            var svcResponse = Service.GetResponse();
        }
        catch (FaultException ex)
        {
            var message = ex.CreateMessageFault();
            if (message.HasDetail) {} // handle error...
        }