Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 740469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:31:10+00:00 2026-05-14T08:31:10+00:00

I am a c# dev working on some code for a website in vb.net.

  • 0

I am a c# dev working on some code for a website in vb.net. We use a lot of caching on a 32bit iss 6 win 2003 box and in some cases run into OutOfMemoryException exceptions. This is the code I trace it back to and would like to know if anyone else has has this…

Public Sub CreateQueryStringNodes()
    'Check for nonstandard characters'
    Dim key As String
    Dim keyReplaceSpaces As String
    Dim r As New Regex("^[-a-zA-Z0-9_]+$", RegexOptions.Compiled)

    For Each key In HttpContext.Current.Request.Form
        If Not IsNothing(key) Then
            keyReplaceSpaces = key.Replace(" ", "_")
            If r.IsMatch(keyReplaceSpaces) Then
                CreateNode(keyReplaceSpaces, HttpContext.Current.Request(key))
            End If
        End If
    Next

    For Each key In HttpContext.Current.Request.QueryString
        If Not IsNothing(key) Then
            keyReplaceSpaces = key.Replace(" ", "_")

            If r.IsMatch(keyReplaceSpaces) Then
                CreateNode(keyReplaceSpaces, HttpContext.Current.Request(key).Replace("--", "-"))
            End If
        End If
    Next
End Sub

.NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

error:

Exception of type ‘System.OutOfMemoryException’ was thrown. at
Go60505(RegexRunner ) at
System.Text.RegularExpressions.CompiledRegexRunner.Go() at
System.Text.RegularExpressions.RegexRunner.Scan(Regex regex, String
text, Int32 textbeg, Int32 textend, Int32 textstart, Int32 prevlen,
Boolean quick) at System.Text.RegularExpressions.Regex.Run(Boolean
quick, Int32 prevlen, String input, Int32 beginning, Int32 length,
Int32 startat) at System.Text.RegularExpressions.Regex.IsMatch(String
input) at Xcite.Core.XML.Write.CreateQueryStringNodes() at
Xcite.Core.XML.Write..ctor(String IncludeSessionAndPostedData) at
mysite._Default.Page_Load(Object sender, EventArgs e) at
System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:31:10+00:00Added an answer on May 14, 2026 at 8:31 am

    There’s a couple of articles out there that pretty much say avoid using Compiled, it doesn’t really mean what people think it means sometimes. If I understand correctly, using Compiled actually permanently eats up memory for the duration of the application. Since you’re on the web, the application’s lifetime might be fairly long. This was supposed to be fixed/addressed in the 2.0 Framework but it looks like it hasn’t.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have branched some code on my dev machine for an ASP.NET Webforms app.
I'm pretty new to Android dev and still working out a lot of things.
So I'm working with some older code I wrote some time ago. I was
I'm pretty new at this iphone dev stuff and i'm working on some existing
I'm working on some code that will DD a block device over SSH, and
I have some vb.net code which should print out labels using Teklynx LabelView software
I am working on a website http://dev.io-web.com/portfolio.aspx and am having difficulty with the slider
Working on a dev tracker custom PHPBB BBCode but I am having issues with
I am working on Iphone application and new to dev. I am sorry if
I'm working with a centralized CMS on a dev server, the CMS is in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.