Home > Asp Net Unable > Asp.net Unable To Cast Com Object Of Type

Asp.net Unable To Cast Com Object Of Type

Sometimes my application throws an exception saying it cannot find the user control. If your master page is in the same location as your file where your code is, trying to do a comparison (xxx is MasterPage in C#) would naturally produce this error. Jan 27, 2006 12:10 PM|beatniks|LINK I've been getting the same thing. My immediate work around isreload one of the class to server, (it really doesn't matter which class, as long as the classis associate with that particular master page). have a peek here

Apr 20, 2006 12:40 AM|smithsj|LINK I'm wondering if I have a related issue. I'll work with you to try and get this resolved. share|improve this answer answered Apr 5 '13 at 16:23 Constanta 334315 Its working,but some time getting error –Sree Apr 5 '13 at 16:52 add a comment| up vote 0 bsw Last edited by bsw2112; Jul 6th, 2007 at 02:56 PM. http://stackoverflow.com/questions/512064/unable-to-cast-object-of-type-x-to-type-x-asp-net

May 04, 2006 11:53 AM|pquimby|LINK I've been in contact with Microsoft, downloaded and installed the hotfix, and I'm still seeing a problem. Thanks. So I realized that I do not need Inherits anymore. I have experimented the same error that started to happen suddenly.

The KB for the fix has not yet been published, but you can ask for the hotfix for issue 915782. Best wishes, Rosen the Telerik team Instantly find answers to your questions on the new Telerik Support Portal. This is a pretty popular issue, so please do use the 800 number first! Glad it worked. (cough Can I get an up-vote?

Reply craigw7272 Member 131 Points 201 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'. What encryption should I use: Blowfish, Twofish, or Threefish? for a while. get redirected here Reply ScottGu Participant 1840 Points 2004 Posts MicrosoftModerator Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'.

Feb 24, 2006 12:09 AM|ScottGu|LINK Hi Mullery, How are you loading the user-control? Reply cytosoul Member 3 Points 17 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'. if(eventArgument.IndexOf("ReorderColumns")!=-1) { GridTableViewview=(GridTableView)this.Page.FindControl(eventArgument.Split(newchar[]{','})[1]); Is there any chance that eventArgument.Split is returning something like "this" that it would pick up the masterpage reference somehow? May 04, 2006 12:36 PM|JamesChe|LINK Hi Pam, Sorry for that experience.

So if you have not yet tried the patch, it is still worth doing. you could check here Please review the stack trace for more information about the error and where it originated in the code. Instead of your Default inheriting from Web.UI.Page, have the BasePage : Web.UI.Page, and then class Default : BasePage –Leon Sep 22 '11 at 18:49 Not exactly sure what you're Will this hot fix work for my issue in an Addin/Class library project?

If anyone has a sample project that reproduces this error along with steps for reproducing it, please send it to me at [email protected] Reply RyanSmith345 None 0 Points 119 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'. Exception Details: System.InvalidCastException: Unable to cast object of type 'ASP.masterpage_master' to type 'SBHMasterPage'. Thank you, John Reply JamesChe None 0 Points 28 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'.

To enable this, please follow one of the below steps, then request the URL: Add a "Debug=true" directive at the top of the file that generated the error. Mar 20, 2006 11:11 AM|jmhinnen|LINK This isn't the only anomoly I see every now and then. I hopeI have given plenty of details, let me know anything else I can tell you to help. Check This Out once the patch is releasedby Microsoft, we'll upload it to the server." do you have any idea when the hotfix will be officially released?

Apr 19, 2006 10:24 AM|shahj99|LINK If I change the ClassName attribute's value to any name that doesn’t exist in the namespace of my app then how would I be able to I have placed a <%@ Reference %> directive at the top of the page, but a rebuild on the solution is necessary when modify other page content. Big O Notation "is element of" or "is equal" Folder-by-type or Folder-by-feature An idiom or phrase for when you're about to be ill Golf a Numerical Growing Braid What is the

Jim Cheshire ASP.NET Escalation Services Microsoft Developer Support Reply yem583 None 0 Points 2 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'.

This is a big problem for us, so any help is appreciated. Is this the same issue? it has been a week now I haven't seen one single accident. Not good, shipping a product with a known bug that could break the system at any time, and I have no idea what to do about it.

I have tried searching Microsoft's site with no joy. So, if the UserControl class ended up being compiled into the same DLL as the page using it, all is well. You can follow any comments to this entry through the RSS 2.0 feed. You can leave a comment, or trackback from your own site.

it works fine for me, i hope this can help you Reply JokersSmile None 0 Points 2 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'. Also get some VB Compiler errors whenever I use the debugger and make changes. Would love to know what you all think about that. I was able to run the update on my personal laptop at home, version 2.0.50727.80.

Jun 23, 2006 06:31 PM|JokersSmile|LINK I seem to have found that my problem is with the ASP.NET Development Server. Thanks, Scott Reply kashif Member 40 Points 549 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'. The Cause - ASP.net will cache the wrong things.  In my case I converted the project from a full solution to a regular website and did not remove the compiled files Thanks

Reply JamesChe None 0 Points 28 Posts Re: Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'.

Here's the property in master: ------------------------------------------------------------------- Public Property propMemberID() As Integer Get Dim memberID As Integer Dim eKey As String eKey = Request.Cookies("eCookie").Value.ToString() This will avoid the casting error from ocurring, and would be one work around you could use in the meantime. Terms of UseSite FeedbackPrivacy Policy Powered by Progress Sitefinity Register Help Remember Me? After I fixed the broken one the one I just fixed broke again...This back and forth many times then I decided to look at the web.config file.

The college in 'Electoral College' A Page of Puzzling Replace elements in list larger than x times the magnitude of the previous value with the mean of its neighbours Can cheese Answer Rosen Admin 3238 posts Posted 11 Sep 2009 Link to this post Hello Chris, Can you please verify that you do not have xhtmlConformance attribute set in your web config? Feb 13, 2006 02:34 PM|cytosoul|LINK I am also having a similar problem. At first I was only seeing it in my production environment, today it occured on our staging server.

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed My usecase is: I have 2 ASCX controls. I told them that it did not fix the problem. You might want to let them know as well that you are calling because you saw this post from me.

Feb 24, 2006 03:12 PM|beatniks|LINK Using the try-catch block seems to have helped me. Also are you running x86 or x64 of the framework?