Hi WombatEd, if you open up the site.master and edit the line that has EnablePartialRendering="true" and change it to false the real error will show up [:)]
Dynamic DataEnablePartialRendering
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
I've stumbled upon a work-around, but I don't know why it works. I was getting these errors whenever the table I was editing (Table A) had a FK pointing to a VARCHAR(8) field in a second table (Table B). The VARCHAR(8) field in Table B was indexed unique,
but was not the PK. Luckily, I had a third table, which had a one-to-one relationship to Table B, with the third table's PK being the same VARCHAR. So I changed all the FKs to point to the third table.
(Please folk's, not TOO many flames about this structure; I inherited it.)
Thanks, Steve, for all your efforts. If this makes any sense at all to you, I'm all ears.
I am having the same problem, namely, changing in Site.Master EnablePartialRendering="true" throws PageRequestManagerServerErrorException when navigating through the tables.
My DB is full with GUIDs. Is there a solution to this issue?
I was probably not very specific in my post. I am using Entity Framework, with .Net version 4, Visual Studio 2010.
I have generated a DynamicaData (DD) Web Site project from a Database (SQL Server 2008) in which almost every table has a Guid as Primary Key. I have introduced just one CalendarExtender from AjaxControlToolKit (you can guess that I am a beginner in DD).
In Global.asax file I have introduced (in RegisterRoutes routine):
DefaultModel.RegisterContext(typeof(LaudeaEntities), new ContextConfiguration() { ScaffoldAllTables = true });
then, while browsing through the records of all tables with more than 10 records, the hit of "Next page" at the bottom of the record list, to see the next 10 records set, I get the JS error:
Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid
Well, the error is written in Spanish "La cadena de entrada no tiene el formato correcto.". I think that is the correct English translation, but I could be wrong.
Contributor
2385 Points
1002 Posts
PageRequestManagerServerErrorException: Specified cast is not valid.
Jan 27, 2010 05:56 PM|WombatEd|LINK
Dynamic Data newbie problem:
On my edit page, when I click Update, I get this error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid.
My debugger says it's happening in this JavaScript function:
Sys$WebForms$PageRequestManager$_endPostBack(error, executor, data)
When the Edit page opens, one of my foreign key dropdowns doesn't have a selected value.
Any clues?
TIA
All-Star
17916 Points
5681 Posts
MVP
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jan 28, 2010 03:19 AM|sjnaughton|LINK
Hi WombatEd, if you open up the site.master and edit the line that has EnablePartialRendering="true" and change it to false the real error will show up [:)]
Dynamic Data EnablePartialRendering
Always seeking an elegant solution.
Contributor
2385 Points
1002 Posts
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jan 28, 2010 11:09 AM|WombatEd|LINK
Thanks, sjnaughton.
That gets me to an error page that tells me the same thing, and I have no idea what it is that is being cast as what.
All-Star
17916 Points
5681 Posts
MVP
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jan 28, 2010 11:38 AM|sjnaughton|LINK
Hi WombatEd, are you using GUID UniqueIdentifiers in your DB?
Dynamic Data
Always seeking an elegant solution.
Contributor
2385 Points
1002 Posts
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jan 28, 2010 02:53 PM|WombatEd|LINK
No.
I've stumbled upon a work-around, but I don't know why it works. I was getting these errors whenever the table I was editing (Table A) had a FK pointing to a VARCHAR(8) field in a second table (Table B). The VARCHAR(8) field in Table B was indexed unique, but was not the PK. Luckily, I had a third table, which had a one-to-one relationship to Table B, with the third table's PK being the same VARCHAR. So I changed all the FKs to point to the third table.
(Please folk's, not TOO many flames about this structure; I inherited it.)
Thanks, Steve, for all your efforts. If this makes any sense at all to you, I'm all ears.
All-Star
17916 Points
5681 Posts
MVP
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jan 28, 2010 06:39 PM|sjnaughton|LINK
That would explain it [:)]
Linq to SQL does need it to be a PK for the relationship to work.Dynamic Data
Always seeking an elegant solution.
None
0 Points
3 Posts
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jun 13, 2013 05:59 AM|ivzp|LINK
I am having the same problem, namely, changing in Site.Master EnablePartialRendering="true" throws PageRequestManagerServerErrorException when navigating through the tables.
My DB is full with GUIDs. Is there a solution to this issue?
Thanks in advance,
Ivar
Dynamic Data
All-Star
17916 Points
5681 Posts
MVP
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jun 13, 2013 08:41 AM|sjnaughton|LINK
Hi ivzp, are you using Linq to SQL or Entity Framework? and when you say
do you mean clicking on foreign key and child links?Dynamic Data
Always seeking an elegant solution.
None
0 Points
3 Posts
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jun 13, 2013 11:52 AM|ivzp|LINK
I was probably not very specific in my post. I am using Entity Framework, with .Net version 4, Visual Studio 2010.
I have generated a DynamicaData (DD) Web Site project from a Database (SQL Server 2008) in which almost every table has a Guid as Primary Key. I have introduced just one CalendarExtender from AjaxControlToolKit (you can guess that I am a beginner in DD).
In Global.asax file I have introduced (in RegisterRoutes routine):
In Site.Master I am using:
Everything works ok so far. If I change
then, while browsing through the records of all tables with more than 10 records, the hit of "Next page" at the bottom of the record list, to see the next 10 records set, I get the JS error:
Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid
Well, the error is written in Spanish "La cadena de entrada no tiene el formato correcto.". I think that is the correct English translation, but I could be wrong.
Dynamic Data
None
0 Points
3 Posts
Re: PageRequestManagerServerErrorException: Specified cast is not valid.
Jun 13, 2013 12:04 PM|ivzp|LINK
Actually I succeded in getting the English description of the exception:
Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.
Please, excuse me about the confusion.
Ivar
Dynamic Data