Sharing Session Between Webservice And Application

Apr 23, 2010

I have an asp.net application and webservices (asmx) that reside in the same application but not in the same folder of the aspx files. I aslo have a winform application that uses the webservices. I have marked the webservice methods with [WebMethod(EnableSession = true)] but I am not able to share the same session values that are on the application in the webservices. The winform application has access to the sessionID from the application and I am using the following code

Uri uri = new Uri(ServerServiceUrl);
_cookieContainer = new CookieContainer();
_cookieContainer.Add(new Cookie("ASP.NET_SessionId", SessionID, "/", uri.Host));

My question is: Is there something that I am missing or doing wrong that I cannot access the application sessioin from the webservices?

View 2 Replies


Similar Messages:

WCF / ASMX :: Using Static Hashtable In Webservice For Sharing Common Data Among Different Users

Nov 26, 2010

We are using static hashtable in webservice for sharing common data among different users. Is it safe? Is there any better way?

View 1 Replies

How To Stop IE8 Session Sharing

May 2, 2010

I'd like to stop IE8 from sharing my sessions in one of two ways (or both if possible):

Through configuring the browser to always do this (so I can force my users to configure their browsers in this way). Through code in my web application.

View 1 Replies

State Management :: Session Sharing Between Two Websites?

Aug 13, 2010

I have a website A which has a link to website B which is currently opening in a different window. When clicked on a link to, the login for B is automatically taken care of as both the websites have same user login credentials.

Now a change in the system has made me embed website B into website A. ie., B will open in the same window of A.. I could achieve this using an IFrame. Now, the session from site A needs to be carried out to site B. Presently, when navigated from A to B, all the sessions on A expire. Once navigated to B the session time out of B from the webconfig is taken. I have used "InProc" as my state management option in web config. Is it possible to maintain single session for both the webistes? If not how to continue same session times for both webistes? I do not want to use "SQL server" state mode.

View 4 Replies

State Management :: Sharing Session Between Applications?

Oct 18, 2010

I would like to share the session variables between 2 applications. basically I have a website and in there I have 2 applications and want to share the session object betwen the two. Is there a way to set something in web.config to enable this?

View 2 Replies

Subdomain - Sharing Session Data Between Domains In Asp

Jun 3, 2010

i want to maintain session data between two applications or domains [URL]. I have read on net about this, but many people pointing many different ways to do it, with people commenting +ve and -ve responses to all. Plus many are just providing theoretical answer, do this and that ,but no code at all. are these steps all that is required?

1) in web.config: <httpCookies domain=".[URL]"/>

2) store session data in sql DB as:(after preparing the db for storing sessions)

<sessionState mode="SQLServer" sqlConnectionString="Data Source=YourServer;
Integrated Security=True;database=MySessionDB" sqlCommandTimeout="30"
allowCustomSqlDatabase="true"/>
<machineKey decryption="AES" validation="SHA1" decryptionKey="..." validationKey="..." />

3)Am confused about this one: i want to set the domain for the session cookie like this

Response.Cookies["ASP.NET_SessionId"].Domain = ".[URL]";
But where should this code be written?
this entry: [URL]says: use System.Web.SessionState.SessionIDManager as a base class but the SaveSessionID method is not virtual so cannot be overridden. Options are: either explicitly re-implement the interface method or decorate SessionIDManager class and after calling SessionIDManager.SaveSessionID set Response.Cookies[SessionIdCookieName].Domain to our domain.

Only if the author had provided real code, step 3 would have been clear. Plus all this 3 steps enough to share session among the domains?

View 1 Replies

Sharing Session Cookie Across Two Named Domains?

Jan 19, 2011

I have a .net webapplication with the following domains:

www.domain.com
sub.domain.com
files.domain.com

When a user is logged on to domain.com or sub.domain.com, I'd like them to share session state (i.e. be logged into both domains at once). This is possible to do by setting the domain on the session coookie to be ".domain.com". However, my problem is that the domain "files.domain.com" should not have session state due to security issues (xss attacks from user-made files hosted on that domain is an issue).

Is it possible in ASP.NET to use the same asp.net session id for these two domains, but not the third one?

View 5 Replies

State Management :: Sharing Session Information Across Sites?

Feb 3, 2011

After doing some research, I found that <sessionState> can be hosted in SQL Server allowing applications to read from the same source. Essentially my app has two sides: a WCF library and an ASP.NET MVC 3 web site, the WCF has authentication and other DB IO methods and the MVC does the display. Now, the MVC stores a value in the session and then the WCF reads it and creates another for the MVC to read later. Problem is, neither can read each others session data, they can write to the same repository but can't share.

