MVC :: InvalidCastException When Posting Address Data To Action?

May 7, 2010

I have a Person class with an Address property. The Address contains a Country property of type Country which in turn has a CountryCode property of type string, as follows:

Person.Address.Country.CountryCode

I have a select element on the page with a name of "Country.CountryCode". With MVC 1 this was bound perfectly to the CountryCode property of Country. In MVC 2 however, I get the following error when the page is posted back:

[Code].....

View 9 Replies


Similar Messages:

Posting HTML In An MVC Action?

May 7, 2010

So I have a form with a text area on it, and I need to post it. I can't encode it (as far as I know) client side, prior to submit, and it causes the yellow screen of death before reaching the HttpPost action handler.

View 4 Replies

MVC :: Unable To Redirect To Action When Posting With Json?

Nov 8, 2010

I originally have the question posted here, but I need as many eyes as possible on it.Essentially, I'm having issues redirecting to an action in mvc2 when working with JSON data. I post a stringified JSON object to an action and the action in turn redirects as needed. It worked previously when using form fields, but not when I'm posting JSON. To get posted JSON objects to properly bind to parameters objects in MVC, I'm taking advantage of the JsonValueProviderFactory class from MVC2Futures/MVC3Beta.Why is this occuring? The jQuery ajax call is telling the server "I'm giving you json, I expect html in return" and all actions pointed to via RedirectToAction calls are structured in a similar manner. I instead get stuck in a loop, continually hitting the originally requested action, with a prompt to reenter authorization information to boot! It seems lose authentication/authorization information in the process.The linked question on

View 4 Replies

MVC :: Posting List Of Checked Items To Controller Action Using JQuery Post?

Feb 16, 2011

I got a list of checkboxes on my form, and a jquery script that catch a button click to get all the selected items (in an array) and post to a controller action.

This is my script: (yes A, looked at your sample but cannot get this to work)

[Code]....

That alert will print out correctly (like 1,3,5).

However when the above post hit my controller action, "selectedInvestments" are null, which I can't figure out why (back to my tekpub jquery videos, can't go on like this)

[Code]....

View 3 Replies

"Failed To Load Source" Posting To MVC2 Action With JQuery

Sep 19, 2010

I am trying to save user feedback by using jquery to post to an action however i am getting the error message "Failed to load source for: http://www.something.com/feedback/savefeedback" this code works fine on localhost but not when put on my shared hosting, this doesnt just affect this query post but also at least one other.

below i have the route from the global.ascx, the action int the FeedBackController and the query that does the post.

routes.MapRoute(
"FeedBack", // Route name
"FeedBack/{action}", // URL with parameters [code]....

View 9 Replies

Forms Data Controls :: Getting 'System.InvalidCastException' When Assigning A Label Color Via Field Value?

Jan 25, 2010

I have a very simple FormView that has several fields on it. There is a field that either returns a "1" or "0" based on conditions in the database. If the value is "1", I want to leave the label control as is (normal font, in black). However, if the value is "0" I want to change the font to bold and change the forecolor to red. Simple, right?

I am able to change the font-bold property using the code below, but if I use the code to attempt to change the font color, I get the following error message for this line:

An exception of type 'System.InvalidCastException' occurred in App_Web_hoge3m1x.dll but was not handled in user code

Additional information: Specified cast is not valid.

[Code]....

View 2 Replies

System.InvalidCastException Iterating Through Viewdata

Jan 19, 2011

System.InvalidCastException iterating through Viewdata

I need to replace the code
"<%=Html.DropDownList("Part", (SelectList)ViewData["Parts"])%>"
for dropdown in the following manner for some reason.
<% foreach (Hexsolve.Data.BusinessObjects.HSPartList item in (IEnumerable)ViewData["Parts"])
{ %>
">
<%=item.PartName %>
<%=item.IssueNo %>
<% } %>

I am getting error converting SelectedList to IEnumerable) Error: Unable to cast object of type 'System.Web.Mvc.SelectList' to type 'System.Collections.Generic.IEnumerable`1[Hexsolve.Data.BusinessObjects.HSPartList]'. Is this the right way to iterate through viewdata[].

