State Management :: Passing Variables From One Site To Secure Site?
Jul 28, 2010
I have 2 sites, one the main product site the other a secure site featuring the basket and checkout processes.
When a user clicks "add item to basket" I am creating a basket in a database and then adding the items to the basket. The theory was then to store the id from the database for the basket (the basketid) in a cookie, redirect the user to secure site, use the basket id from the cookie and display the contents in the basket.
However I am having trouble getting the secure site to use the same cookie. When I redirect the users to the secure site, the basket appears empty. I need to go back to the main site and then back to secure before the cookie appears.
Here is the code for the cookie
[Code]....
And then on the secure site this is how it gets the basket ID from the cookie
[Code]....
But like I say it's having problems. I've tried replacing the cookies with session variables as well but it didn't work.
View 1 Replies
Similar Messages:
Jul 14, 2010
I need to get the calling page url referrer and host name. I works for me if the calling pages are within the same network. When a page is called from an internal site that are outside of my network, I got the following error:
Object reference not set to an instance of an object.
It failed on this line:
string userURL = Request.UrlReferrer.ToString();
View 1 Replies
Oct 1, 2010
I have 2 sites, one the main product site the other a secure site featuring the basket and checkout processes.
When a user clicks "add item to basket" I am creating a basket in a database and then adding the items to the basket. The theory was then to store the id from the database for the basket (the basketid) in a cookie, redirect the user to secure site, use the basket id from the cookie and display the contents in the basket.
However I am having trouble getting the secure site to use the same cookie. When I redirect the users to the secure site, the basket appears empty. I need to go back to the main site and then back to secure before the cookie appears.
Here is the code for the cookie
[Code]....
And then on the secure site this is how it gets the basket ID from the cookie
[Code]....
But like I say it's having problems. I've tried replacing the cookies with session variables as well but it didn't work.
View 6 Replies
Jul 28, 2010
I have two websites one in ASP.Net and other in PHP.I want that if a person logged in on one website then he gets a link for second website. When he/she click on that link his userID is passed to second site. If i am using query string then it is security lack. Can I use web Services for that. How I make web service secure. Is there are other way of doing this.
View 8 Replies
Mar 12, 2011
Is it possible to cache a hole site?ll its pages, images, js, db data etc...If so is it go/bad idea?
View 2 Replies
Jul 28, 2010
I have a site that I am trying to extend how long a session stays open even though the user is inactive. I have this set in my web.config
<sessionState mode="InProc" timeout="720" />
And this is set it IIS
Time-out (in minutes):
720
But it is still timing out after like 15 minutes.
View 6 Replies
Dec 21, 2010
asp.net.2 I am trying to update the website but the cache kips on working. How can I relies the cache on site.
View 7 Replies
Jan 29, 2011
I need to save how many times (seconds / minutes) each user spend in my site from his enterance to my site till exit it. How can I do this?
View 9 Replies
Aug 2, 2010
I´m about to program a common application/website scenario. It contains pages which are presented to users, and some business logic behind, with a database connection class.
My questions are:
Q1: Should the database class be singleton? If so, why? Because does it even matter when every single user is in their own process on the server, and therefore each user has their "own" singleton database instance?
Q2: How would you normally direct users around the site? Would the Default.aspx page create instances of the required classes? And when the user is directed to a new page, how would you normally refer to these instances?
Q3: What kind of general information do you save in the Session variable? Is it a big no-no to save class instances?
View 1 Replies
Jun 17, 2010
I am wondering if it is possible to clear a session variable if the user navigates away from my site.
My example is I have a session storing the logged in user. This is checked for user access to each page.
If the user goes to another site (e.g. google) I want them to relog into the site.
This is to prevent others getting access to a users account if they use the same pc minutes.
I do have a logout that performs this and I know that it is impossible to make users use it! :)
View 2 Replies
Apr 2, 2010
l am facing a problem with session.
If many users access the site, the session gets crashed and data which i store to access across pages is getting lost.
a best way to store data (as session does) so that i can use the data across my web application.
View 5 Replies
Jan 31, 2011
I have precompiled and encrypted my webconfig. What else could I do to make my site secure.
View 2 Replies
Nov 23, 2010
I want to develop a site with secure login. i followed various tutorials, and created a site, based on the default master page. I believe i set up the asp.net configurations correctly. under security, changed authentication type to "from the internet", added roles, added users based on those roles. when i compile the project and test the log in, it works fine. but, in visual studio 2010's Solution Explorer the App_Data folder is grayed out and i cannot get into it to view the database. how do i view the tables and create new tables?
View 4 Replies
Feb 8, 2010
I don't think the site has a web service available, so I need to pass the login credentials and read the xml file (e.g.https://www.somesite.com/needthisfile.xml). What do I use to do this?
View 1 Replies
Jan 7, 2010
I'm trying to write a small application to collect(Scrape) one piece of data from a web site. I would like to be able to simply run the app and it will open the page, find the one piece of data and display it. So far so good...my problem is that the web site is a secure site, meaning I have to provide a user name and password. I've searched all over the web, found many discussions but have yet to find anything that provides specifics on how to accomplish this. I understand a little bit about tokens etc, but I'm really looking for a detailed description of how to do this. Please feel free to direct me to a different forum if I'm in the wrong place.
View 3 Replies
Apr 8, 2010
Requirment is to stop more than one user to login at a time using same user id.I am storeing user id in session. I searched the internet and found some ways but somehow they do not work in these situations:If javascript in brower is turned off. If user do not click logout and directly close brower.
View 3 Replies
Nov 19, 2010
I have a internal site used by employees of my company that uses ASP.Net 3.5, Ajax and the Ajax Control Toolkit and is secured using https and requires a client certificate to gain access to the site. We are getting the following error when updating drop down lists on the very first page of an application wizard we have built. The page uses an UpdatePanel with PartialPagePostbacks enabled.
Sys.WebForms.PageRequestManagerServerErrorException:
An unknown error occurred while processing the request on the server. The status code returned from the server was: 413
ScriptResource.axd Line: 5
Code: 0 Char: 62099.
I have increased the maxRequestLength value to 8192Kb (which is way overkill), the readAheadBuffer to 4096Kb, set all the timeouts I can find, and this problem keeps showing up for my users. I can reproduce the error if I let the initial page site idle for 2-3 minutes before doing the partial page postback to move to the next segment. I have been chasing this now for a couple of weeks, and keep coming back to the same sites with the same answers.
View 4 Replies
Oct 28, 2010
I have a doubt regarding secure cookie.
I have four servers 2 App Server(behind firewall) and 2 webservers and each server is accessing through Load Balancer.
App Server is a modules for Data Access layer and webserver is for Presentation layer.
My Issue is My Load Balancer has Secure certificate installed but certificate is not installed on servers and I want to make cookie as secure in site , as per my understanding " cookie should be set as secure only for SSL site other ways new session will get create every time" so should I install SSL certificate on webserver to make my cookie as secure or will it work properly even if only Load Balance has SSL.
View 5 Replies
Jun 28, 2010
I am working on an asp.net website using C#. The site deals with orders and therefore order lines. I would like to store the order in memory whilst it is being populated (with order lines) and once it gets submitted write it to a database.
The above logic has been implemented, but sometimes when accessing session state or storing a variable in it information gets lost. Take note that the web server is running a dual-core processor. I am also using the in proc session state server.
I tried changing over to using the out proc session state server (asp.net state service), but it requires serialization. Since the order and orderlines are actually linq to sql classes, the entitysets and entityref's fail to serialize.
Does anyone know the reason why session state loses information occasionally and possibly how to eliminate the problem?
View 4 Replies
Oct 15, 2010
I'm trying to pass some variables from one page to another via the session state and then post those variables to labels on page 2. When I try to write the code for my labels on page2, I get an error of "Declaration expected"Here is my code from that page:
Partial Class Default2
Inherits System.Web.UI.Page
Dim firstname As String = CType(Session.Item("FirstName"), String)
[code]...
Am I missing a page_load event handler or what am I missing?
View 2 Replies
Aug 30, 2010
Example scenario:
User login has a list of associated 'accounts' it has access to... this list of accounts is stored in a database table, say tblAccountAccessControl, something like:
login, accountID
userA, account123
userA, account456
userA, account798
userB, accountABC
userB, accountDEF
etc..
This info is used throughout the web application and determines the 'domain' of information the particular login has access to. For example there are many other tables that have the 'accountID' field and whenever a page pulls data from the table it only pulls data that the currently logged in user should be allowed to see, based on that tblAccountAccessControl data.
The security question:
Do I need to query the database every time I need to get this list of allowed accountID's? I was about to use a plain old query string to pass a particular accountID to another page but quickly caught myself as I realized that would be a major security flaw (the receiving page was going to use that accountID to grab info from the database, and there would be nothing preventing a user from simply typing in a url manually to get data from an accountID they are not supposed to be allowed to view). So I then thought I'll just store the list of accountID's in a session state variable so they will be carried with the user throughout the session.
But then I remembered there are tools out there that allow you to easily intercept and modify asp.net viewstate information and I'm not sure if that would included session state variables, but I'm guessing they would. Is there a way to create a secure query string? If I used session state would that session state information be exposed and modifyable by utilities out there? Am I just stuck having to query the database every time I need this info to assure security? What about encrypting it and then storing in session state variable (just thought of that one)?
View 5 Replies
Jun 1, 2010
I've begun building a bit of a framework that I wouldnt mind working with. The idea is to create a framework that makes it even easier to create CMS addons (So basically a CMS framework).
One of my goals with this project, was having all modules made within the framework automatically support version without any extra coding.
More to the point, the way that I started building this, many pieces (Lots had to do with the versioning system) became interlinked. A version Object in the code related directly to a Module Object and vice versa, therefore the class definitions for each relate to eac otherh. (So having only the Module object, i could access the versioning object and all of its properties). My issue with this is of course what happens if i have both the module and versioning objects in my code simoultaneously, resulting in having not just duplicates of the data within the code, but (perhaps) infinite amounts, killing the app.
So what im wondering is, what if my modules properties where stored within the cache? Ie if i had the Module object, and it had the property ID -- Then the data for ID would be stored in the cache within the module object. Referencing the value simply retrieves the value from the cache if it exists there, and the SQL database if it doesnt. This way, all instances of the module that may be running at the same time will have access to the same information, at the same time, and hopefully causing it to use less space in total.
I would then add a function, so that if a developer was loading a rarely used module, or dident want to occupy cache space with large amounts of data, then they could just call a Dispose function that would remove the data from the cache.
Does this method sound reasonable? I know this probably isnt what the cache is designed for -- but I cant think of any other way to do this without having an infinite loop of objects referring to each other, or causing huge discrepencies from having different instances of objects referencing values that should be the same, but arent because they are technically different instances.
[Code]....
View 1 Replies
May 19, 2010
I have a slight delemma that I have not been able to work out.
My Scenario is:
Page_Loads > Calls Sub Random Data Retrieved from a Table - Displayed on screen & Sets Variables from Row(0) for an Insert Statement > Click Button to Insert those Variables.(essentially, the Insert Statement Parameters are Dynamic in that they change each time the page loads)
The Problem I am having, is that each time the page loads, I need a New DataSet, and the Page_Load is operating too quickly, changing my variables on postBack and ultimately, inserting the new values that are now loaded.
How can I:
Page_Loads > Get and Set the Variables I need > Protect Those Variables from changing on the Next Postback (so the insert statement gets the values Iwant to insert but also set and get the next ones)?
If Not Page.IsPostBack Doesnt Work for me in my Page_Load because each time the page.loads, I need those new Random Variables from a DataSet
Someone had Mentioned ViewState, but I am uncertain how to use it. I just want to protect the variables so that it inserts properly
View 2 Replies
Feb 6, 2011
I've been building ASP.Net applications for a few years now but most of my work is focused on business apps that'll be used by less than 50 people, running on an Intranet.
Today I had a conversation with a colleague who is thinking of using ASP.Net to build a commercial application that could potentially be used by 1 Million users. He wanted to know about the scalability of ASP.Net apps and how much (or how little) of stateful objects likes Session variables he could use and still keep his app scalable. To this I did not have an answer, which is why I'm turning to the community.
Striving to keep your bias to a minimum, if you were going to build an ASP.Net application for 1 Million users that provided a rich UI experience, what parts of Microsoft's technologies to keep track of state would you avoid or keep to a minimum?
View 11 Replies
Apr 24, 2010
I know there are at least 2 ways to send Variables to another ASPX page.
The first way is the use <form> and <input type="hidden">
The second way is the put the variable(s) in the URL such as http://www.joesmith.com/Sample.aspx?var1=bob&var2=cunningham
Is there a 3rd way to send variables using VBScript inside the <script runat="server"> tag?
View 6 Replies