How do I go about them sharing the same information? How can I tell <sessionState> that the session started on the MVC side is the same as the WCF side and viceversa? I've tried

View 6 Replies

How To Prevent Multiple Browser Windows From Sharing The Same Session?

Mar 25, 2010

I have ASP.net application that is basically a data entry screen for a physical inspection process. The users want to be able to have multiple browser windows open and enter data from multiple inspections concurrently. At first I was using cookie based sessions, and obviously this blew up.I switched to using cookie-less sessions, which stores the session in the URL and in testing this seemed to resolve the problem. Each browser window/tab had a different session ID, and data entered in one did not clobber data entered in the other.

However my users are more efficient at breaking things than I expected and it seems that they're still managing to get the same session between browsers sometimes. I think that they're copying/pasting the address from one tab to the other in order to open the application, but I haven't been able to verify this yet (they're at another location so I can't easily ask them).Other than telling them don't copy and paste, or convince them to only enter one at a time, how can I prevent this situation from occurring?

View 5 Replies

State Management :: Session Sharing With Virtual Folders

Jul 14, 2010

i have two solutions, 1. user management and 2. travel management. i publish the user management solution to [URL] and i publish the travel management to [URL] here i face the problem. the default home page would be [URL], its a windows authentication in page load, i capture the username, pass it to procedure which will fetch me his credentials on access. i store these in a session.

in the home page i have link to navigate to travel page, when i try to access the sessions in travel page, its empty. i tried printing the session id in both user management and travel, both are same but the sessions created in user management are empty in travel. what would be problem here and how can i resolve this.

View 2 Replies

Sharing Session Variables From Http And Https Versio?

Mar 22, 2010

I am trying to fix an ASP.NET site that a friend had botched converting from older technologies. To the user, the site appears to have public and secured sections. Behind the scenes, the public and private sites are separate web applications with separate app pools. The difficulty arises because it appears that the applications share the same session IDs (when going from the public to the secured pages, the session ID remains the same), yet none of the (InProc) session variables are getting passed from the public site to the private one. Basically, the workflow consists of the user checking a checkbox ("I agree" type of stuff) on the public site (let's call that page http://www.boring.gov/iAgree.aspx), then logging in on the secured site (let's call that page https://www.boring.gov/login.aspx). The commandments from the parent agency in DC are that the user may not bookmark the login page, the user has to click "I agree" every time they log in, and that the "I agree" stuff has to be on a separate page. What am I missing? How would you do it? Notes:dows 2003 server.2 - Yes, it is a government agency.3 - I would have done things very differently if I was doing the conversion, but I wasn't brought in until the poop hit the fan, and it is too late to redo things.4 - Two previous SO threads that appear to be related, yet don't apply are this and that

View 4 Replies

State Management :: How To Disable Session Sharing Among Different Applications With Same Domain

Jul 14, 2010

I have 2 applications App1 and App2 on same domain, both with Forms authentication, each using a different database instance for authentication.

First, I open a browser with application www.mydomain.com/App1 and log on.

After that, when I open another instance of the same browser with application www.mydomain.com/App2 and log on, first browser loses session and goes back to login page.

I need each application on same domain to have its own session so that both can stay logged on.

View 2 Replies

Setting Cookie Expiration With ASP Classic To Session Sharing Solution

Jun 25, 2010

I'm implementing the session sharing structure from this link for an ASP classic site to begin the gradual conversion process to ASP.NET. I'm trying to extend the cookie expiration time so that users do not get signed out of the site when the session expires. At the place where the cookie is created in SessionPage.cs I've added the line in the CreateNewSessionCookie() method: cookie.Expires = DateTime.Now.AddDays(14);

Now this works fine, however, it only works if the user first visits an ASP.NET page, and then visits the ASP classic pages. It doesn't work if visiting an ASP classic page first (looking at the cookie through firefox confirms that different expiration values are given based on if I visit an ASP or ASP.NET page first.) I'm still a bit fuzzy on the mechanics behind this implementation as I don't have a complete understanding of session and cookie handling. However, I would have thought that the VB6 SessionMgr object is calling the SessionUtility DLL, and thus is using the same code to issue the cookie. I have re-registered the SessionUtility using gacutil, and re-exposed it using regasm. How else is the cookie being issued when a user accesses an ASP classic page? How can I change the expiration time?

View 1 Replies

State Management :: Sharing The Session Variables Between Two .net Applications Using SQL Server Mode?

Sep 18, 2010

I have two different IIS applications within the same domain(let us say www.mydomain.com) , both of these applications use the same database instance(same connectionstring), now what I want is that both of applications can see each sessions variables , can SQL Server session state mode helps in this case? Did someone try that before? Is there any other way to share the session variables?

View 3 Replies

Web Forms :: Prevent Multiple Browser Windows Or Tabs From Sharing Same Session

Mar 6, 2013

Preventing user to open duplicate web application,while it is running .....

View 1 Replies

How To Create A Desktop Sharing Application

Feb 2, 2011

how can we create a desktop sharing application in asp.net? can we use silverlight for this?

or any third party tool that we can use?

View 3 Replies

Sharing Forms Authentication Between A Website And A Web Application?

Aug 10, 2010

Previously, I have implemented two separate ASP.NET Web Applications, one as a virtual application in a subfolder of the other, which successfully shared forms authentication as described at [URL]

(basically, setting up identical <forms> sections in the Web.config, and keys in the <machineKey> section)

Now, I am trying to do something similar to get BlogEngine.NET (which is a Web Site, not a Web Application) to work sharing forms authentication with a Web Application of mine. I have tried both putting it as a virtual application in a subfolder, and setting it up as a separate IIS site (same domain name, different port number), but I can't get the authentication to work at all: when I go to the blog while logged in to my Web Application, Page.User.Identity.IsAuthenticated is always still "false".

I'm really not sure how to even start debugging this, since the forms authentication is handled before any of my code runs.

[Code]....

View 1 Replies

Security :: Sharing Login Between Three Websites (application)?

Jul 5, 2010

I have a scenario with three applications:

1) Portal: where user executes login

