an exception of type: {System.InvalidCastException} occurred
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > an exception of type: {System.InvalidCastException} occurred




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

    an exception of type: {System.InvalidCastException} occurred  
Nithya


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


 
11-22-05 10:54 PM

Hi,
When i am trying to access cmshttpcontext.current i am getting the
invalidcastexception error.  Please help.

Dim oContext As CmsHttpContext = CmsHttpContext.Current
strSitePath = oContext.Current.RootChannel.Path &
System.Configuration.ConfigurationSettings.AppSettings.Get(BASEEASTMAN)

TIA
Nithya






[ Post a follow-up to this message ]



    Re: an exception of type: {System.InvalidCastException} occurred  
Stefan [MSFT]


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


 
11-23-05 12:50 PM

Hi Nithya,

in which line do you get the problem?
Which type is strSitePath dim'ed to?

I would suggest to retrieve each element separatly into a string variable to
see which element causes the problem or debug the code below using VS.NET.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Nithya" <nithya.baskaran@gmail.com> wrote in message
news:1132692538.976537.228160@g44g2000cwa.googlegroups.com...
> Hi,
>    When i am trying to access cmshttpcontext.current i am getting the
> invalidcastexception error.  Please help.
>
> Dim oContext As CmsHttpContext = CmsHttpContext.Current
> strSitePath = oContext.Current.RootChannel.Path &
> System.Configuration.ConfigurationSettings.AppSettings.Get(BASEEASTMAN)
>
> TIA
> Nithya
>







[ Post a follow-up to this message ]



    Re: an exception of type: {System.InvalidCastException} occurred  
Nithya


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


 
11-29-05 10:55 PM

Hi Stefan,
I am getting exception in the first line.
"Dim oContext As CmsHttpContext = CmsHttpContext.Current "

I am getting Invalidcast exception error.

Please let me know regarding this.






[ Post a follow-up to this message ]



    Re: an exception of type: {System.InvalidCastException} occurred  
Stefan [MSFT]


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


 
11-29-05 10:55 PM

Hi Nithya,

is this code inside a MCMS template?

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Nithya" <nithya.baskaran@gmail.com> wrote in message
news:1133284062.439168.260700@f14g2000cwb.googlegroups.com...
> Hi Stefan,
> I am getting exception in the first line.
> "Dim oContext As CmsHttpContext = CmsHttpContext.Current "
>
> I am getting Invalidcast exception error.
>
> Please let me know regarding this.
>







[ Post a follow-up to this message ]



    Re: an exception of type: {System.InvalidCastException} occurred  
Nithya


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


 
11-29-05 10:55 PM

Hi stefan,
Yes, this code is inside the CMS template.






[ Post a follow-up to this message ]



    Re: an exception of type: {System.InvalidCastException} occurred  
Stefan [MSFT]


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


 
11-29-05 10:55 PM

Hi Nithya,

then you should not get this exception.
Please open a support case with Microsoft.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Nithya" <nithya.baskaran@gmail.com> wrote in message
news:1133292348.361885.41660@g44g2000cwa.googlegroups.com...
> Hi stefan,
> Yes, this code is inside the CMS template.
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:19 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