Hello,
I don't think this is a dnn thing, but more of a general programming isssue. I have been having a weird exception that shows up occassionally. I have a custom module for user registration. The exception is:
ModuleId: 811
ModuleDefId: 136
FriendlyName: New Student Registration
ModuleControlSource: DesktopModules/Registration/StudentRegister.ascx
AssemblyVersion: 04.09.02
PortalID: 1
PortalName: My Portal
UserID: -1
UserName:
ActiveTabID: 185
ActiveTabName: Student_Register
RawURL: /tabid/185/ctl/StudentRegistration/mid/811/default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://MyDomain/tabid/185/ctl/StudentRegistration/mid/811/default.aspx
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 954d4703-3f0a-4da0-b99a-e35f8e4367ef
InnerException: Input string was not in a correct format.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Number.StringToNumber
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Input string was not in a correct format. ---> System.formatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberformatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberformatInfo info) at MyCompany.Modules.Registration.StudentRegister.RegisterStudent() --- End of inner exception stack trace ---
I can't recreate the error, and I haven't seen it on Internet Explorer. It shows up when users register using Safari or Firefox. I assume this error shows up when trying to parse a decmial, but there is only one field that uses a decimal and this is how I'm passing it in.
Dim gpa As Decimal = Null.NullDecimalIf Decimal.TryParse(Trim(txtGPA.Text), gpa) Then
.GPA = gpa
Else
.GPA = Null.NullDecimal
End If
Any ideas, is there something I need to check when validating this that I'm missing?
Thanks for any help.
Gregg