<Item time="2016-01-11T05:39:01" page="/fr/iconic-bright-cushion-spf-50-pa-nude-perfection-compact-foundation/p/5490/c/30"
url="http://www.shopunt.com/fr/iconic-bright-cushion-spf-50-pa-nude-perfection-compact-foundation/p/5490/c/30?utm_source=edm&utm_medium=email&utm_content=20160107_cushion_4&utm_campaign=makeup&OutAD_Id=5825" username="Not Member" browserName="Chrome" browserVersion="34.0" userAgent="Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-N915FY Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36" RemoteIP="37.160.206.7" Ref="No Ref" RequestType="GET" Ver="3">
<ErrMsg>
</ErrMsg>
<ErrStack> 於 System.Web.CachedPathData.ValidatePath(String physicalPath)
於 System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)</ErrStack>
<Post>
</Post>
<Cookie>
</Cookie>
</Item>
應用程式: w3wp.exe
Framework 版本: v4.0.30319
描述: 處理序已終止,因為有未處理的例外狀況。
例外狀況資訊: System.Exception
堆疊:
於 UW.SQL.DTFromSQL(System.String, System.String)
於 UW.SQL.DTFromSQL(System.String, System.Data.SqlClient.SqlConnection ByRef, Boolean)
於 SHOPUNT.DB.Product.RebuildNotStopProducDT()
於 System.Threading.ExecutionContext.runTryCode(System.Object)
於 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
於 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
於 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
於 System.Threading.ThreadHelper.ThreadStart()
---------------------------------------------------------------------------------------------------------------------------------------
失敗的應用程式名稱: w3wp.exe,版本: 7.5.7601.17514,時間戳記: 0x4ce7afa2
失敗的模組名稱: KERNELBASE.dll,版本: 6.1.7601.18229,時間戳記: 0x51fb1677
例外狀況碼: 0xe0434352
錯誤位移: 0x000000000000940d
失敗的處理程序識別碼: 0x57c4
失敗的應用程式開始時間: 0x01d012faf33398f8
失敗的應用程式路徑: c:\windows\system32\inetsrv\w3wp.exe
失敗的模組路徑: C:\Windows\system32\KERNELBASE.dll
報告識別碼: 90ad2f4d-7f89-11e4-8ad2-e41f13b7d81e
<system.web>
<httpRuntime requestValidationMode="2.0" />
<pages validateRequest="false" />
</system.web>
後者比較算是正解 基本上處理掉 <script 我想 XSS 就解決一大半
Imports System.Runtime.CompilerServices Imports Microsoft.VisualBasic Public Module DateTimeExtension ''' <summary> ''' 將系統時間轉為當地的時間並轉為字串 ''' </summary> ''' <param name="dtSystem"></param> ''' <returns></returns> ''' <remarks></remarks> <Extension()> _ Public Function ToCountryDateTimeString(ByVal dtSystem As DateTime) As String If dtSystem = DateTime.MinValue Then Return "n/a" End If Dim cstTime As DateTime = dtSystem.ToCountryDateTime() ' tr-TR -> dd.MM.yyyy HH:mm:ss Dim langCode As String = SHOPUNT.DB.SysConfig.GetSysConfig("DefaultLangCode") Dim culture As New System.Globalization.CultureInfo(langCode) If cstTime.AddMonths(6) < Now Then Return cstTime.ToString("dd.MM.yyyy HH:mm", culture) Else Return cstTime.ToString("dd.MMM HH:mm", culture) End If End Function ''' <summary> ''' 將系統時間轉為當地的時間 ''' </summary> ''' <param name="dtSystem"></param> ''' <returns></returns> ''' <remarks></remarks> <Extension()> _ Public Function ToCountryDateTime(ByVal dtSystem As DateTime) As DateTime Dim cstZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(SHOPUNT.DB.SysConfig.GetSysConfig("DefaultTimeZone")) Dim localZone As TimeZoneInfo = TimeZoneInfo.Local Dim cstTime As DateTime = TimeZoneInfo.ConvertTime(dtSystem, localZone, cstZone) Return cstTime End Function ''' <summary> ''' 將使用者輸入的時間轉為系統時間 ''' </summary> ''' <param name="dtCountry"></param> ''' <returns></returns> ''' <remarks></remarks> <Extension()> _ Public Function ToSystemDateTime(ByVal dtCountry As DateTime) As DateTime Dim cstZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(SHOPUNT.DB.SysConfig.GetSysConfig("DefaultTimeZone")) Dim localZone As TimeZoneInfo = TimeZoneInfo.Local Dim sysTime As DateTime = TimeZoneInfo.ConvertTime(dtCountry, cstZone, localZone) Return sysTime End Function End Module使用上 只要
List<DB.Member> listOfMember = new List<DB.Member>()
{ new DB.Member(15), new DB.Member(20), new DB.Member(25), new DB.Member(30) };
// Exists: 單純看有無符合條件的資料
bool IsMemberExists = listOfMember.Exists(x => x.Email == "darren@acaciaco.com");
// FindIndex: 找出第一個符合條件的 index,找不到傳回 -1
int index = listOfMember.FindIndex(x => x.Email == "darren@acaciaco.com");
// Find: return 第一個符合條件的object, 找不到傳回 null
DB.Member objMember = listOfMember.Find(x => x.Email.Contains("acaciaco.com"));
// FindAll: return 所有符合條件的objects
List<DB.Member> listOfMember2 = listOfMember.FindAll(x => x.Email.Contains("acaciaco.com"));
Dim listOfMember As New List(Of DB.Member)() From { _
New DB.Member(15), New DB.Member(20), New DB.Member(25), New DB.Member(30) }
' Exists: 單純看有無符合條件的資料
Dim IsMemberExists As Boolean = listOfMember.Exists(Function(x) x.Email = "darren@acaciaco.com")
' FindIndex: 找出第一個符合條件的 index,找不到傳回 -1
Dim index As Integer = listOfMember.FindIndex(Function(x) x.Email = "darren@acaciaco.com")
' Find: return 第一個符合條件的object, 找不到傳回 Nothing
Dim objMember As DB.Member = listOfMember.Find(Function(x) x.Email.Contains("acaciaco.com"))
' FindAll: return 所有符合條件的objects
Dim listOfMember2 As List(Of DB.Member) = listOfMember.FindAll(Function(x) x.Email.Contains("acaciaco.com"))