SharePointサイトでホストされているカスタムaspxページでXmlFormViewコントロールを使用しています。最近、SharePointが2010にアップグレードされ、その後、XmlForm.Submit()によってトリガーされるフォームの検証で問題が発生しました。
送信されたフォームの検証が失敗した場合、カスタムページは実際にはSharePointによってスローされた例外に依存しています。検証メッセージはフォーマットされ、ユーザーにわかりやすい方法で表示されます。
無効なユーザー提供データを含むフォームが送信されると、「Microsoft.Office.InfoPath.Server.Util.InfoPathFatalException」が返されます。この例外には、魔女のフィールドに無効なデータが含まれているという情報は含まれていません。実際、私は「Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterException」を期待していました。(送信は成功し、フォームに検証エラーが含まれていない場合、例外はスローされません)
Visual Studioで[コードのみを有効にする(管理対象のみ)]オプションをオフにしてフォーム送信をデバッグすると、次の例外が発生します(デンマーク語のテキストを含む)。
Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterExceptionが発生しました
Message=Formularen kan ikke afsendes、fordi denindeholdervalideringsfejl。Fejlene er angivet medenrødstjerne(obligatoriske feeler)eller omgivet afenrød、stiplet streg(ugyldigeværdier)。
Felt eller gruppe:MunicipalRealPropertyIdentifier
Fejl:DermåkunangivesetbestemtmønsterSource
=Microsoft.Office.InfoPath.Server
BypassWatson = true
LogId = 5567
SaveUserSession = false
UserMessage = Formularen kan ikke afsendes、fordi denindeholdervalideringsfejl。Fejlene er angivet medenrødstjerne(obligatoriske feeler)eller omgivet afenrød、stiplet streg(ugyldigeværdier)。
フェルトエラーグループ:MunicipalRealPropertyIdentifier
Fejl:DermåkunangivesetbestemtmønsterOverrideTopLevelMessage
=true
StackTrace:
at
Microsoft.Office.InfoPath.Server.SolutionLifetime.DatabaseHelper.CheckErrorBoard(Document document、DataAdapter adapter、XPathNavigator subtreeToCheck、Boolean schemaErrorOnly)
InnerException:
これはいい!例外には、検証エラーに関する情報が含まれています。デバッグを続行します。目的の例外が再スローされ、出力は次のようになります。
ステップイン:記号のないメソッドのステップオーバー'Microsoft.Office.InfoPath.Server.SolutionLifetime.DatabaseHelper.CheckErrorBoard'ステップイン:記号のないメソッドのステップオーバー' Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.ExecuteDefaultSubmitAction '
これはまだ良いです!デバッグを続行しますが、元の例外が失われ、InfoPathFatalExceptionが返されます。
Microsoft.Office.InfoPath.Server.Util.InfoPathFatalExceptionが発生しました
Message=タイプ'Microsoft.Office.InfoPath.Server.Util.InfoPathFatalException'の例外がスローされました。
Source = Microsoft.Office.InfoPath.Server
BypassWatson = false
SaveUserSession = false
UserMessage = De opstod en alvorlig fejl under behandlingenafformularen。
StackTrace:
Microsoft.Office.InfoPath.Server.Util.GlobalStorage.get_CurrentFormId()で
InnerException:
VS出力は次のようになります。
ステップイン:記号のないメソッドのステップオーバー'Microsoft.Office.InfoPath.Server.SolutionLifetime.DatabaseHelper.CheckErrorBoard'ステップイン:記号のないメソッドのステップオーバー' Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.ExecuteDefaultSubmitAction'ステップイン:ステップ記号のないoverメソッド'Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.ExecuteOMCallWithExceptions'
私はSharePointに関してはかなりの初心者ですが、これはセキュリティの問題のようなにおいがすると思いますか?元の例外は、発信者にバブルバックすることを「許可」されていないようです。
SharePointで完全なログを有効にしようとしましたが、「.. \ ProgramFiles \ CommonFiles \ MicrosoftShared \ Web Server Extensions \ 14 \ LOGS」のログを見ると、「元の」例外しか表示されません。なぜそれが上書きされるのではないのですか?
追加情報:サイトは現在、構成設定で実行されています。
<trust level="Full" originUrl="" />
誰かがこの問題について何かアイデアを持っていますか?
SharePoint 2007では、目的の例外が呼び出し元に返されます。