View 1 Replies

SQL Reporting :: InvalidCastException When Going To Second Page Of Report

Aug 12, 2010

Using SSRS 2000 (SP2) - I have several reports that come up fine when displaying the first page. However, upon hitting the arrow in the ReportViewer to move to page 2 (or the last page, doesn't matter) , I get a "Reporting Services Error":

An unexpected error occurred in Report Processing. (rsInternalError)

Specified cast is not valid.I'm going to include below the point in the log at which the error shows up - something to do with GetChunkPointerAndLength... does anyone know what can cause this, and what the workaround or solution might be?

Here's the log info:

w3wp!chunks!3d4!08/12/2010-15:50:53:: e ERROR: GetChunkPointerAndLength: System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
w3wp!library!3d4!08/12/2010-15:50:53:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String& mimeType)
at Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.Library.SessionReportItem.GetImage(String imageId)
at Microsoft.ReportingServices.Library.RSService.InternalGetReportImageLive(ClientRequest session, CatalogItemContext itemContext, String imageId)
at Microsoft.ReportingServices.Library.RSService.InternalGetReportImage(ClientRequest session, CatalogItemContext itemContext)
at Microsoft.ReportingServices.Library.RSService.GetReportImage(ClientRequest session, CatalogItemContext itemContext)
--- End of inner exception stack trace ---
w3wp!webserver!3d4!08/12/2010-15:50:58:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.InvalidCastException: Specified cast is not valid.
w3wp!library!3d4!08/12/2010-15:51:06:: i INFO: Call to RenderNext( '/MasterReconciliationByType/WillCallwCC' )
w3wp!chunks!3d4!08/12/2010-15:51:06:: e ERROR: GetChunkPointerAndLength: System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
w3wp!processing!3d4!08/12/2010-15:51:06:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String& mimeType)
at Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(GetReportChunk A_0, CreateReportChunk A_1, Hashtable& A_2, a& A_3, Boolean& A_4)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
--- End of inner exception stack trace ---
w3wp!webserver!3d4!08/12/2010-15:51:11:: e ERROR: Reporting Services error Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.InvalidCastException: Specified cast is not valid.
w3wp!library!c3c!08/12/2010-15:51:51:: i INFO: Call to RenderNext( '/MasterReconciliationByType/WillCallwCC' )
w3wp!chunks!c3c!08/12/2010-15:51:51:: e ERROR: GetChunkPointerAndLength: System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
w3wp!processing!c3c!08/12/2010-15:51:51:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String& mimeType)
at Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(GetReportChunk A_0, CreateReportChunk A_1, Hashtable& A_2, a& A_3, Boolean& A_4)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
--- End of inner exception stack trace ---
w3wp!webserver!c3c!08/12/2010-15:51:56:: e ERROR: Reporting Services error Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.InvalidCastException: Specified cast is not valid.
w3wp!session!c3c!08/12/2010-15:52:06:: i INFO: LoadSnapshot: Item with session: vrfg4l451fvetg55mqr3zp45, reportPath: /MasterReconciliationByType/WillCallwCC, userName: MASTER
sexec not found in the database
w3wp!library!c3c!08/12/2010-15:52:06:: i INFO: Call to RenderFirst( '/MasterReconciliationByType/WillCallwCC' )
w3wp!library!c3c!08/12/2010-15:52:11:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
w3wp!webserver!c3c!08/12/2010-15:52:11:: i INFO: Processed report. Report='/MasterReconciliationByType/WillCallwCC', Stream=''
w3wp!chunks!c3c!08/12/2010-15:52:11:: e ERROR: GetChunkPointerAndLength: System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
w3wp!library!c3c!08/12/2010-15:52:11:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String& mimeType)
at Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.Library.SessionReportItem.GetImage(String imageId)
at Microsoft.ReportingServices.Library.RSService.InternalGetReportImageLive(ClientRequest session, CatalogItemContext itemContext, String imageId)
at Microsoft.ReportingServices.Library.RSService.InternalGetReportImage(ClientRequest session, CatalogItemContext itemContext)
at Microsoft.ReportingServices.Library.RSService.GetReportImage(ClientRequest session, CatalogItemContext itemContext)
--- End of inner exception stack trace ---
w3wp!webserver!c3c!08/12/2010-15:52:16:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.InvalidCastException:
Specified cast is not valid.
w3wp!library!1e50!08/12/2010-15:52:23:: i INFO: Call to RenderNext( '/MasterReconciliationByType/WillCallwCC' )
w3wp!chunks!1e50!08/12/2010-15:52:23:: e ERROR: GetChunkPointerAndLength: System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
w3wp!processing!1e50!08/12/2010-15:52:23:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String& mimeType)
at Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(GetReportChunk A_0, CreateReportChunk A_1, Hashtable& A_2, a& A_3, Boolean& A_4)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
--- End of inner exception stack trace ---
w3wp!webserver!1e50!08/12/2010-15:52:28:: e ERROR: Reporting Services error Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.InvalidCastException: Specified cast is not valid.
w3wp!session!3d4!08/12/2010-15:56:51:: i INFO: LoadSnapshot: Item with session: gavqaq55mhxzux45xiaulrfe, reportPath: /MasterReconciliationByType/WillCallwCC, userName: MASTER
sexec not found in the database
w3wp!library!3d4!08/12/2010-15:56:51:: i INFO: Call to RenderFirst( '/MasterReconciliationByType/WillCallwCC' )
w3wp!library!3d4!08/12/2010-15:56:54:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
w3wp!webserver!3d4!08/12/2010-15:56:54:: i INFO: Processed report. Report='/MasterReconciliationByType/WillCallwCC', Stream=''
w3wp!chunks!3d4!08/12/2010-15:56:54:: e ERROR: GetChunkPointerAndLength: System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
w3wp!library!3d4!08/12/2010-15:56:54:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String& mimeType)
at Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String name, ReportChunkTypes type, String& mimeType)
at Microsoft.ReportingServices.Library.SessionReportItem.GetImage(String imageId)
at Microsoft.ReportingServices.Library.RSService.InternalGetReportImageLive(ClientRequest session, CatalogItemContext itemContext, String imageId)
at Microsoft.ReportingServices.Library.RSService.InternalGetReportImage(ClientRequest session, CatalogItemContext itemContext)
at Microsoft.ReportingServices.Library.RSService.GetReportImage(ClientRequest session, CatalogItemContext itemContext)
--- End of inner exception stack trace ---
w3wp!webserver!3d4!08/12/2010-15:56:59:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.InvalidCastException: Specified cast is not valid.
w3wp!library!3d4!08/12/2010-15:59:39:: i INFO: Call to RenderFirst( '/MasterReconciliationByType/SalesDetailAll' )
w3wp!chunks!3d4!08/12/2010-15:59:41:: e ERROR: GetChunkPointerAndLength: System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
w3wp!reportrendering!3d4!08/12/2010-15:59:41:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown., ; Info: Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. ---> System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlDataReader.GetSqlByte(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetByte(Int32 i)
at Microsoft.ReportingServices.Library.ChunkStorage.GetChunkPointerAndLength(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, Object& chunkPointer, Int64& chunkLength, String& mimeType, ChunkFlags& chunkFlags)
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream.OpenReadStream()
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SqlChunkReadStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateReadStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String& mimeType)
at Microsoft.ReportingServices.Library.ReportSnapshot.GetReportChunk(String name, ReportChunkTypes type, String& mimeType)

