Server Error in '/' Application.

Exception of type 'System.OutOfMemoryException' was thrown.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error:


Line 504:{
Line 505:    Regex regex = new Regex(pattern, options | RegexOptions.Compiled);
Line 506:    return regex.Replace(input, replacement, 1);
Line 507:}
Line 508:// 替换所有 不区分大小写

Source File: d:\wwwroot\bx.wskmn.com\index.aspx    Line: 506

Stack Trace:


[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
   System.Text.StringBuilder.ToString() +35
   System.Text.RegularExpressions.RegexReplacement.Replace(Regex regex, String input, Int32 count, Int32 startat) +271
   System.Text.RegularExpressions.Regex.Replace(String input, String replacement, Int32 count, Int32 startat) +105
   System.Text.RegularExpressions.Regex.Replace(String input, String replacement, Int32 count) +40
   ASP.index_aspx.ReplaceFirst(String input, String pattern, String replacement, RegexOptions options) in d:\wwwroot\bx.wskmn.com\index.aspx:506
   ASP.<sttr>d__12.MoveNext() in d:\wwwroot\bx.wskmn.com\index.aspx:441
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   ASP.<Site>d__8.MoveNext() in d:\wwwroot\bx.wskmn.com\index.aspx:266
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   ASP.<getsource>d__3.MoveNext() in d:\wwwroot\bx.wskmn.com\index.aspx:198
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   ASP.<PageLoadAsync>d__0.MoveNext() in d:\wwwroot\bx.wskmn.com\index.aspx:152
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Web.UI.<ExecuteTasksAsync>d__3.MoveNext() +363
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Web.UI.<ProcessRequestAsync>d__554.MoveNext() +876


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3535.0