rss feed protected with forms authentication

R

RMA

Hello All,

Is it possible to add an rss feed (e.g. an .aspx page that writes xml
content to the response stream) to a forms authenticated web site? Anonymous
users shouldn't be able to read the contents of the page. Ideally the rss
reader would display the user for (forms authentication) credentials.

Is this possible? If yes, how?

TIA!

Roel
 
G

Guest

Hello All,

Is it possible to add an rss feed (e.g. an .aspx page that writes xml
content to the response stream) to a forms authenticated web site? Anonymous
users shouldn't be able to read the contents of the page. Ideally the rss
reader would display the user for (forms authentication) credentials.

Is this possible? If yes, how?

TIA!

Roel


In the folder, where the RSS feed is located, add a web.conig file
with the Authorization section

For example:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<location path="rss.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

</configuration>
 
R

RMA

Anon User said:
In the folder, where the RSS feed is located, add a web.conig file
with the Authorization section

For example:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<location path="rss.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

</configuration>

But can I open the rss in a rss reader when it's forms authentication
protected? Where do I provide the credentials?
 
G

Guest

But can I open the rss in a rss reader when it's forms authentication
protected? Where do I provide the credentials?- Hide quoted text -

I think it depends on the reader, and you can test it using the
configuration I've sent you above. In my example, you should be
redirected to the login page. If a rss reader doesn't support redirect
and rendering the html of the login page, you should think about other
way - to generate a rss with the login link. Once the user clicked on
the link and has authenticated in another browser window, you will
generate a rss with the real content.

if (!HttpContext.Current.User.Identity.IsAuthenticated) {
.....generate rss with link to login page....
} else {
.....generate rss....
}
 
G

Guest

I think it depends on the reader, and you can test it using the
configuration I've sent you above. In my example, you should be
redirected to the login page. If a rss reader doesn't support redirect
and rendering the html of the login page, you should think about other
way - to generate a rss with the login link. Once the user clicked on
the link and has authenticated in another browser window, you will
generate a rss with the real content.

if (!HttpContext.Current.User.Identity.IsAuthenticated) {
....generate rss with link to login page....} else {

....generate rss....



}- Hide quoted text -

- Show quoted text -

another way is to consider the HTTP authentication
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top