Script URL and external App
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 > Script URL and external App




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

    Script URL and external App  
Charles Bell


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


 
10-06-04 10: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.







[ Post a follow-up to this message ]



    Re: Script URL and external App  
Stefan [MSFT]


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


 
10-07-04 07: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...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
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.
>
>







[ Post a follow-up to this message ]



    Re: Script URL and external App  
Charles Bell


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


 
10-07-04 12:47 PM

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...
a/MCMS+2002+-+(complete)+FAQ.htm
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
> MCMS Sample Code:
> http://www.gotdotnet.com/community/...nagement+Server
> 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 
>
>







[ Post a follow-up to this message ]



    Re: Script URL and external App  
Stefan [MSFT]


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


 
10-07-04 12:47 PM

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...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
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...
> 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... 
URL.[vbcol=seagreen] 
http://download.microsoft.com/downl...
+Server[vbcol=seagreen] 
in[vbcol=seagreen] 
>
>







[ Post a follow-up to this message ]



    Re: Script URL and external App  
Charles Bell


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


 
10-07-04 12:47 PM

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...
a/MCMS+2002+-+(complete)+FAQ.htm
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
> MCMS Sample Code:
> http://www.gotdotnet.com/community/...nagement+Server
> 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...
a/MCMS+2002+-+(complete)+FAQ.htm 
> http://www.gotdotnet.com/community/...nagement+Server 
> in 
>
>







[ Post a follow-up to this message ]



    Re: Script URL and external App  
Stefan [MSFT]


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


 
10-07-04 12:47 PM

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...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
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...
+Server[vbcol=seagreen] 
root[vbcol=seagreen] 
http://download.microsoft.com/downl...
+Server[vbcol=seagreen] 
running[vbcol=seagreen] 
a[vbcol=seagreen] 
as[vbcol=seagreen] 
a[vbcol=seagreen] 
>
>







[ Post a follow-up to this message ]



    Re: Script URL and external App  
Charles Bell


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


 
10-07-04 12:47 PM

Thanks Stefan.







[ Post a follow-up to this message ]



    Sponsored Links  




 





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