Should this RSS feed work? - rss

Im making a website on a local environment. Im having trouble getting an RSS feed to work, but I think it may be due to my local environment not an issue with the code. For diagnostic purposes I decided to use the code from wikipedia:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>RSS Title</title>
<description>This is an example of an RSS feed</description>
<link>http://www.someexamplerssdomain.com/main.html</link>
<lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
<item>
<title>Example entry</title>
<description>Here is some text containing an interesting description.</description>
<link>http://www.wikipedia.org/</link>
<guid>unique string per item</guid>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
</item>
</channel>
</rss>
This is in a file called feed.feed. When I navigate to the file in a browser and view it with google reader I get the message 'The feed being requested cannot be found'. Is the code correct and does this defiantly mean its an issue with my environment set up?
Thanks

If you're storing the file on your local hard drive and navigating to it with a file: URL, of course Google Reader can't access it. They need the feed to be published on the web somewhere; they don't have the ability to hack your local PC over the network and fetch your files (or, at least, they're not going to reveal that they have do this ability simply to display RSS feeds for you.)

Related

How to read RSS for Bot Builder

May I ask about how to read RSS in Nodejs for Bot Builder?
Here with my sample RSS from URL.
<rss>
<channel>
<item>
<title>A- Title</title>
<description>A - Description</description>
</item>
<item>
<title>B-Title</title>
<description>B - Description</description>
</item>
</channel>
</rss>
I tried the XMLHttprequest but can't.
Thank you.
Just as there is SyndicationFeed to read RSS feed in C#, there are various ways in which you can read RSS feeds in NodeJS for bot builder:
Make use of rss-parser which helps to parse RSS from a URL or an XML string.
Try node-feedparser which parses RSS, Atom and RDF feeds in NodeJS.
You can also refer to node-parse-rss.
Hope this helps.

calling jasper report from Rest web service

