Microsoft Content Management Server - GetByUrl returns null

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > October 2004 > GetByUrl returns null





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 GetByUrl returns null
Nikolaj

2004-10-19, 7:48 am

Sometimes when I call the method GetByUrl(), it returns null. I call it with
the same path every time "Channels/Content" but I have a hard time figuring
out what makes this error occur some times and not at others.
Since the path is valid and works most of the time I tend to conclude that
the error might be a cms bug.. But ususally when my urge to blame someone
else is greatest I find an error in my own code .

If you have any comments please let me know. Thanks

Nikolaj
Stefan [MSFT]

2004-10-19, 7:48 am

Hi Nikolaj,

do you have "map channel name to host header" option enabled in the SCA?
In addition, please post a working and a not-working URL.

Thanks,
Stefan.

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

MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver

MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30631009-D372-43BB-AE52-B88CA1835012@microsoft.com...
> Sometimes when I call the method GetByUrl(), it returns null. I call it

with
> the same path every time "Channels/Content" but I have a hard time

figuring
> out what makes this error occur some times and not at others.
> Since the path is valid and works most of the time I tend to conclude that
> the error might be a cms bug.. But ususally when my urge to blame someone
> else is greatest I find an error in my own code .
>
> If you have any comments please let me know. Thanks
>
> Nikolaj



Angus Logan [MVP]

2004-10-19, 7:48 am

Hi Nikolaj,

Can you post your code?

Are you calling it in the same mode (ie. update or published etc.) when the
errors occurs?

Regards
--
________________________________________


Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:30631009-D372-43BB-AE52-B88CA1835012@microsoft.com...
> Sometimes when I call the method GetByUrl(), it returns null. I call it
> with
> the same path every time "Channels/Content" but I have a hard time
> figuring
> out what makes this error occur some times and not at others.
> Since the path is valid and works most of the time I tend to conclude that
> the error might be a cms bug.. But ususally when my urge to blame someone
> else is greatest I find an error in my own code .
>
> If you have any comments please let me know. Thanks
>
> Nikolaj



Nikolaj

2004-10-19, 7:48 am

Maybe it has something to do with the fact that I try to call the method from
a popup window.

It seems that I can use the GetByUrl from the original browser window, but
not in the new window which is opened using some javascript.

Could this be the problem?

"map channel name to host header" is disabled.

> In addition, please post a working and a not-working URL.


The url is always the same.
GetByUrl("/Content")
Angus Logan [MVP]

2004-10-19, 7:48 am

Is the popup a CMS posting?
--
________________________________________


Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________

"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:5BAD0B7B-80D1-4772-A364-8F2786F331ED@microsoft.com...
> Maybe it has something to do with the fact that I try to call the method
> from
> a popup window.
>
> It seems that I can use the GetByUrl from the original browser window, but
> not in the new window which is opened using some javascript.
>
> Could this be the problem?
>
> "map channel name to host header" is disabled.
>
>
> The url is always the same.
> GetByUrl("/Content")



Stefan [MSFT]

2004-10-19, 7:48 am

Hi Nikolay,

Try a Url in this format: http://servername/Content

Cheers,
Stefan.

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

MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver

MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
news:5BAD0B7B-80D1-4772-A364-8F2786F331ED@microsoft.com...
> Maybe it has something to do with the fact that I try to call the method

from
> a popup window.
>
> It seems that I can use the GetByUrl from the original browser window, but
> not in the new window which is opened using some javascript.
>
> Could this be the problem?
>
> "map channel name to host header" is disabled.
>
>
> The url is always the same.
> GetByUrl("/Content")



Nikolaj

2004-10-19, 5:49 pm

NO!! Thats it. Actually the popup window contains an aspx page but now I have
created a new channel which uses this aspx page as rendering script. Now it
works.

Thanks.
Nikolaj

"Angus Logan [MVP]" wrote:

> Is the popup a CMS posting?
> --
> ________________________________________

>
> Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
> Product Specialist
> Microsoft Application Solutions
> Data#3 Limited
> E angus_logan@data3.com.au
> BLOG www.anguslogan.com
> ________________________________________

> "Nikolaj" <Nikolaj@discussions.microsoft.com> wrote in message
> news:5BAD0B7B-80D1-4772-A364-8F2786F331ED@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com