| 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")
| |
|
|
| 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...
>
>
>
|
|
|
|