I have a problem with calling jasper report from web service.
I used this URL http://host:port/jasperserver[-pro]/rest_v2/reportExecutions to get request id ,and the output was something like following XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportExecution><exports><export><id>ee83c20b-6c3b-4299-88cb-57cc771aa7e2</id><outputResource><contentType>application/xls</contentType><fileName>myreport.xls</fileName><outputFinal>true</outputFinal></outputResource><status>ready</status></export></exports><reportURI>/reports/my_reports/myreport</reportURI><requestId>78183e2a-3740-4706-a058-a4d94508a9ad</requestId><status>ready</status><totalPages>1</totalPages></reportExecution>
Now I'm trying to run jasper report by the following url
http://localhost:8080/jasperserver/rest_
v2/reportExecutions/78183e2a-3740-4706-a058-a4d94508a9ad/exports/ee83c20b-6c3b-4299-88cb-57cc771aa7e2/outputResource
But this URL does not work properly. The question is How can I reform the URL to call the report?
Actually I need to call jasper report from oracle apex application but I don't want to use opal-consulting method to integrate oracle apex and jasper report I simply want to call a web service in PL SQL
I tried this URL --http://host:port/jasperserver/rest_v2/reports/[path to the report].[format]-- it works for me but it prompts user to log into jasper server. On the other hand this URL returns the report file, I need to have a URL to Download the output.
Could you please tell me how to call jasper report to generate output download link.
corresponding to jasper server Documents, it is possible to make a request and run a report in URL....you can find the documents here [http://community.jaspersoft.com/documentation/tibco-jasperreports-server-web-services-guide/v610/running-report-asynchronously-0][1]
Thanks for your help in advance
I didn't understand why do you need a request id to get the reports.
Try this URL
http://host:port/jasperserver/rest_v2/reports/[path to the report].[format]?

Azure storage download on IE9 changes the file extention to ZIP

I allow users to download files from a Windows Azure storage pool by using SAS (cf. this discussion). The SAS is being constructed and next the Request.Redirect(targetURL) is called to redirect the client's browser to download the file.
This works well using Chrome to download a file (a proprietary binary file ending on the extention .dp).
However, when downloading the same file (using the same URL) on Internet Explorer 9, the extension of the file is being changed to .zip (removing the original .dp).... Some users still use IE9 :(
I've checked the content-type of the blob, which is application/octet-stream (and hence should be correct).
Why does IE9 changes the extention of the file and what can I do to prevent this?
Do I need to instruct Azure to leave the .dp file as-is (mime-type wise) and if so, how can I configure that?
edit: I really want to use redirection and not blob.openread()/response.write() to avoid additional load on the webserver.
Update 1
I've used Fiddler to see the server answer on the download request, and it is clear that the content-type is correct:
HTTP/1.1 200 OK
Content-Length: 60783
Content-Type: application/octet-stream
Last-Modified: Fri, 17 Aug 2012 13:25:24 GMT
ETag: 0x8CF4XXXE4DD2184
Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 21XXXXX-9e42-4ca8-a425-e84269d9f104
Date: Fri, 17 Aug 2012 16:49:05 GMT
The content payload of the server starts with
PK����nAQ������p����
* FIDDLER: RawDisplay truncated at 128 characters. Right-click to disable truncation. *
Does IE interprets the "PK" as PKZIP and hence beliefs it's a ZIP file?
How can this be disable (on the client side) - cf. first comment below was not the trick...
Kind regards,
Robbie De Sutter
I suspect this is just IE doing something annoying. I'd suggest changing the content type to something like application/x-foobar, maybe replacing "foobar" with something more meaningful. :-)
I haven't tested it, but I would think that's sufficient to get IE to stop trying to guess the file type.
You can trick IE by adding a query string parameter at the end, something like: &ext=.exe.
We generate a link to .exe + sas token. So, the link is accessible for a short period of time. IE can't figure out that file https://.blob.core.windows.net/container/file.exe?sv=2014-02-14&sr=b&sig=1oRgEzi%2F5uXCPUiseHizadfadfasdfa0vEs%3D&st=2015-05-18T19%3A36%3A42Z&se=2015-05-18T19%3A46%3A42Z&sp=r is actually an executable and saves it with no file extension. But if I do:
https://.blob.core.windows.net/container/file.exe?sv=2014-02-14&sr=b&sig=1oRgEzi%2F5uXCPUiseHizadfadfasdfa0vEs%3D&st=2015-05-18T19%3A36%3A42Z&se=2015-05-18T19%3A46%3A42Z&sp=r&ext=.exe (adding &ext=.exe at the end) IE now saves the file appropriately.

force cache to update in IE browser with a request - C#, ASP

I am working on a webapplication where users can login into their accounts and change settings for their accounts. If they make changes there, let us color for their account it will be modified in the css file and the new css should be applied for their account. But it is not doing that one since css file has been cached. I am using on IIS 7, C#, ASP.Net, IE 9 browser.
Can any help me on this issue.
I'm guessing that the css file is generated by some server side script,
because you didn't told what language you use, i'll example with PHP.
Well what you need is to send headers of cache control to the browser, so it won't save any cache on the css file, if you use PHP this is the code that you need to use:
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
Remember to call the header functions before you send any data to the browser.
Hope that solved your problem.
Have the server render the page with a version string embedded in the path. For example:
httpx://www.yourdomain.com/css/12345/customized.css
Whenever the user modifies a setting in the CSS file, update the version and have new pages the user requests reference the new version.

UTF-8 server encoding results in � characters on an ASP.NET site

I am running an ASP.NET WebForms blog engine web site at maxpavlov.com
I am writing mostly in Russian on my blog. Sometimes, even though I am writing a perfectly normal Russian characters in, when I view the resulting rendered blog post page, I get some symbols substituted with �� characters.
I started digging. First, I have checked to see if a UTF-8 is set as a response encoding in the globalization section in web.config. It always was. Then I have noticed, that the pages my site generate don't have a <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> attibute provided in the page header. So I have added it to both masterpages (the display one, and the admin one - it is blogengine.net's specific stuff).
Now all pages that the web server generates have the charset value set to UTF-8, but the problem remains.
The site, when I create a blog post saves it to XML file, that also has an encoding set at the top of the XML file to UTF-8 with the following line:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
Still, problem characters appear in the browsers, when I go to my site.
Where else should I fix this encoding problem?
More info: Fiddler tells me that the response header Content-Type: text/html; charset=utf-8
What is interesting, is that in different browsers, different characters in the HTTP Response get substituted with a �.
By the way, if anyone still wonders what the thing is - it's IIS Native RewriteModule. It's buggy even in version 2, if you disable it for the site, the problem goes away. Tried to report it in IIS.net - didn't believe me. Just learned to live without it on web sites that need to display a cyrillic characters.
Try using Windows-1251 (cyrillic) encoding for the russian alphabet.

Resources