View 3 Replies

SQL Server :: System.InvalidCastException: Specified Cast Is Not Valid?

Jul 25, 2010

I've got a list of teams which seperate into different leagues. I'm trying to show the user the league that they are in and show it from where they are in the league. This is the error I'm recieving:Specified cast is not valid. Description:An unhandled exception occurred during the execution of the current web request.Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.InvalidCastException: Specified cast is not valid.Source Error:

[Code]....

Source File: E:WebSitesohuntControlsLeagueWidget.ascx.vb Line: 24 Stack Trace:

[Code]....

This is my page code:

[Code]....

Code-behind:

[Code]....

View 9 Replies

Invalidcastexception - Can't Access Custom Membership User In Code

Feb 2, 2010

I've wrote a custom membership provider and a custom membership user. So far so good, I can create users / login etc, but when I try to access the custom membership user in code like this;

Code:
Public Function GetOpportunities() As IQueryable(Of Opportunity)
'Dim p As CiseroMembershipProvider = System.Web.Security.Membership.Provider
'Dim _User = p.GetUser(System.Web.HttpContext.Current.User.Identity, True), CiseroMembershipUser
Dim _User As Curve.CiseroMembershipUser = Nothing
_User = System.Web.Security.Membership.GetUser() 'Dim _CurveUser As New CiseroMembershipUser
'Return From o In Me.ObjectContext.Opportunities Where o.ClientID = User.ClientID
Return From o In Me.ObjectContext.Opportunities Where o.ClientID = _
_User.ClientID Order By o.ModifiedDate Descending
End Function
I get this error:

