CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > starter_kits_and_source_projects..text_blogs Tags:
Item Type: Date Entered: 8/20/2004 2:02:04 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 294 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
"Edoode" <>
NewsGroup User
Error: String was not recognized as a valid DateTime8/20/2004 2:02:04 PM

0

Hi,

I'm running an unmodified dotText latest version on a Windows2003 server. Whenever I click on a 'monthly archive' link I receive the error 'String was not recognized as a valid DateTime.' An example URL is http://blog.swiftalpha.com/archive/2004/07.aspx

The server is configured to use the English regional settings. The web.config reads '<globalization culture="en-US" />' as expected. I've looked around for a solution but didn't find one.

Anyone?

-Edo


Swords don't run out of ammo

http://blog.swiftalpha.com
"grant" <>
NewsGroup User
Re: Error: String was not recognized as a valid DateTime8/20/2004 5:01:26 PM

0

In your web.config, search for a line containing ArchiveMonth in the HttpHandlers section.

What is that line?

Should be

<HttpHandler pattern = "/archive/\d{4}/\d{1,2}\.aspx$" controls = "ArchiveMonth.ascx" />


Typically this is related to a globalization issue. I would also just double check that (but it also looks less likely that that's the issue since your daily archive pages pass dateformat muster).

Can you turn off custom exceptions and post the full exception with code lines/stack?
I'm Idaho!
"Edoode" <>
NewsGroup User
Re: Error: String was not recognized as a valid DateTime8/20/2004 7:33:06 PM

0

Hi,

thanks for the reply.

Web.config reads:
<HttpHandler pattern = "^(?:/archive/\d{4}/\d{1,2}\.aspx)$" controls = "ArchiveMonth.ascx" />

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
System.DateTime.ParseExact(String s, String[] formats, IFormatProvider provider, DateTimeStyles style) +106
Dottext.Framework.Util.WebPathStripper.GetDateFromRequest(String uri, String archiveText) +164
Dottext.Web.UI.Controls.ArchiveMonth.OnLoad(EventArgs e) +61
System.Web.UI.Control.LoadRecursive() +35
.....
System.Web.UI.Page.ProcessRequestMain() +731

I've checked globalisation settings, it all seems in order.

Grt,

-Edo

Swords don't run out of ammo

http://blog.swiftalpha.com
"Edoode" <>
NewsGroup User
Re: Error: String was not recognized as a valid DateTime8/20/2004 9:10:25 PM

0

Hi,

After doing some looking around in the code I changed one line in Dottext.Framework.Util.WebPathStripper

I replaced the private static readonly string[] dateFormats with:

{"yyyy\\/MM\\/d","yyyy\\/MM\\/dd","yyyy\\/M\\/dd","yyyy\\/M\\/d","yyyy\\/MM","yyyy\\/M"};

This solved my problem. I only wonder why noone else has it?!?

Grt,

-Edo
Swords don't run out of ammo

http://blog.swiftalpha.com
"nthillaiarasu"
NewsGroup User
Re: Error: String was not recognized as a valid DateTime11/2/2007 9:52:51 AM

0

Hi i also had the same problem my applications will be running in localhost but when i use IIS or apache it will throw the error  String was not recognized as a valid DateTime.After a lot of search i finally got the solution

just declare ur date field as

 

 System.DateTime str_date=DateTime.Parse(sel3.Text,System.Globalization.CultureInfo.CreateSpecificCulture("en-AU").DateTimeFormat);

I hope it will work fine in ur application

Thanks in Advance,

N.ThillaiArasu,

http://nthillaiarasu.blogspot.com
 


N.ThillaiArasu
"lordvegeta84"
NewsGroup User
Re: Error: String was not recognized as a valid DateTime4/20/2009 9:04:51 PM

0

 Where do you find that code?? i have an aplication that dos not run because this error..

 

6 Items, 1 Pages 1 |< << Go >> >|


Free Download:













strange error in the ide which is ignored by the compiler

visual studio 2005 vs. visual studio 2005 beta 2

where is the "immediate window"?

run reflector inside vs2005 ide

stressing .net application

what is "source control"?

auto-display of syntax errors in c#

re:display the status of the event receiving from the ocx in asp:textbox

custom control: using connectionstringeditor in smart tag crashes visual studio

getting set up

generate code documentation xml for asp.net 2.0 website

crazy question

excluding folder or files from compilation in vs 2005

msdn aa and vs 2005 beta 2

feature request: regular expression gallery

recreate original toolbox in vs2005

whidbey on virtual pc 2004

visual studio with xp x64 pro questions

the connectionstring property has not been initialized.

design-time support questions

wire up page events

how to create a windows installer of a asp.net website

webbrowser element types from vb.net?

online image editor sample

sqlbulkcopy & problem: the process cannot access the file '' because it is being used by another process.

problem with web references when adding web mothods in application diagram.

where can i get beta 2?

can't find "installation folder" dialog in web setup project

how to add a web reference?

project references not recognised during compilation

(ctrl+shift+f) for a website

frontpage extensions required?

creating an aspx file that produces something different than html

solnexplcontextmenu from automation samples

web user control and databindings window

how to remove project in vs 2005

how to make the file encoding to be utf-8 by default when adding new item in vs2005

missing web development options on vs2005

table adapter configuration wizard

can i remap f10 in vs2005 to another key?

new project wizard

cannot choose asp.net control in toolbox of vs2005

cannot open solution file (*.sln) in visual studio 2005

starting web applications in visual studio 2005 and asp.net v 2.0

intellisense only working when i press on alt+right arrow

reverse engineering tools

how to add installer on windows service application ?

visual studio express upgrade to visual studio 2005 pro

web development using asp 2.0

visual studio 2005 has empty toolbox

   
  Privacy | Contact Us
All Times Are GMT