Invalid Cast Exception retreiving site terms
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Invalid Cast Exception retreiving site terms




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Invalid Cast Exception retreiving site terms  
David Abitbol


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-28-05 09:58 PM

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.






[ Post a follow-up to this message ]



    Re: Invalid Cast Exception retreiving site terms  
Zoe Hart [MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-28-05 09:58 PM

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

"David Abitbol" <DavidAbitbol@discussions.microsoft.com> wrote in message
news:EAECA2BF-D697-4520-B09A-007830336236@microsoft.com...
> 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.
>







[ Post a follow-up to this message ]



    Re: Invalid Cast Exception retreiving site terms  
David Abitbol


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-28-05 09:58 PM

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 abou
t
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\B
raultMartineau\TestPages\TestSiteTer
ms.aspx    Line: 29

Stack Trace:


[InvalidCastException: ?]

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

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

[CommerceException: ?]
ASP.TestSiteTerms_aspx.Page_Load(Object sender, EventArgs e) in
 D:\Inetpub\FTProot\BraultMartineau\www\B
raultMartineau\TestPages\TestSiteTer
ms.aspx:29
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +733




----------------------------------------------------------------------------
----


"Zoe Hart [MVP]" wrote:

> 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
>
> "David Abitbol" <DavidAbitbol@discussions.microsoft.com> wrote in message
> news:EAECA2BF-D697-4520-B09A-007830336236@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: Invalid Cast Exception retreiving site terms  
Zoe Hart [MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-28-05 09:58 PM

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

"David Abitbol" <DavidAbitbol@discussions.microsoft.com> wrote in message
news:90C990B6-D8B6-48A6-BA12-D2123E10B539@microsoft.com...[vbcol=seagreen]
> 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\B
raultMartineau\TestPages\TestSiteT
erms.aspx
> Line: 29
>
> Stack Trace:
>
>
> [InvalidCastException: ?]
>
> Microsoft.CommerceServer.Interop.Profiles.SharedFns2.GetProfileShared(Conn
ection&
> connBizDataStore, String& sProfilePath, String sEncode) +661
>
> Microsoft.CommerceServer.Interop.Profiles.BusinessDataAdmin2FreeThreaded.G
etSiteTerms(String
> sEncode) +62
>
> [CommerceException: ?]
>   ASP.TestSiteTerms_aspx.Page_Load(Object sender, EventArgs e) in
>  D:\Inetpub\FTProot\BraultMartineau\www\B
raultMartineau\TestPages\TestSiteT
erms.aspx:29
>   System.Web.UI.Control.OnLoad(EventArgs e) +67
>   System.Web.UI.Control.LoadRecursive() +35
>   System.Web.UI.Page.ProcessRequestMain() +733
>
>
>
>
> --------------------------------------------------------------------------
------
>
>
> "Zoe Hart [MVP]" wrote:
> 







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:45 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register