Unable to cast object of type 'CustomMembershipUser' to type 'Curve.CustomMembershipUser'. When I put a quickwatch on the object System.Web.Security.Membership.GetUser() it is of type CustomMembershipUser. The quickwatch window generates the text DirectCast(System.Web.Security.Membership.GetUser(), CustomMembershipUser) when I click onto the properties, but reevaluating the expression raises the error.

View 3 Replies

Security :: Membership.GetUser(object ProviderUserKey) Throws InvalidCastException In .NET 2.0?

Jan 10, 2011

I have an application that has been running for about 1.5 years. Suddenly, I got a bug report that the support team are receiving an InvalidCastException in the User ManagerUnable to cast object of type 'System.Guid' to type 'System.String'. The line this appears to be happening on is:

string queryStringID = Session["EditID"].ToString();
Guid providerUserKey =
new
Guid(queryStringID)
MembershipUser user =
Membership.GetUser(providerUserKey);
<--- here

This is a rather strange error as the value of the queryStringID is in fact a Guid generated by the Membership.GetUser(UserName).ProviderUserKey on the previous page. It doesn't seem to make any sense at all. I'm using the built-in SqlMembershipProvider with no changes. It's as if it isn't picking up that it should be using the overloaded function Membership.GetUser(object providerUserKey)Anyone else ever seen anything like this? I wouldn't normally post here unless I was absolutely stuck but I can't seem to find any relevant information by Googleing this one. Also, it's just started doing this. There was never an issue before. Very strange

View 5 Replies

Data Controls :: Data Truncated When Posting Form Data From Server Side

Aug 28, 2013

I am posting data to an external website server side. This works when the data parameter is less than about 640 characters. The data gets truncated beyond around 640 characters. The code I'm using is below:

Function PostData(TransId As String, QuoteNumber As String, data As String) As String
Dim url As String = "http://localhost:49608/test2.aspx"
Dim encoding As New ASCIIEncoding()
Dim request As WebRequest = WebRequest.Create(url)
request.Method = "POST"
Dim postData As String = "WAA_PACKAGE=Vendor&WAA_FORM=blahblaj&WAA_HTML3CLASS=nHTML&VendorID=ENG3135&"

[code]....

View 1 Replies

Usercontrol Not Posting Data?

Jan 13, 2011

I have a simple Usercontrol that has an image and textbox. This has just been really difficult to use, and I am wondering what I am doing wrong.

[Code]....

The first problem is the in the Page_Load procedure. It seems that if I create this control dynamically, the Page_Load is called before the image or textbox are created making it impossible to intiantiate the objects. Since this was so difficult, I just created 5 of these usercontrol and put them on the page.

[Code]....

I can now set the image src from my code, but when I click submit, there is no information about the textbox contents (as well as the image contents). The information shows in the browser, but it is not returned to the server code behind section of my code.

[Code]....

View 2 Replies

MVC :: Why Synchronous Action Wasn't Executed Until Asynchronous Action Completed

Nov 29, 2010

I'm implement Comet in Asp.net MVC, I used timer to keep Async request in server, Async request will complete when timer elapsed 1 minute and response to client (to avoid 404 error) and then reconnect to Async Controller. I also wanna execute some Synchronous action during Async request was holding, but the problem is: When an Async action was executed and hold by using timer, the Sync Action wasn't called until Async action (comet long-live request) completed. I did test with firefox 3.6 many times, but the result is the same, so strange, Do you know why ? I have a sub some questions : To implement comet, using timer (response after some minutes elapsed) or thread (response after several time sleeping thread) to hold async request, which is better?

View 1 Replies

MVC :: Redirect Action Not Working In Jqgrid Action Results Method

Mar 23, 2011

I am desiging a master and details page from a search page..user can search for something and I need to display the result in jqgrid if the result has more than 1 row or record.. if the result is just one record then i have to directly send then to details page by skiping grid page... I do have an action method for results page and one more action method for Jqgrid data..i am trying to check the row count for the database result and trying to redirect to details action results..but its not working at all..and showing an empty jqgrid..

[Code]....

View 9 Replies

Test That A Controller Action Simply Returns A Link To Another Action?

Apr 29, 2010

Lets say I have a simple controller for ASP.NET MVC I want to test. I want to test that a controller action (Foo, in this case) simply returns a link to another action (Bar, in this case).How would you test TestController.Foo? (either the first or second link)

My implementation has the same link twice. One passes the url throw ViewData[]. This seems more testable to me, as I can check the ViewData collection returned from Foo(). Even this way though, I don't know how to validate the url itself without making dependencies on routing.The controller:

