Invalid Cast Exception retreiving site terms
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Invalid Cast Exception retreiving site terms

 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server
Author Message
David Abitbol
Guest





Posted: Thu Oct 27, 2005 8:51 pm    Post subject: Invalid Cast Exception retreiving site terms Reply with quote

Hi everybody,

We have a website running on Commerce Server 2002 SP1. I have a page trying
to retrieve the site term names using:

ArrayList al = CommerceContext.Current.ProfileSystem.SiteTermNames;

Commerce comes with an invalid cast exception on this line. We believe it's
a problem with the server, we tried profiling the sql queries but nothing
seems to give us an idea of what's going on.

Thank you.
Back to top
Zoe Hart [MVP]
Guest





Posted: Thu Oct 27, 2005 8:51 pm    Post subject: Re: Invalid Cast Exception retreiving site terms Reply with quote

That line executes without error on my system. Can you provide the stack
trace to see where the error is actually occurring? Is it in your code or
somewhere in Commerce Server code?

--
Zoe Hart
Commerce Server MVP
Back to top
David Abitbol
Guest





Posted: Fri Oct 28, 2005 12:51 am    Post subject: Re: Invalid Cast Exception retreiving site terms Reply with quote

There you go as you can see it is in commerce server code:

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: ?

Source Error:


Line 27: catch (Exception exc)
Line 28: {
Line 29: throw exc;
Line 30: }
Line 31:


Source File:
D:\Inetpub\FTProot\BraultMartineau\www\BraultMartineau\TestPages\TestSiteTerms.aspx Line: 29

Stack Trace:


[InvalidCastException: ?]

Microsoft.CommerceServer.Interop.Profiles.SharedFns2.GetProfileShared(Connection& connBizDataStore, String& sProfilePath, String sEncode) +661

Microsoft.CommerceServer.Interop.Profiles.BusinessDataAdmin2FreeThreaded.GetSiteTerms(String sEncode) +62

[CommerceException: ?]
ASP.TestSiteTerms_aspx.Page_Load(Object sender, EventArgs e) in
D:\Inetpub\FTProot\BraultMartineau\www\BraultMartineau\TestPages\TestSiteTerms.aspx:29
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +733
Back to top
Zoe Hart [MVP]
Guest





Posted: Fri Oct 28, 2005 4:51 pm    Post subject: Re: Invalid Cast Exception retreiving site terms Reply with quote

I'll be honest, I'm just shooting in the dark now. It seems like there's
either something wrong with your installation (bad/corrupt CS code) or
there's something funky about your site terms. Does this happen on more than
one machine? If so, that would point away from the bad installation theory.
You could unpack a blank Commerce site and try the code there. If it runs
OK, the install is OK and it's probably something in the data. From there
you could try adding your custom site terms to the blank site to see if/when
the problem starts or removing them (after backing up your database) from
your site to see if/when the problem goes away.

--
Zoe Hart
Commerce Server MVP
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB