문제

What is it that would cause no error message to be logged if the form fails to submit?

I have a form that has custom submit code written and at times fails on submit. It gives a correlation id which I give to my sharepoint server admin. Apparently nothing is getting written into the log file for that ID. After some google searching I could not find anyone else with a similar problem which leads me to beleive that how we handle exceptions is wrong. I don't know enough about coding with InfoPath to say for sure that it is done wrong but I am suspicous it is.

The catch block is where I think the problem is because of no error messages are shown.

catch (Exception ex)
{
    e.CancelableArgs.Message = ("There was a problem submitting the form:\n\n" + ex.Message);
    e.CancelableArgs.Cancel = true;
}

e is a SubmitEventArgs object that gets passed in. This is the last lines of code in this function so I don't know if it is supposed to be writing to the log or if that is handled by sharepoint itself if an event is cancelled. Because nothing is getting written to the log this would lead me to believe that this code is wrong. If it is can you either provide a link to example code that is correct or explain what needs to be done.

This is done with InfoPath 2007 and SharePoint 2010

도움이 되었습니까?

해결책

It turns out that the error was getting logged it was found when the exact minute the error happened was known. So I'm saying it is operator error on not checking the right log files.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top