public class TestController : Controller
{
public ActionResult Foo()[code].....

View 1 Replies

Posting XML Data With Some Fields Using HttpWebrequest?

Oct 29, 2010

I have a problem posting xml Data using HttpWebRequest..

The server returns Internal error..

I want to simulate a simple Form with Method=Post. The form have three fields. Two for credentials and the third one for Posting XML. Here is the sample HTML which i want to simulate using HttpWebRequest..

<form action="https://myurl.com/samplepage.cfm" method="post" >
integration_id<input type="text" name="integration_id" value="id" /><br />
integration_pwd<input type="text" name="integration_pwd" value="pwd" /><br />
<textarea name="hrxml" style="height: 404px; width: 593px">
<?xml version="1.0" encoding="UTF-8"?>
<BackgroundCheck account="test" userId="test" password="test">
<BackgroundSearchPackage>
<ReferenceId>
<IdValue>12345678</IdValue>
</ReferenceId>
<PersonalData>
<PersonName>
<GivenName>TEST</GivenName>
<FamilyName primary="undefined">TEST</FamilyName>
</PersonName>
<DemographicDetail>
<GovernmentID countryCode="US" issuingAuthority="SSN">00000000000000</GovernmentID>
<DateOfBirth>1901-01-01</DateOfBirth>
</DemographicDetail>
</PersonalData>
</BackgroundSearchPackage>
</BackgroundCheck>

View 1 Replies

Posting XML Data With Some Fields Using .net HttpWebRequest?

Oct 27, 2010

I have a some problem while Posting xml data Using HttpWebRequest. Actually I want to Post 3 Form variables

2 of them are for credential and the third one is for XML data to an api, The api will authenticate and will process the xml data, and will return success if no error found.

Here is what there documentation says.

The data will be passed to the gateway via an HTTPS FORM post and a string value of "success" will be returned upon successful receipt of the data. Three total FORM variables will be posted, two of which will contain credentials, and the third will contain the HR-XML data. A string value of "error" will be returned if the posting fails for any reason.

Form Fields integration_field1 = 1234, integration_field2=2345pwd, hrxml=form field containing the HR-XML order (string)

Here is what I have Coded..

[Code].....

View 1 Replies

MVC :: Posting Data From A Collection Of Items?

Dec 2, 2010

I have a collection of items in a model that I am looping through to display a very simple editable grid like this

[Code]....

but the values typed in in the textboxes do not appear to be anywhere in the model post data , does anyone have any pointers , this mustbe a common scenario and just cant find solution.

View 2 Replies

Web Forms :: Posting Some Data Programmatically?

Jan 31, 2010

I have an aspx page like this:

[Code]....

Well, as you see clicking the button will redirect user to "http://www.somesite.com/somewhere" and also will post three specified fields as data to that page; which can be retrieved using Request.Form["field#"] at destination.

I want to do all these works using C# or VB.NET code, because I don't want my hidden fields to be accessible to users (who may use firebug or something similar).

View 10 Replies

MVC :: Create Action Not Carrying Model Across To Http Action

Jun 12, 2010

My httppost action doesnt seem to have received my model. The code is below;

[Code]....

i put a breakpoint on the line; return RedirectToAction("Error", "Dashboard"); and i found that appQualif carried no values whatsoever from the form i submitted..

View 5 Replies

WCF / ASMX :: Exposing MEX Endpoint Address - WCF Test Page Shows The WSDL Address Wrongly

Apr 15, 2010

I have managed to expose the MEX endpoint of my WCF service and I can access it with the address like [URL] (example) and get the WDSL. So no problem there.

However, my WCF test page shows the address wrongly by using the server's name instead of the DNS name. And if I click on the link on the test page it won't work (can't get WSDL).

The WCF test page looks like this:

MyService Service

You have created a service.

To test this service, you will need to create a client and use it to call the service.

[URL]

The WCF service is hosted in IIS6. I would like to have a test page with the correct WSDL address so users can see the WSDL quickly in the browser just by clicking on the WSDL address.

In short: How can I change the MyServerName to inter.mycompany.com on the WCF test page? Can this be specified somewhere in the Web.config?

View 3 Replies

MVC :: Posting Data From Partial View To Controller

Jan 13, 2011

Im having trouble with posting data from a view that also contains a partialview. Im using a viewmodel that has 2 objects in it. The data that comes from the view is correct and fine, but the data that im trying to get from the partialview is null, or rather the object is null. The partialview doesnt contain that much, the user can check/uncheck some checkboxes and thats it. Heres how the partialview looks like

[Code]....

And heres the View

[Code]....

View 3 Replies

MVC :: Jquery Tabs And Posting Its Data To Controller

May 14, 2010

I am using asp.net mvc 1.0. In this I have to create an UI for modifying the profile of the user. Now this modfiy profile will contain jquery tabs. and each jqeury tab will show some results such as user's personel information, professional info, etc on seperate tabs. I also want to give user ability to modify the fields and save this modified data. I am just not getting any idea how to do that. I have searched on internet for various jquery examples. most of them are just showing data to user by creating some partial views. Also i am not getting exactly how this functionality can be achieved through ajax on click of button.

View 1 Replies

Javascript - Posting Data To Another Domain Through Code-behind?

Aug 30, 2010

Since we can't post data to cross domains, I want to post the data to my aspx page and a code-behind code will take the data and submit to cross domain (which is not being operated by me, so I don't have permission to modify source code for jsonp) and also the website to which I pass my post data is also returning a cookie which includes shopping cart info and I need to store it on my local browser cache as well.

What I know is I need to use WebResponse and WebRequest classes for that manner.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved