State Management :: How To Use Current Session (webpage) In Client Side ActiveX Control

May 3, 2010

I'm curently developing web application which uses standard form authorization and, of course, server session objects (quite classic app). Now I'm developing client side component, which base functionality is to allow users to acquire tiif/jpg/pdf document from scanner (client side) and send it to server. Because of scan complexity and need for very user friendly interface i decided to implement Activex object (object written in .net 2.0). Until now all was ok, so I have got activex which succesfully registers and scan documents on client - but i cannot manage with sending files to server.

My concept of sending files was like that:

- preparing Upload.aspx web page wich is used for reciving files sended by POST method and saving files in database (of course to proper save in database i need some current user context information) - in ActiveX i decided to use System.Net.HttpWebRequest object to prepare and send data the problem was third point:

- i thought that in-proc activex object would "derive" web session form web page activex is placed on - but i was wrong (or i made it wrong). Whenever i send request form Activex, in response i got login.aspx page - so it looks that new session is created and new authorization is needed.

I was trying to pass to my Activex values stored in "ASP.Net_SessionId" and ".ASPXAUTH" cookies, as i found that these are the values identifying session and athorized user - but with no luck.

I think, that becaause HTTP is stateless protocol all information needed to "connect to/share" existing session on IIS server need to be included in request data, so there must be way to add these information to request sended from my activex.

I would be very grateful, if someone could provide me information what should i add (headres/cookies/etc... ?) to my request data so it could share session from "parent" web page.

View 1 Replies


Similar Messages:

State Management :: Client And Server Side State Management?

Feb 25, 2011

when we go for client and server side state management in asp.net

View 2 Replies

State Management :: How To Check For A Current Session

Jan 20, 2011

I am trying to write a code that I can attach to a .aspx page using <!--#include file="newcode.aspx"-->. What I am trying to do is check to see if they have an current or active session and redirect them if they don't. It seems like this should be pretty
simple, but I have not been able to get anything to work. This is only being used on One page. What I have tried is:

[code]...

View 5 Replies

State Management :: Possible To Get Current Session Timeout Value

Oct 6, 2010

I have a section in my web app that displays the user's name, the current datetime and a logout link. What i would also like to display is the time left for the session.Is this possible? I'm using an ajax timer to give the user the real time, so if i could display also the time that is left for the session to end would be great.

View 6 Replies

State Management :: Get Ip Address In Page - Client Side?

Oct 7, 2010

i use all ways i found on the Net to get client IP address or PC name (client side IP) in asp.net page but always i have server IP

im behind proxy

is there a way to do that and get actual IP and PC of client or visitor of my site - i don't want outer visitor IP i want the employee IP in my LAN

View 11 Replies

Client Side State Management For Multiple Page

Jun 23, 2015

1.Viewstate is only for single page
2.querystring and cookies not i want to use

is there any other option to use Client side state management for multiple page like viewstate encryption.. ?

View 5 Replies

State Management :: Maintain Session On Of Users On A Webpage?

Oct 25, 2010

I have to maintain session of two users on a sigle page.And the path is. UserPath:

1.User logins with his credentials((We retrive their credentials from login table) .
2.He invites some of his friends for a birthday party.
3.And send an url link to share some of the gifts with them in which gifts are provided in Share.aspx page.
4.Userlogouts.

Invites path:

1.Invite logs in with his credentials(We retrive their credentials from invites table).
2.He is directed to go to Share.aspx and list the items he require.
3.And he logs out.

Now i have problem in maintaining session for both the user and invite. How can i maintain the session so,that the user can identify a particular invite from the list of invites an his chosen items.

View 1 Replies

Why Are Hidden Fields Considered Client Side State Management

Jan 24, 2011

According to MSDN and the MCTS self-paced training, asp.net can use Hidden fields for client-side state management. The book material goes on to say view-state is more secure than hidden fields because the data is encrypted. I must be missing something here. I setup a Label and made it hidden. I can store data in this hidden label and it won't even be sent to the client browser. This not only works like server side state (note the runat=server), but this seems more secure than view-state because there's no need for encryption as the client can't even see the field.

<asp:Label ID="Label1" Visible="false" runat="server">secret info</asp:Label>
<input id="Text2" type="text" style="visibility:hidden;" value="secret 99" />

View 2 Replies

State Management :: HttpContext.current.session Is Null In App_code/.cs File

May 20, 2010

1. SetSession.aspx page sets value for a session variable and redirects to default.aspx page using Response.redirect() code.

2. Default.aspx page tries to create an object of class in app_codecommon.cs file.

3. In app_codeCommon.cs file, I am trying to access the session variable set in step1 using HttpContext.Current.Session object.

but step 3 gives error that object reference not set to an instance. as HttpContext.Current.Session is null.

I surf abt it on net, and seems to be problem with asp.net framework.

View 1 Replies

State Management :: Creating Cookie With Client Scripting And Updating From Server Side?

Aug 9, 2010

cookies are generated from the client scripting.e.g. document.cookie = city=NYC;

I want to update this from GUI using

Response.cookies["city"] = LA;

I could not understand why this is not possible.( I read about Httponly and all that stuff but still not clear).If I use Javascript in code behind page then I am able to change the value.e.g.

Literal ltMsgUpdate = new Literal();
ltMsgUpdate.Text = "<script type='text/javascript'>document.cookie = 'city=LA';" + "</script>";
Page.Controls.Add(ltMsgUpdate);

But I could not use this type of code because there is response.redirect statement in the function where I am updating cookie using (response.cookie) and that's why the javascript code never runs.

Bottomline: I want to update cookies in code behind page which is generated in client scripting.

View 4 Replies

How To Run Doc Command In Client Side Using ActiveX

Mar 29, 2011

how to run doc command in client side using any ActiveX, java other way

View 1 Replies

State Management :: Accessing Session State In A User Control?

Sep 1, 2010

We have a web site that implements a custom SiteMapProvider using a User Control added in the master page. I need to be able to limit the sitemap nodes added depending on the logged in user, that is, certain users should not see certain sitemap nodes. Currently, the login processing code determines if users are in the certain category or role and then sets a value in session state, for example, Session["UserInRoleXXX"] = "Yes"; I tried changing the code in the user control to check the session state, but I got the following error: NullReferenceException ... Object reference not set to an instance of an object." Can session state be accessed in a user control?

View 6 Replies

State Management :: How To Keep Current User Session When Redirected To Sub Domain From Main Domain

Feb 17, 2011

I have also installed SSL on a subdomain. I have put payment page under this sub domain.

View 4 Replies

State Management :: How To Set Session Timeout Period For A Particular Control

Feb 17, 2011

in my application the default time out period for a session is 20 minutes. but i want to increase the sessiion time out period for a textbox.

View 4 Replies

State Management :: Control The Number Of Opening Session?

Jan 12, 2011

I want to control the login user to access our system. I authenticated all of users by using my own way in project. and I want to limit the number of user to access the system cncurrently. It means , We sell our project to customer as Licence software. If user buy it for three users, we will allow three conurrent login user to access the system. Our system allow our customer to create their own users as they wish. We don't want to control the user creation to use the system. but But we want to control the total no of current login user at the server as per our licence agreement . After reading some article, I see there are two main ways to control the no of users.

One way is to use the membership property in my project and then can count the number of online users by executing Membership.GetNumberOfUsersOnline Method.

If I use membership property, I think it is not ok at my project. As my understanding, the system will control the user creation if we use the memebership provider. I am not really sure whether I can use membership provider property to get my system requirement or not.

[code]....

View 3 Replies

How To Find What ActiveX Control Is Referred On A Webpage

Mar 4, 2010

I have developed a web application (ASP.NET Web Forms). One of my customer has very restrictive policies. When he accesses the web page, IE shows this message:

Your security settings do not allow Web sites to use ActiveX controls installed on your computer. This page may not display correctly.

As far as I know, we don't use ActiveX controls on our page. I did a "View > Souce" and did not find anything suspect.

How can I find what part of my page refers to an ActiveX. The application uses jQuery and a few jQuery plug-ins. Is there a tool/add-in like "Fire Bug" that I can use to list the ActiveX controls referred on a page?

View 1 Replies

Javascript - User Control With Client + Server Side CustomValidation; Wrong Client Side Validator Is Picked

Nov 23, 2010

I have a user control which contains a CustomValidator which is used according to whether a RadioButton is checked or not (there are several RadioButtons, I'm only showing the relevant one)

<asp:RadioButton runat="Server" ID="RadioBetween" GroupName="DateGroup" CssClass="date_group_options_control_radio" />
[code]...

There is some client + server side validation code (the server side code does exactly the same thing and is skipped for brevity)

<script type="text/javascript">
function ValidateDateFields_Client(source, args) [code]...

There are two instances of this control in the page. When running the client side version it hits the wrong one (the version of the control which is disabled). You can see from the generated HTML both are correctly specified. I'm not sure how .NET works out which clientside function to call given they both have the same name.

<script type="text/javascript">
//<![CDATA[
var ctl00_MCPH1_QueryTextValidator = document.all ? document.all["ctl00_MCPH1_QueryTextValidator"] : document.getElementById("ctl00_MCPH1_QueryTextValidator");

[code]...
Do i need to add something in to scope it? What's the best way to achieve this? If I disable the loading of the second control everything works fine.

View 1 Replies

State Management :: Upload Image To Session And Read From Session To Image Control?

Jan 9, 2011

i want to upload picture throw FileUpload control and then store it in session, after store in session i want to read it out to image control and insert to database.

View 3 Replies

State Management :: Error :Session State Has Created A Session Id, But Cannot Save It?

Nov 18, 2010

I read the solutioin for this error, at the following link :http://forums.asp.net/p/1046935/1576341.aspxbut I am still not clear what exactly causes the error. I have two doubts :1. Can anyone please elaborate a bit on this issue, with any example ????2. Is there any drawback of this approach ?

View 4 Replies

JavaScript - Exposing Server-side State Through Client-side Controls

Feb 11, 2011

I have a list of items on an ASP.net page. That list is selectable in that whenever the user clicks on one, the page does a postback and the server code stores the index or some unique identifier of the picture in a ViewState property indicating that it is currently selected.

I would like to minimize the load on the server and therefore I would like to store the index or unique identifier representing the image in some way on the client side. The best way I can think to do this is to store said information in a hidden field ), however I had two questions about this before I go crazy:

Is this a security risk in any way, shape or form (i.e., exposing implementation details of the page)?
Is there a better/best way to do this that is more industry-standard? Does ASP.net provide a framework to do this that is cleaner than my idea? Seems like this would be a fairly common requirement to me...

View 1 Replies

State Management :: How To Control Session Timeout / Get Or Set Session Timeout Dynamic

Mar 9, 2011

I wanna write a method to get or set session timeout at run time.

View 1 Replies

State Management :: Option To Store Confidential Information In A Page?Control,Session,QueryString Etc?

Jan 20, 2011

Which is best option to store confidential information in a page?Control,Session,QueryString etc ... ?And also the performance also should be good ... ?

View 11 Replies

Trying To Make A Client Side Browser Within Webpage

Mar 26, 2011

I am trying to make a client side browser within my webpage so that the user is able to open the file chosen and read the contents in a textbox.

I've read a lot on the internet and all i came across was how to upload a file.

View 3 Replies

State Management :: Session Mode State Server - Sending Asynchronous Request

Nov 5, 2010

Customer were getting "View State Validation Error" due to worker process recycling at our production webserver and to fix that i applied machinekey and then move my Session state Mode from In Proc to State Server to retain session data and not kick out the customer to relogin. I had serialization issue with one object which has to be stored in session but when i moved it out of session i could able to resolve the issue.

But doing all these i was partly successfull in keeping the user in their session when Worker Process recycle event occurs.I was able to refresh the page or make a post back by clicking the refresh button and also able to retain the session values. But the Problem occurs when sending asynchronous request to server which we do periodically every 15 minutes from the moment the user logs in.The web page doesnot update data on website when sending asynchronous request.By Debugging I found at this particular code point it fails to make a postback which is required.

<%=GetHintFromServer%> (When there is no Worker Process recycle i t gets replaced by
WebForm_DoCallback('__Page',message,ShowHint,null,null,false) on postback) Everything works fine when there is no Worker Process Recyling but when it happens looks like sending request asynchronously using javascript fails .Remember When I make a post back by manually clicking submit button everything works fine.

SendRequest(Asynchronous)
function SendRequest(msg, isBusy, chartMsg, vesselMsg)
{
try
{
//confirm("msg"+msg+"isBusy"+isBusy+"chartMsg"+chartMsg+"VesselMsg"+vesselMsg);
_busy = isBusy;
if(chartMsg != null)
{
//confirm("chartMsg"+chartMsg);
_element.SetMessage(true, chartMsg);
}
if(vesselMsg != null)
{
confirm("chartMsg"+vesselMsg);
_element.ShowVesselLoading(true, vesselMsg);
}
_stuckWatchdog = setTimeout( "ClearPendingRequest();", 60000);
var message = msg;
var context = '';
<%=GetHintFromServer%>
}
catch(e)
{
alert( "Exception error on SendRequest(): " + e);
}
}

View 2 Replies

State Management :: Unable To Serialize The Session State In 'StateServer' And 'SQLServer' Mode

Dec 12, 2010

I am new to .net 4.0 and am using EF Model and SessionState Mode=SqlServer and I am getting this error below:

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.

I checked the stack trace and its complaining about

[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("PoplarGroveModel", "tblMenuRole", "tblMenu", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(PoplarGroveDataModel.Menu), "tblRole",

[Code].....

I marked it as serializable but then it complains about System.Data.Objects.ObjectContext is not marked as serializable and hence throws the same error.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved