我有一個asp.net 4.0 web服務。該webserivce內部是一個名爲Applicant的webmothod。當我通過Web瀏覽器打開webservice.applicant webmothod並點擊asmx並鍵入parm名稱時,所有內容都按照它應該運行的方式運行。但是,當我通過webmethod運行的另一個應用程序部分運行web服務時,其中一部分不運行。webservice調用沒有觸發函數
<WebMethod(True)> _
Public Function Applicant(pPassKey As String, pAgencyID As Integer, pFirstName As String, pLastName As String, pMI As String, pSSN As String, pID As String, pBirthdate As DateTime, pAddress1 As String, pAddress2 As String, pCity As String, pState As String, pZip As String, pEmail As String, pHPhone As String, pWPhone As String, pCPhone As String, pVeteransPreference As Integer, pDD214 As DateTime, pComments As String) As Integer
'to test this use C:\Dev\PreDevelopment\WSDocd\Try1\Try1 solution
Dempsey.fn.LogElmah("Test Logging")
Dempsey.fn.TrackVisitInWebService() 'need to have this to make an entry about the session getting logged
Try
因此,例如,當我打電話從網站本身將WebMethod通過轉到ASMX頁面,然後點擊申請,一切火災。當我只使用其他應用程序的web服務時,try中的內容會運行,但Dempsey.fn.TrackVisit ....不會運行。 LogElmah只是試圖將其寫入elmah日誌,看到了該行。 elmah在從另一個應用程序點擊它時不記錄任何內容,但在從asmx頁面運行時運行良好。
嘗試中也沒有記錄錯誤。有沒有人有任何想法。 希望我解釋說,確定 感謝 香
你所描述的似乎證明問題不在此代碼中,而是在'Dempsey.fn'代碼中。 – 2014-09-04 19:07:11