Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. No line numbers in release stack trace

No line numbers in release stack trace

Scheduled Pinned Locked Moved ASP.NET
helpdata-structuresdebuggingtutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Danpeking
    wrote on last edited by
    #1

    Hi, I'm looking into a problem on our website but other than the method I have no way of knowing which control/line number the error refers to. I know it is caused by one of 4 controls where we convert the contents to an int. For example, the code is: private void SomeMethod() { int i = Convert.ToInt32(ddl.SelectedValue); int i2 = Convert.ToInt32(txt.Text); } I think it is being caused by a custom textbox's value returning null. It is an intermittent problem and not something we have been able to recreate. The stack trace is: Input string was not in a correct format System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119 System.Convert.ToInt32(String value) +63 It would be nice to narrow the search down to a particular control and I would like to understand how exactly I can narrow the stack trace error down to a particular line. Can anybody please tell me how this is possible? Thanks

    V 1 Reply Last reply
    0
    • D Danpeking

      Hi, I'm looking into a problem on our website but other than the method I have no way of knowing which control/line number the error refers to. I know it is caused by one of 4 controls where we convert the contents to an int. For example, the code is: private void SomeMethod() { int i = Convert.ToInt32(ddl.SelectedValue); int i2 = Convert.ToInt32(txt.Text); } I think it is being caused by a custom textbox's value returning null. It is an intermittent problem and not something we have been able to recreate. The stack trace is: Input string was not in a correct format System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119 System.Convert.ToInt32(String value) +63 It would be nice to narrow the search down to a particular control and I would like to understand how exactly I can narrow the stack trace error down to a particular line. Can anybody please tell me how this is possible? Thanks

      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      Check which of the lines is returning String.Empty (i.e empty string) as the parameter to Convert.ToInt32() function. Convert.ToInt32(null) will return 0 whereas Convert.ToInt32("") - throws the exception is mentioned. I hope this would help you.

      Castle Rider

      What if I freeze??? Don't forget to breath...

      My: Website | Yahoo Group | Blog Spot

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups