473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

"Logging in" to a specific session with asp.net session provider

Hi all,

I'm using a default, InProc ASP.NET session provider, ASP.NET 3.5.

I want to use a nice flash file uploader. The problem with it is that it
can't send cookies with the files, so I don't know on ASP.NET from which
client the files are comming.

I can modify the form action parameter with javascript to say, e.g.
upload.aspx?sessionID=X, where X is ASP.NET session ID read from cookie.
However, I can't find a way to access a specific session on ASP.NET. Is
it possible?
--
/\ /\ [ Jakub 'Kocureq' Anderwald ] /\ /\
=^;^= [ [nick][at][nick].com ] =^;^=
/ | [ GG# 1365999 ICQ# 31547220 ] | \
(___(|_|_| [ ko*****@jabber.org ] |_|_|)___)
Jun 27 '08 #1
4 1355
Hello Kocureq,

JS runs on client, and your session in serverside stuff.
There is no standard way to access your session in js if you are not using
hidden fields or ajax
>so I don't know on ASP.NET from which client the files are comming.
what exactly do u need to get?! user name or what?
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
KHi all,
K>
KI'm using a default, InProc ASP.NET session provider, ASP.NET 3.5.
K>
KI want to use a nice flash file uploader. The problem with it is that
Kit can't send cookies with the files, so I don't know on ASP.NET from
Kwhich client the files are comming.
K>
KI can modify the form action parameter with javascript to say, e.g.
Kupload.aspx?sessionID=X, where X is ASP.NET session ID read from
Kcookie. However, I can't find a way to access a specific session on
KASP.NET. Is it possible?
K>
Jun 27 '08 #2
Michael Nemtsev [MVP] pisze:
JS runs on client, and your session in serverside stuff.
There is no standard way to access your session in js if you are not
using hidden fields or ajax
I don't want to access it.

See, I have a flash upload "widget", that uploads files nicely to my
ASP.NET website, but doesn't send the session cookies.

In ASP.NET I need to know which user has sent me the file - so I have to
access this user's session. One method I thought of is to use Javascript
to take out the session ID from cookie and send it with the picture,
e.g. modify the form action from

upload.aspx

to

upload.aspx?session_id=9uu8053ungwe8ryt83

so I can get the session ID on ASP.NET side.

However, I need a way to tell ASP.NET "here's the session ID - use this
one".

--
/\ /\ [ Jakub 'Kocureq' Anderwald ] /\ /\
=^;^= [ [nick][at][nick].com ] =^;^=
/ | [ GG# 1365999 ICQ# 31547220 ] | \
(___(|_|_| [ ko*****@jabber.org ] |_|_|)___)
Jun 27 '08 #3
Kocureq pisze:
Michael Nemtsev [MVP] pisze:
>JS runs on client, and your session in serverside stuff.
There is no standard way to access your session in js if you are not
using hidden fields or ajax

I don't want to access it.

See, I have a flash upload "widget", that uploads files nicely to my
ASP.NET website, but doesn't send the session cookies.

In ASP.NET I need to know which user has sent me the file - so I have to
access this user's session. One method I thought of is to use Javascript
to take out the session ID from cookie and send it with the picture,
e.g. modify the form action from

upload.aspx

to

upload.aspx?session_id=9uu8053ungwe8ryt83

so I can get the session ID on ASP.NET side.

However, I need a way to tell ASP.NET "here's the session ID - use this
one".
Can anyone please help?

Or maybe there is a better, ASP.NET-compatible fancy multi-file upload
with real progress bar?

--
/\ /\ [ Jakub 'Kocureq' Anderwald ] /\ /\
=^;^= [ [nick][at][nick].com ] =^;^=
/ | [ GG# 1365999 ICQ# 31547220 ] | \
(___(|_|_| [ ko*****@jabber.org ] |_|_|)___)
Jun 27 '08 #4
Hello Kocureq,

I hope this sample will help http://www.codeproject.com/KB/webfor...gress_Bar.aspx

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
KKocureq pisze:
K>
>Michael Nemtsev [MVP] pisze:
>>JS runs on client, and your session in serverside stuff.
There is no standard way to access your session in js if you are not
using hidden fields or ajax
I don't want to access it.

See, I have a flash upload "widget", that uploads files nicely to my
ASP.NET website, but doesn't send the session cookies.

In ASP.NET I need to know which user has sent me the file - so I have
to access this user's session. One method I thought of is to use
Javascript to take out the session ID from cookie and send it with
the picture, e.g. modify the form action from

upload.aspx

to

upload.aspx?session_id=9uu8053ungwe8ryt83

so I can get the session ID on ASP.NET side.

However, I need a way to tell ASP.NET "here's the session ID - use
this one".
KCan anyone please help?
K>
KOr maybe there is a better, ASP.NET-compatible fancy multi-file
Kupload with real progress bar?
K>
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Luc Dal | last post by:
Hello, I've serious problem using ASP under WindowsXP sp2. I get the following reply (sorry it's in french) Erreur de compilation Microsoft VBScript error '800a0401' Fin d'instruction...
0
by: HL | last post by:
Hi, I have a small application that authenticates the user and stores the credentials and other identity info in a session-scope object. After browsing a few pages, that session-scope object...
3
by: TCB | last post by:
Hi, There are a couple of things that are bothering me, any help on these is greatly appreciated. This is using ASP.NET 2.0 1. I am sending email in my web app, using a simple form here is the...
3
by: NAT | last post by:
I am using session mode as "InProc"(entered in web.config). I have deployed my ASP.NET appln. on a server which uses Load Balancer. i.e I have two servers. I am using session across pages.The...
2
by: Ofer | last post by:
Hi, We use the ASP.net loginControls and the DB schema. How to programmatically activate the "PasswordRecovery" of a specific end-user when a user clicks my web application's button? I need to...
4
by: fran7 | last post by:
Hi, from help in the javascript forum I found the error in some code but need help. This bit of code works perfectly, trouble is I am writing it to a javascript function so the height needs to be in...
1
by: nathan.alden | last post by:
I have a Windows application that must "log in" to a remote service. Once logged in, for all subsequent service calls the Windows application should somehow pass a "session context" in each message...
1
by: murthychvrm | last post by:
why we declare "ReportDocument doc;" in this coding?what it is doing here? using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using...
1
scubak1w1
by: scubak1w1 | last post by:
OK, I have been banging my head against this all day... so any suggestions gratefully received... I am working on an employee logon section, https://, that I want to add a button to the header to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.