Cache Page For Anonymous Users Only?
Jan 17, 2010
Is there an easy way to cache ASP.NET whole page for anonymous users only (forms authentication used)?
Context: I'm making a website where pages displayed to anonymous users are mostly completely static, but the same pages displayed for logged-in users are not.
Of course I can do this by hand through code behind, but I thought there might be a better/easier/faster way.
View 1 Replies
Similar Messages:
Mar 9, 2011
I would like to ask if somebody knows how to deny view of page in the telerik rad menu to anonymous users. So if the user wont be leged in then he wont be alble to see a page in the rad menu, but when he log in the the page show up in the menu.
View 2 Replies
Sep 22, 2010
I am working on an internal application... i setup IIS 7 to use windows authentication since its behind the firewall and on the domain.. there is a "public" side.. and an "internal" side... if your not part of IT.. you should get the public side.. this is just informational.. my problem is that there is 1 or two pcs that are not on the domain and nobody is logged into them.. how can i just redirect anonymous users to another site?
everything i read says you can't use anonymous AND windows auth.. so my thought was to just redirect the anonymous users to another site.. how can you do that?
View 1 Replies
Feb 4, 2011
I'm trying to add a directory for anon access in IIS 7.5. It works under Web Dev but not IIS 7.5
I'm currently using this web.config in the directory. This is a directory with style sheets:
<?xml version="1.0"?>
Note: As an alternative to hand editing this file you can use theweb admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in WindowsMicrosoft.NetFrameworkv2.xConfig
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</configuration>
Update:
I've went to the folder and under Authentication, I've changed anonymous authentication from IIS_USR to pool. This seems to have correct it.
I will reward anyone who provides a very good explanation and resources for understanding this setting. Also, how to apply it globally would be good to know -- for all folders.
View 2 Replies
Jul 23, 2010
I have denied anonymous access to the entire application using the following Web.Config setting:
<authorization>
<deny users="?" />
</authorization>
Then, for various paths, I have allowed anonymous access using Web.Config settings such as this:
<location path="Home/ShowLogin">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
I'd like to be able to determine during the processing of a given request whether the requested URL is to path that allows anonymous users or whether the request is to a path that denies anonymous users.
What is the most elegant way of determining this?
View 1 Replies
Feb 14, 2011
I am using windows authentication in my web application. All we need is when the application will be executed it will launch login.aspx page. If users put correct userid and password(checked from active server directory) it will be redirected to a difference page. But if any unauthenticated user tries to access any other page in the application by typing the Url on the address bar it will be again redirected to the login page. We have to do this by changing our web.config file.I can achieve this using form authentication but not windows. But our requirement is windows. The requirement is very basic but all effort is just not working.
View 2 Replies
Mar 26, 2010
in my aspx.vb page i have written
Label1.Text = Me.Page.User.Identity.Name
when i do view in browser (without publishing to any server) i see label's text as
abcxyz which is correct
but when i publish it, i dont see any text . I have made setting IIS to allow anonymous users so that anyone can open the wesite and see their computer login id
like abcxyz
View 1 Replies
Mar 2, 2011
I have a E-Shop Site and I need some customization for my users like following :
Store favorite products in their own basket.Customize products list in order to what are their favorite. It must remember their basket next time they want to visit our site.
my question is how I can store information for my customers who are new to my web site also most of customers don't like to have username and password then login first they like to buy during a week and at the end of week pay for them then we can send some products to their locations.
I have already written my application using asp.net with framework 4.0.
View 3 Replies
Aug 4, 2010
I have a user control which, when pressing a command button, sets a property for the Profile (which has been marked as allowanonymous=true), then save it using Profile.Save().
Now, in IE this works fine - no problems at all. I then go to the page where the value is used - and it's there and can be used.
However, exactly the same routine when running in Safari or Firefox doesn't work - although when you're on the same page where the value is set it will immediately state that the value is ok, do a postback and it's gone!
Here's some very simple code to show the problem. Whilst IE will always dump 'plop true/false' to the screen (yes, I know - very juvenile!), FF and Safari will the first time, but on postback will just dump True to indicate it's a postback. (oh, and autosaveprofile is set to true in this example - otherwise there'd be a Profile.Save() below the set property).
[Code]....
I can't use Cookieless session states as the CMS I'm using won't allow it. I've also used Fiddler to try and track the issue, but no joy.
I'm guessing it's related to the way FF and SF handle cookies - but both are set to accept anything. Could it possibly be anything to do with the ASP.Net Development Server? (ie. the address is[URL]The fact that it never manages to save the value
View 1 Replies
Jan 18, 2010
I am currently implementing a client-side paging solution using ASP.NET, jQuery and JSON.
I have been following the excellent article from encosia: http://encosia.com/2008/08/20/easily-build-powerful-client-side-ajax-paging-using-jquery/
In my Web Method I retrieve my data from the database as a DataTable:
DataTable categoryProducts = ProductViewerAccess.GetCategoryProducts
("AA", 4, 0, Page.ToString(), out howManyPages, "FALSE", 0, "CostPrice", "asc", destinationList);
I then retrieve the data from the DataTable into an anonymous type:
var feeds =
from feed in categoryProducts.AsEnumerable()[code]....
This all works great.
However, I would like to extend the code to perform some evaluation checks (e.g., check that various columns in the DataTable are not NULL) and other pre-processing (e.g., call various functions to build the image URL based on the image ID - which is another column in the DataTable not shown in the code fragment) before I return the resulting rows of the DataTable as an anonymous type to the client-side.Basically, I want to iterate through the DataTable, perform the evaluation checks and pre-processing, while building my anonymous type manually as I go. Or maybe there is a better way to achieve this?
View 2 Replies
Feb 25, 2011
We have a wfc layer that wraps the business classes and database access and use a client that lives on the database layer. Amongst our group we are attempting to form standards. Some want to have the client call the web method and pass the page they are requesting and the page size. Pass that to the database and then page in SQL Server use RowNum.Some want to cache the full list of objects in http cache on the service tier and page in memory. They concern here is memory use on the server.
Which would be best for a medium number of users with potentially large number of records to manage (say 30K) Is it better to cache them all in memory and work from there or page at the database as the application scales?
View 1 Replies
Feb 24, 2011
I am creating a graphical tool in silverlight which reads data from multiple files and database.
i dont want to call the database again and again. i want to retrieve the data when required and keep it safe somewhere so if the user or any other user visits the same page, they can then access the data.
i want to use application state of asp.net Cache["Object"] but in Silverlight? what is the best methodolgy?
View 3 Replies
Nov 2, 2010
I need to enable caching in my asp.net application, but I do not want to use the webserver's memory for holding cache objects. If I add the page directive for output caching will the page be stored in the asp.net cache object?
View 2 Replies
Jan 12, 2010
I have a web page where I am denying anonymous users from accessing. In the web site I have a folder called FileManager. In the web app the usres have the ability to uploaded files and when they do a folder gets created under the filmanger and the files are saved. I have created a web.config in this folder that denies anonymous users. The problem is if the user knows the directory structure they can type in the url of the site add /FilManager/x/x/NameOfFile, where x are the sub directories. If the file is an image it shows the image in ie, if it is a .xls or .doc or what ever they get the prompt to either download or save the file. What am I doing wrong. Will the web.config file not stop an anonymous user from access files? I put a webpage in the folder and it is blocked and the user gets sent to the login screen, but files seem to be unsecured.
How do I block anonymous users from being able to access the files in this folder?
View 4 Replies
Jun 1, 2010
I'm developing an application using ASP.Net.
For first the idea: "My WebApp needs an chronometerto be shared by users and all users will se the same value in cronometer. When a user clicks on a button, the cronometer needs to be restarted and all users will need to see that!"
All right, now I'd like to know what's the best choose to improve more performace an make sure that all users will see the same value in chronometer?
Need I use JSon (with jquery in client side), Timer with UpdatePanel of Ajax Extensions, pure Ajax (with JQuery) how to shared a cronometer for all users in C# (put information in Cache or database) ?
View 1 Replies
Feb 15, 2011
i'm developing a "small" warehouse-management WebApplication for few users(5-10 parralel) but with a complex authorization system(checking if pages,menus,TabPanels, UserControls and even single controls are visible or enabled) and permanent and frequent access. Because i've only limited experiences with the ASP.Net MembershipProvider, i'm unsure what's the best approach for following goal:
I want to hold all users, roles and frequently used masterdata in the Cache(in a Dataset). Hence every readonly access should be faster and causes less traffic than always using the database. On updates,deletes and inserts i would update the cached dataset and also the database.Can i use or extend the SqlMembershipProvider to achieve this goal and if possible how?Should i use the stored-procedures from asp.net or simply use the standard CreateUser, GetUser, DeleteUser-functionality? Does this approach makes sense at all?
View 1 Replies
Jul 21, 2010
I have an ASP.Net 4.0 web application which very frequently loads data from the database and does heavy calculations on it. I want to cache this loaded and prepared data in a central cache that can be accessed by every user and computer who uses the application.
Simple use-case:
User 1 accesses webpage, cache is empty, data is loaded/calculated, data is cached
User 2 accesses webpage, cache contains data, data loaded from cache
User 3 accesses webpage, cache contains data, data loaded from cache
User 1 reloads webpage, cache contains data, data loaded from cache
Cache expires
User 3 refreshes webpage, cache is empty, data is loaded/calculated, data is cached
I know that ASP.Net has a built-in cache mechanism. What I don't know is whether it can be shared between different users accessing the site on different computer at the same time. I would also like to know how the system behaves in a web farm environment.
View 3 Replies
Nov 23, 2010
I am working on a site that uses windows authentication, but I have one page for password resets that I want to allow anonymous access to.I have tried doing authorization, allow users="*", but it doesn't appear to work with this.Do I need to have another seperate site for this section?
View 2 Replies
Oct 11, 2010
From Flex we call a Upload.aspx page which is configured for anonymous authentication. Most of the time, it works like a charm, but once in a while, the browser does prompt a enter credentials popup...The whole site is configured for Windows Authentication, but some pages and folders are set to use anonymous authentication. This is done using the location tag in web.config.What could be the reason for this?
View 3 Replies
Nov 21, 2010
I have a listview in which I have a dropdownlist that will be repeated about 8 times. In the itemdatabound event of this listview, I fill the dropdownlist of that particular row with data. I obtain this data by using a linq query. It gets me an anonymous type in return:
[Code]....
The problem with this code is that I fire a query to the database everytime the itemdataboundevent is called. What I want to do is to fire the query only once, and have it available at page scope so I can reference it in the itemdatabound event. How can I get it like that?
View 1 Replies
Jan 31, 2011
There are subdomains: sub1.domain.ru, sub2.domain.ru, sub3.domain.ru, sub4.domain.ru. On default page there is a code:
protected void Page_Load(object sender, EventArgs e)
{
string subdomain = Cache[key] as string;
if (subdomain != null)[code]...
Will users see their subdomain name in different subdomains(sub1.domain.ru, sub2.domain.ru, sub3.domain.ru, sub4.domain.ru) ?
View 1 Replies
Apr 23, 2010
I'd like to pass data from one asp.net page to another. I've seen that using System.Web.Caching.Cache is a good way to accomplish this. I'm wondering if it's a good way to do it and also is there any cleanup or other things I need to keep in mind when you the Cache?
I'm not passing very much, at most two integers.
View 2 Replies
Mar 22, 2010
I have a Web Application where I have one and only one master page and with 100's of diffrent content pages
So to speed up my Web app How can i CACHE the mater oage but not the content page??
Master page loads each time whenever content page is requested..
This thing is possible,I have seen it on many diffrent websites where the Website's Master Page Remains Intact and only the content page changes (best example would be Facebook)
How can i have the same effect in my Web Application?
View 24 Replies
Mar 29, 2010
Is it correct to implement my caching object like this in my controller :
[code]....
And I Use it like this :
[code]....
View 1 Replies
Jul 28, 2010
What are the "optimal" parameters for creating an AppFabric cache when you will be storing session state in the cache? MSDN Cache-Related Commands
Powershell command line:
New-Cache [-CacheName] <String> [-Eviction <String>] [-Expirable <String>] [-Force [<SwitchParameter>]] [-NotificationsEnabled <String>] [-Secondaries <Int32>] [-TimeToLive <Int64>]
[code]...
Since I don't want my sessions to be removed unless the session has been abandoned either via code or Session Timeout...For eviction, I would think "None" and for expireable, I would think False.I have tested and calling Session.Abandon does remove the object from the cache. I have also tested to see if by extending my session, the session object in cache is also extended. This does seem to work the "correct" way.
View 1 Replies