|
Home > Archive > Microsoft Content Management Server > October 2004 > Script URL and external App
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 |
Script URL and external App
|
|
| Charles Bell 2004-10-06, 5:51 pm |
| Hi,
We have a situation where we have an external web application running in
..NET.
We have created the main site structure in the Channel and have used a
Script URL to connect to the external APP.
i.e.
Channels/customer_site/main section2/ <-- maps to /appdirectory/index.aspx
Now, that's great when we first step into the app - we see the URL as
http://www.../main_section2/
with the app sitting nicely on the page. Great.
However, the trouble starts when we try to use the app. The app has a link
to another page in the application directory which is, say:
show_information.aspx
Now, the problem is, that the browser thinks it's looking for:
http://www.../main_section2/show_information.aspx
But in reality, it should be looking for:
http://www.../appdirectory/show_information.aspx
How can we resolve this?
I've already tried changing the Script URL to map to the /appdirectory/ only
(i.e without the index.aspx) hoping that it would auto-resolve any
pages/sub-pages within the app, but no luck.
Many thanks for your help on this.
| |
| Stefan [MSFT] 2004-10-07, 2:55 am |
| Hi Charles,
you need to use absolute URLs. The browser will always calculate the URL
from the current location it nows and the information in the new URL.
So he assumes that the file is beside the other and creates the wrong URL.
The only way to avoid this is to use absolut URLs starting at the root with
a slash "/" at the beginning.
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
--------------------------------
"Charles Bell" <charlie@bang.co.uk> wrote in message
news:eYBoi19qEHA.1152@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> We have a situation where we have an external web application running in
> .NET.
>
> We have created the main site structure in the Channel and have used a
> Script URL to connect to the external APP.
>
> i.e.
>
> Channels/customer_site/main section2/ <-- maps to
/appdirectory/index.aspx
>
> Now, that's great when we first step into the app - we see the URL as
>
> http://www.../main_section2/
>
> with the app sitting nicely on the page. Great.
>
> However, the trouble starts when we try to use the app. The app has a link
> to another page in the application directory which is, say:
>
> show_information.aspx
>
> Now, the problem is, that the browser thinks it's looking for:
>
> http://www.../main_section2/show_information.aspx
>
> But in reality, it should be looking for:
>
> http://www.../appdirectory/show_information.aspx
>
> How can we resolve this?
>
> I've already tried changing the Script URL to map to the /appdirectory/
only
> (i.e without the index.aspx) hoping that it would auto-resolve any
> pages/sub-pages within the app, but no luck.
>
> Many thanks for your help on this.
>
>
| |
| Charles Bell 2004-10-07, 7:47 am |
| Thanks for that Stefan - that's as I expected. One other slight problem now
arises from that.
I have a piece of code in my ASPX page (in the app) that contains the
following reference:
Microsoft.ContentManagement.Publishing.CmsHttpContext.Current
and it now throws a NullReferenceException. It's used
This is obviously because we've "stepped outside" of the CMS.
Any ideas?
"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:%23xr3jUErEHA.2436@TK2MSFTNGP10.phx.gbl...
> Hi Charles,
>
> you need to use absolute URLs. The browser will always calculate the URL
> from the current location it nows and the information in the new URL.
> So he assumes that the file is beside the other and creates the wrong URL.
> The only way to avoid this is to use absolut URLs starting at the root
> with
> a slash "/" at the beginning.
>
> 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
> --------------------------------
>
>
> "Charles Bell" <charlie@bang.co.uk> wrote in message
> news:eYBoi19qEHA.1152@TK2MSFTNGP11.phx.gbl...
> /appdirectory/index.aspx
> only
>
>
| |
|
|
| Charles Bell 2004-10-07, 7:47 am |
| Stefan,
Thanks again for your help.
> You need to remove this code or integrate your solution into MCMS.
Is it possible to do this directly? By that, I mean is it possible to just
"drag and drop" the solution folder into CMS and somehow run the app within
the MCMS framework?
Or would I need to define templates for the data, then add the data to the
templates in much the same way that I would create news articles, or
whatever?
The issue is that there is a vast amount of data held in an existing
database, and my app needs to access that data. So if I can integrate the
app, then all's good. If I need to "rebuild" the app using MCMS, then it's
not a possibility.
Any advice? I really appreciate the help you give to everyone here.
"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:%23SRbiDFrEHA.536@TK2MSFTNGP11.phx.gbl...
> Hi Charles,
>
> outside a MCMS object this context cannot be used.
> You need to remove this code or integrate your solution into MCMS.
>
> 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
> --------------------------------
>
>
> "Charles Bell" <charlie@bang.co.uk> wrote in message
> news:O525yrErEHA.4004@TK2MSFTNGP10.phx.gbl...
> now
> URL.
> http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
> http://www.gotdotnet.com/community/...t+S
erver
> in
>
>
| |
| Stefan [MSFT] 2004-10-07, 7:47 am |
| Hi Charles,
no. Each page needs to be associated with a channel or posting - so either
it is a template or a channel rendering script.
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
--------------------------------
"Charles Bell" <charlie@bang.co.uk> wrote in message
news:OdpGoKFrEHA.348@TK2MSFTNGP15.phx.gbl...
> Stefan,
>
> Thanks again for your help.
>
>
> Is it possible to do this directly? By that, I mean is it possible to just
> "drag and drop" the solution folder into CMS and somehow run the app
within
> the MCMS framework?
>
> Or would I need to define templates for the data, then add the data to the
> templates in much the same way that I would create news articles, or
> whatever?
>
> The issue is that there is a vast amount of data held in an existing
> database, and my app needs to access that data. So if I can integrate the
> app, then all's good. If I need to "rebuild" the app using MCMS, then it's
> not a possibility.
>
> Any advice? I really appreciate the help you give to everyone here.
>
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:%23SRbiDFrEHA.536@TK2MSFTNGP11.phx.gbl...
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm[vbcol=seagreen]
http://www.gotdotnet.com/community/...t+S
erver[vbcol=seagreen]
root[vbcol=seagreen]
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm[vbcol=seagreen]
http://www.gotdotnet.com/community/...t+S
erver[vbcol=seagreen]
running[vbcol=seagreen]
a[vbcol=seagreen]
as[vbcol=seagreen]
a[vbcol=seagreen]
>
>
| |
| Charles Bell 2004-10-07, 7:47 am |
| Thanks Stefan.
|
|
|
|
|