[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
and but when I create an aspx page I get an error with the code
below... I don't use code behind and put it on one page and try to
access the page itself.  Do I need to access the page some other way
or modify code?  the RSS is an example feed, my RSS feeds will need a
variable ie... http://finance.yahoo.com/rss/headline?s=MSFT (the
ticker symbol will be the variable).

I am trying to access the feeds through Flex SWF.

Any suggestions?

The remote server returned an error: (404) Not Found.

Here is code

Craig


%@ Page Language=C# %
%@ Import Namespace=System.Xml %

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

script runat=server
void page_load(Object sender, EventArgs e)
{
string strOutput;

XmlDocument myXml = new XmlDocument();
myXml.Load(http://www.weather.gov/alerts/ak.rss;);

strOutput = myXml.OuterXml;

Response.ContentType = text/xml;
Response.Write(strOutput);
} 
/script






--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 An of course you can generalize this by passing an url to the aspx page
 from flex:
 
 var oRequest:Object = {url= www.whatever.com/example.xml};
 
 myHTTPRequest.send(oRequest);
 
  
 
 then in the aspx doing:
 
 myXml.Load(Request(url));
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of n0ctule
 Sent: Friday, August 03, 2007 9:11 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
  
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Nick Durnell nick@ wrote:
 
  Hi all,
  
  I've read here that in order to access RSS data in my Flex application
 
  (from sites with no crossdomain policy files) I will need to proxy the
 
  RSS data on the server which hosts the Flex application.
  
  I have seen links to PHP proxy scripts but does anyone have an ASP.NET
 
  equivalent?
  
  Thanks,
  
  Nick.
 
 
 Hi Nick
 
 Try this:
 
 %@ Page Language=C# Debug=true %
 %@ Import Namespace=System.Xml %
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(www.whatever.com/example.xml);
 
 strOutput = myXml.OuterXml;
 
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script





RE: [flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Tracy Spratt
What do you see if you hit that aspx page directly from a browser?  You
can get better error reporting that way.

 

I don't see anything wrong, though I would have to verify that outerXML
was a property of XMLDocument.  Might have to get documentElement.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Craig
Sent: Friday, May 23, 2008 2:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ASP.NET RSS proxy?

 

Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
and but when I create an aspx page I get an error with the code
below... I don't use code behind and put it on one page and try to
access the page itself. Do I need to access the page some other way
or modify code? the RSS is an example feed, my RSS feeds will need a
variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
http://finance.yahoo.com/rss/headline?s=MSFT  (the
ticker symbol will be the variable).

I am trying to access the feeds through Flex SWF.

Any suggestions?

The remote server returned an error: (404) Not Found.

Here is code

Craig

%@ Page Language=C# %
%@ Import Namespace=System.Xml %

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 

script runat=server
void page_load(Object sender, EventArgs e)
{
string strOutput;

XmlDocument myXml = new XmlDocument();
myXml.Load(http://www.weather.gov/alerts/ak.rss
http://www.weather.gov/alerts/ak.rss );

strOutput = myXml.OuterXml;

Response.ContentType = text/xml;
Response.Write(strOutput);
} 
/script

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt [EMAIL PROTECTED] wrote:

 An of course you can generalize this by passing an url to the aspx
page
 from flex:
 
 var oRequest:Object = {url= www.whatever.com/example.xml};
 
 myHTTPRequest.send(oRequest);
 
 
 
 then in the aspx doing:
 
 myXml.Load(Request(url));
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of n0ctule
 Sent: Friday, August 03, 2007 9:11 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Nick Durnell nick@ wrote:
 
  Hi all,
  
  I've read here that in order to access RSS data in my Flex
application
 
  (from sites with no crossdomain policy files) I will need to proxy
the
 
  RSS data on the server which hosts the Flex application.
  
  I have seen links to PHP proxy scripts but does anyone have an
ASP.NET
 
  equivalent?
  
  Thanks,
  
  Nick.
 
 
 Hi Nick
 
 Try this:
 
 %@ Page Language=C# Debug=true %
 %@ Import Namespace=System.Xml %
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(www.whatever.com/example.xml);
 
 strOutput = myXml.OuterXml;
 
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script


 



[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
That is what I see from the browser to the web page. I have not gotten
around to accessing it from within Flex application yet.
CS




--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 What do you see if you hit that aspx page directly from a browser?  You
 can get better error reporting that way.
 
  
 
 I don't see anything wrong, though I would have to verify that outerXML
 was a property of XMLDocument.  Might have to get documentElement.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 2:58 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
  
 
 Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
 and but when I create an aspx page I get an error with the code
 below... I don't use code behind and put it on one page and try to
 access the page itself. Do I need to access the page some other way
 or modify code? the RSS is an example feed, my RSS feeds will need a
 variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT  (the
 ticker symbol will be the variable).
 
 I am trying to access the feeds through Flex SWF.
 
 Any suggestions?
 
 The remote server returned an error: (404) Not Found.
 
 Here is code
 
 Craig
 
 %@ Page Language=C# %
 %@ Import Namespace=System.Xml %
 
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(http://www.weather.gov/alerts/ak.rss
 http://www.weather.gov/alerts/ak.rss );
 
 strOutput = myXml.OuterXml;
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  An of course you can generalize this by passing an url to the aspx
 page
  from flex:
  
  var oRequest:Object = {url= www.whatever.com/example.xml};
  
  myHTTPRequest.send(oRequest);
  
  
  
  then in the aspx doing:
  
  myXml.Load(Request(url));
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of n0ctule
  Sent: Friday, August 03, 2007 9:11 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Nick Durnell nick@ wrote:
  
   Hi all,
   
   I've read here that in order to access RSS data in my Flex
 application
  
   (from sites with no crossdomain policy files) I will need to proxy
 the
  
   RSS data on the server which hosts the Flex application.
   
   I have seen links to PHP proxy scripts but does anyone have an
 ASP.NET
  
   equivalent?
   
   Thanks,
   
   Nick.
  
  
  Hi Nick
  
  Try this:
  
  %@ Page Language=C# Debug=true %
  %@ Import Namespace=System.Xml %
  
  script runat=server
  void page_load(Object sender, EventArgs e)
  {
  string strOutput;
  
  XmlDocument myXml = new XmlDocument();
  myXml.Load(www.whatever.com/example.xml);
  
  strOutput = myXml.OuterXml;
  
  
  Response.ContentType = text/xml;
  Response.Write(strOutput);
  } 
  /script
 





RE: [flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Tracy Spratt
Do you control the server? Can you  turn on verbose errors?  That is in
the web.config file.

 

Can you debug the aspx page?  Step through in Visual Studio to see where
the error is.

 

If for some reason you can't do that, comment out all the code until you
get no error, uncomment a line,response.Write(here), hit the page in a
browser until you find where the error is.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Craig
Sent: Friday, May 23, 2008 4:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ASP.NET RSS proxy?

 

That is what I see from the browser to the web page. I have not gotten
around to accessing it from within Flex application yet.
CS

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt [EMAIL PROTECTED] wrote:

 What do you see if you hit that aspx page directly from a browser? You
 can get better error reporting that way.
 
 
 
 I don't see anything wrong, though I would have to verify that
outerXML
 was a property of XMLDocument. Might have to get documentElement.
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 2:58 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
 Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
 and but when I create an aspx page I get an error with the code
 below... I don't use code behind and put it on one page and try to
 access the page itself. Do I need to access the page some other way
 or modify code? the RSS is an example feed, my RSS feeds will need a
 variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
http://finance.yahoo.com/rss/headline?s=MSFT 
 http://finance.yahoo.com/rss/headline?s=MSFT
http://finance.yahoo.com/rss/headline?s=MSFT  (the
 ticker symbol will be the variable).
 
 I am trying to access the feeds through Flex SWF.
 
 Any suggestions?
 
 The remote server returned an error: (404) Not Found.
 
 Here is code
 
 Craig
 
 %@ Page Language=C# %
 %@ Import Namespace=System.Xml %
 
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd  
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(http://www.weather.gov/alerts/ak.rss
http://www.weather.gov/alerts/ak.rss 
 http://www.weather.gov/alerts/ak.rss
http://www.weather.gov/alerts/ak.rss  );
 
 strOutput = myXml.OuterXml;
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  An of course you can generalize this by passing an url to the aspx
 page
  from flex:
  
  var oRequest:Object = {url= www.whatever.com/example.xml};
  
  myHTTPRequest.send(oRequest);
  
  
  
  then in the aspx doing:
  
  myXml.Load(Request(url));
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of n0ctule
  Sent: Friday, August 03, 2007 9:11 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Nick Durnell nick@ wrote:
  
   Hi all,
   
   I've read here that in order to access RSS data in my Flex
 application
  
   (from sites with no crossdomain policy files) I will need to proxy
 the
  
   RSS data on the server which hosts the Flex application.
   
   I have seen links to PHP proxy scripts but does anyone have an
 ASP.NET
  
   equivalent?
   
   Thanks,
   
   Nick.
  
  
  Hi Nick
  
  Try this:
  
  %@ Page Language=C# Debug=true %
  %@ Import Namespace=System.Xml %
  
  script runat=server
  void page_load(Object sender, EventArgs e)
  {
  string strOutput;
  
  XmlDocument myXml = new XmlDocument();
  myXml.Load(www.whatever.com/example.xml);
  
  strOutput = myXml.OuterXml;
  
  
  Response.ContentType = text/xml;
  Response.Write(strOutput);
  } 
  /script
 


 



[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
I did turn on the tracing and de-bugging where I could find it and it
gave the following information.
It highlighted Line 13 below in RED.
However, I can access this RSS feed just fine in a browser. I am running
this from within Visual Studio 2005 not on an actual web server, but I
do believe it simulates a web environment, (though I guess I'm not
sure).
Craig

Server Error in '/velocitytrading.net' Application.
\


The remote server returned an error: (404) Not Found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review

the stack trace for more information about the error and where it
originated in the code.

Exception Details: System.Net.WebException: The remote server returned
an error: (404) Not Found.

Source Error:


Line 11:
Line 12: XmlDocument myXml = new XmlDocument();
Line 13: myXml.Load(http://www.weather.gov/alerts/ak.rss;);  (THIS
SECTION WAS IN RED)
Line 14:
Line 15: strOutput = myXml.OuterXml;


Source File:
c:\Craig\VelocityTrading\Website\velocitytrading.net\RSS\yahoonews.aspx
Line: 13

Stack Trace:


[WebException: The remote server returned an error: (404) Not Found.]
System.Net.HttpWebRequest.GetResponse() +944
System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
credentials) +124
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +117
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role,
Type ofObjectToReturn) +71
System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +111
System.Threading.CompressedStack.runTryCode(Object userData) +54
   
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteed\
Cleanup(TryCode code,

CleanupCode backoutCode, Object userData) +0
System.Threading.CompressedStack.Run(CompressedStack compressedStack,
ContextCallback callback,

Object state) +174
System.Xml.XmlTextReaderImpl.OpenUrl() +264
System.Xml.XmlTextReaderImpl.Read() +104
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +403
System.Xml.XmlDocument.Load(XmlReader reader) +159
System.Xml.XmlDocument.Load(String filename) +114
ASP.rss_yahoonews_aspx.page_load(Object sender, EventArgs e) in

c:\Craig\VelocityTrading\Website\velocitytrading.net\RSS\yahoonews.aspx:\
13
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object
o, Object t, EventArgs e) +31
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) +68
System.Web.UI.Control.OnLoad(EventArgs e) +88
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean

includeStagesAfterAsyncPoint) +3018




























--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Do you control the server? Can you  turn on verbose errors?  That is
in
 the web.config file.



 Can you debug the aspx page?  Step through in Visual Studio to see
where
 the error is.



 If for some reason you can't do that, comment out all the code until
you
 get no error, uncomment a line,response.Write(here), hit the page in
a
 browser until you find where the error is.



 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 4:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?



 That is what I see from the browser to the web page. I have not gotten
 around to accessing it from within Flex application yet.
 CS

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  What do you see if you hit that aspx page directly from a browser?
You
  can get better error reporting that way.
 
 
 
  I don't see anything wrong, though I would have to verify that
 outerXML
  was a property of XMLDocument. Might have to get documentElement.
 
 
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Craig
  Sent: Friday, May 23, 2008 2:58 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
  Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
  and but when I create an aspx page I get an error with the code
  below... I don't use code behind and put it on one page and try to
  access the page itself. Do I need to access the page some other way
  or modify code? the RSS is an example feed, my RSS feeds will need a
  variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT

[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
Tracy, I did play with de-bugging a little more and this error came up
with I came to the line below - one line at a time.


The XML page cannot be displayed

Cannot view XML input using XSL style sheet.  Please correct the error
and then click the Refresh button, or try  again later.

Only one top level element is allowed in  an XML document. Error
processing resource  'http://localhost:1821/velocitytrading
div id=__asptrace
-^Any Ideas?
Craig







--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Do you control the server? Can you  turn on verbose errors?  That is
in
 the web.config file.



 Can you debug the aspx page?  Step through in Visual Studio to see
where
 the error is.



 If for some reason you can't do that, comment out all the code until
you
 get no error, uncomment a line,response.Write(here), hit the page in
a
 browser until you find where the error is.



 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 4:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?



 That is what I see from the browser to the web page. I have not gotten
 around to accessing it from within Flex application yet.
 CS

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  What do you see if you hit that aspx page directly from a browser?
You
  can get better error reporting that way.
 
 
 
  I don't see anything wrong, though I would have to verify that
 outerXML
  was a property of XMLDocument. Might have to get documentElement.
 
 
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Craig
  Sent: Friday, May 23, 2008 2:58 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
  Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
  and but when I create an aspx page I get an error with the code
  below... I don't use code behind and put it on one page and try to
  access the page itself. Do I need to access the page some other way
  or modify code? the RSS is an example feed, my RSS feeds will need a
  variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT  (the
  ticker symbol will be the variable).
 
  I am trying to access the feeds through Flex SWF.
 
  Any suggestions?
 
  The remote server returned an error: (404) Not Found.
 
  Here is code
 
  Craig
 
  %@ Page Language=C# %
  %@ Import Namespace=System.Xml %
 
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd  
 
  script runat=server
  void page_load(Object sender, EventArgs e)
  {
  string strOutput;
 
  XmlDocument myXml = new XmlDocument();
  myXml.Load(http://www.weather.gov/alerts/ak.rss
 http://www.weather.gov/alerts/ak.rss
  http://www.weather.gov/alerts/ak.rss
 http://www.weather.gov/alerts/ak.rss  );
 
  strOutput = myXml.OuterXml;
 
  Response.ContentType = text/xml;
  Response.Write(strOutput);
  }
  /script
 
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   An of course you can generalize this by passing an url to the aspx
  page
   from flex:
  
   var oRequest:Object = {url= www.whatever.com/example.xml};
  
   myHTTPRequest.send(oRequest);
  
  
  
   then in the aspx doing:
  
   myXml.Load(Request(url));
  
  
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of n0ctule
   Sent: Friday, August 03, 2007 9:11 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
   Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , Nick Durnell nick@ wrote:
   
Hi all,
   
I've read here that in order to access RSS data in my Flex
  application
  
(from sites with no crossdomain policy files) I will need to
proxy
  the
  
RSS data on the server which hosts the Flex application.
   
I have seen links to PHP proxy scripts but does anyone have

[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
I am going to try to use the RSS PHP Proxy on this example...(below)
I am using the Flex3 code to load and parse the RSS files from the Flex3
documentation... it looks the same as most of the code from the
as3syndicationlib that is on Mike Chambers blog (also below).  This PHP
proxy looks fairly simple to implement along with the most of the same
code that I am using now, it skips ASP as a proxy, which I thought would
be the easiest route, but I am not finding a way to use ASP for RSS XML
proxy that has been done and can be easily re-produced and I do not want
to invent a new version of the wheel or in this case a new version of
the Toyota Prius ...

Thoughts and comments welcome.
PHP example:
http://www.infinitearray.com/experiments/feeder/srcview/index.html
rssfetch.php

Mike Chambers Blog
http://www.mikechambers.com/blog/2008/01/22/parsing-rss-20-feeds-in-acti\
onscript-3/

  [:))]



--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Yes, something is returning HTML to you instead of XML.  At least the
 XML is not valid(not XHTML).  This looks like an error from the site
you
 are hitting.  Are you sure it is an RSS feed?  You will need to wrap
 that in a try catch block and handle the html error.

 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 4:48 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?



 Tracy, I did play with de-bugging a little more and this error came up
 with I came to the line below - one line at a time.

 The XML page cannot be displayed

 Cannot view XML input using XSL style sheet. Please correct the error
 and then click the Refresh button, or try again later.

 

 Only one top level element is allowed in an XML document. Error
 processing resource 'http://localhost:1821/velocitytrading

 div id=__asptrace

 -^

 Any Ideas?
 Craig







 --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
 
  Do you control the server? Can you turn on verbose errors? That is
in
  the web.config file.
 
 
 
  Can you debug the aspx page? Step through in Visual Studio to see
 where
  the error is.
 
 
 
  If for some reason you can't do that, comment out all the code until
 you
  get no error, uncomment a line,response.Write(here), hit the page
in
 a
  browser until you find where the error is.
 
 
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On
  Behalf Of Craig
  Sent: Friday, May 23, 2008 4:07 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
  That is what I see from the browser to the web page. I have not
gotten
  around to accessing it from within Flex application yet.
  CS
 
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   What do you see if you hit that aspx page directly from a browser?
 You
   can get better error reporting that way.
  
  
  
   I don't see anything wrong, though I would have to verify that
  outerXML
   was a property of XMLDocument. Might have to get documentElement.
  
  
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of Craig
   Sent: Friday, May 23, 2008 2:58 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com

   Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
   Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex
3.0
   and but when I create an aspx page I get an error with the code
   below... I don't use code behind and put it on one page and try to
   access the page itself. Do I need to access the page some other
way
   or modify code? the RSS is an example feed, my RSS feeds will need
a
   variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT
   http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT  (the
   ticker symbol will be the variable).
  
   I am trying to access the feeds through Flex SWF.
  
   Any suggestions?
  
   The remote server returned an error: (404) Not Found.
  
   Here is code
  
   Craig
  
   %@ Page Language=C# %
   %@ Import Namespace=System.Xml %
  
   !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd  
  
   script runat=server
   void page_load(Object sender, EventArgs e)
   {
   string strOutput;
  
   XmlDocument myXml = new XmlDocument();
   myXml.Load(http://www.weather.gov/alerts/ak.rss
  http://www.weather.gov