2) Site1: after login at "Portal" user is able to use Site1

3) Site2: after login at "Portal" user is able to use Site2

I just need to execute a validation in Site1 and Site2, to validate if they (users) did login at Portal1.

Something like (in site1 main page page_load).

{
if (notFromPortal)
{
//redirect to Denied.apx
}
}

How can I do this in a simple way? With cookies? Does somebody have a url with sample?

My security requirements are almost zero. I just wanna prevent that user put a url from Site2 in browser and see a Site2 page.

View 1 Replies

How To Use Facebook Sharing And Tweet Sharing Tools

Dec 1, 2010

I see on the bottom of blog pages a sharing buttons (Twitter and Facebook), where if clicked the link behind (which is normally the blog page url) the fshare button takes the clicker to the blog site facebook page respectively.

How does one do this in asp.net 2 , does one one use the <%# %> in the url part of these share buttons, are there any examples of how this is done?

View 8 Replies

AJAX :: Keeping Session Alive Via Webservice?

May 21, 2010

if updating a session value from within a webmethod call made from jquery would be able to keep my session alive?

JS:

$.ajax({
type: "POST",
url: "MyWebService.asmx/Keepalive",
async: true, [code]....

View 1 Replies

State Management :: Can't Read Session Value In Webservice In Wcf?

Jul 17, 2010

I am working with globalization project to convert website in spanish

In my global.asax.cs file I have declared

string CountryCode="US";
//this is for setting country
Session["CountryCode"]
= CountryCode;

And I try to get current culture information through

System.Threading.Thread.CurrentThread.CurrentCulture.ToString();and store it in string called sLocale

And in other file called search.cs there is function called fillproducts() as follow

[Code].....

View 1 Replies

Call An Asmx Webservice Without Extending User Session?

Jan 25, 2011

In my ASP.net 3.5 application I'm calling an asmx webservice that is part of the application. Calling the webservice entends the user's session timeout, which is undesirable in this case.How can I call a webservice on my server without extending the session timeout? Is there a way in IIS to designate it as being outside of the session scope? (apologies if I'm using incorrect terminology) Can I designate a directory in the ASP.net web.config file as being outside the session?

View 1 Replies

Session / Renew An Application Session By Just shaking The Mouse?

Apr 9, 2010

Is it possible to renew an application session by just shaking the mouse?

View 8 Replies

WCF / ASMX :: How To Use Webservice In Application

Nov 3, 2010

try to guide how to call web service in my asp.net Application. I had Web reference of that web service.I added the Service to my application.i created name space and I try to use methods inside the web service it showing unable to connect server machine. I want to Use jangomail services from asp.net application. my application need to send mass mailing using jangomail service.when i try to access that web service( http://api.jangomail.com/api.asmx) it giving Some Error like Connection failed to

View 4 Replies

WCF / ASMX :: Convert A Webservice Application In To Wcf?

Mar 3, 2011

[Code]....

convert a webservice application in to wcf?

View 1 Replies







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