Microsoft Content Management Server - CustomProperty returning incorrect values

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > November 2005 > CustomProperty returning incorrect values





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CustomProperty returning incorrect values
dragonaut

2005-11-23, 5:52 pm

Hello from newbie !

I have a template with an iframe inside, and it reads from the
CustomProperties of the channel the url it should display in the
iframe. The problem I'm having is that sometimes, on rare occasions,
CustomProperties[] returns the value of another channel, and not the
current one. Here is an example of my code:

CmsHttpContext ctx =
CmsHttpContext.Current;
Channel chn=ctx.Channel;
Application["IFrameSrc"] = "";

if (chn.CustomProperties["IFrameSrc"].Value
!= null)
{
Application["IFrameSrc"] =
chn.CustomProperties["IFrameSrc"].Value
}
//in the html of the page I'm assigning
the Application["IFrameSrc"] to the iframe src property.

I have no clue as to what could be causing this, since this problem is
happening in a totally random way.

Thanks in advance!

Stefan [MSFT]

2005-11-24, 7:48 am

Hi Dragnaut,

the code looks correct. What you are experiencing should not happen.
Please open a support case to get this analyzed.

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


"dragonaut" <dragonauta@gmail.com> wrote in message
news:1132767981.828911.158910@g43g2000cwa.googlegroups.com...
> Hello from newbie !
>
> I have a template with an iframe inside, and it reads from the
> CustomProperties of the channel the url it should display in the
> iframe. The problem I'm having is that sometimes, on rare occasions,
> CustomProperties[] returns the value of another channel, and not the
> current one. Here is an example of my code:
>
> CmsHttpContext ctx =
> CmsHttpContext.Current;
> Channel chn=ctx.Channel;
> Application["IFrameSrc"] = "";
>
> if (chn.CustomProperties["IFrameSrc"].Value
> != null)
> {
> Application["IFrameSrc"] =
> chn.CustomProperties["IFrameSrc"].Value
> }
> //in the html of the page I'm assigning
> the Application["IFrameSrc"] to the iframe src property.
>
> I have no clue as to what could be causing this, since this problem is
> happening in a totally random way.
>
> Thanks in advance!
>



Alan Taylor

2005-11-26, 7:48 am

Hi there,

I wanted to ask if you are running your code on a multi-processor box,
and if so how it's configured, and you running in a clustered
environement?

I have had odd errors occuring due to issues related to those listed
above.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com