.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to Consume (Cookieless =true) Session Enabled Web services

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
  Hi, I need to use cookieless=true in web.config and enablesession=true in web methods.   I've two web methods like, [WebMethod(EnableSession=true)] public void SetName(string Name) { Session["Name"] =Name; } [WebMethod(EnableSession=true)} public string GetName() { return (string)Session["Name"] }   In my aspx.cs, using proxy I want to call SetName in button 1 click, and retrieve the name (which i put it into web service session on button 1 click ) in button 2 click like,   protected void Button1_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); proxy.SetName("Prabhu"); } protected void Button2_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); Response.Write( proxy.GetName()); } Here, How can I use cookie container and how can i achieve what Im expecting to do?   Please help me on this. thanks Prabhu P Work Smart, Not Hard

View Complete Post

More Related Resource Links

Session when Cookieless ="True" Page Ispostback is always false


When Session attribute Cookieless ="True" the page.Ispostback is always false.Cant understand the reason behind it.

And one more thing what is happening when we click Remember Me option in login control.As per my knowledge it is storing authentication cookie in it. If we can add data to authentication cookie then why we need session...we can add session data in that.. and authentication token is also regenerated for every new request like sessions.....i got confused after browsing for few hours.

Which one is more secure using cookies or URL for authentication and session.


Data 2.0: Expose And Consume Data in A Web Services World


The goal of the ADO.NET Data Services Framework is to create a simple REST-based framework for exposing and consuming data-centric services easily.

Elisa Flasko and Mike Flasko

MSDN Magazine August 2008

How to use cookieless session state...

I want to know how its work and it advantage and disadvantegePls explain me with example

Unable to consume ADO.NET Data Services from Silverlight.

Hi Everyone, I am having trouble consuming an ADO.NET Data Service from Silverlight.  I am able to get data back from a browser, but not in Silverlight. I am at a loss to figure this out.  Any help is much appreciated.  Let me know if you need more info. Thank you in advance for any help! Here is the the silverlight code: private Uri svcUri = new Uri("http://localhost:64522LocalTariffsDataService.svc"); private void ctrlViewLocalTariffs_Loaded(object sender, RoutedEventArgs e) { svcContext = new LocalTariffEntities(svcUri); svcContext.LocalTariffs.BeginExecute(OnLocalTariffsQueryCompleted, svcContext.LocalTariffs); } private void OnLocalTariffsQueryCompleted(IAsyncResult result) { Dispatcher.BeginInvoke(() => { DataServiceQuery<LocalTariffsEntityDataService.LocalTariff> query = result.AsyncState as DataServiceQuery<LocalTariffsEntityDataService.LocalTariff>; LocalTariffsEntityDataService.LocalTariff returnedLocalTarrifs = query.EndExecute(result).FirstOrDefault(); // Exception is thrown here. dgLocalTariffs.DataContext = returnedLocalTarrifs; }); } Here is the exception: < E2ETraceEvent xmlns = " http://schemas.microsoft.com/2004/06/E2ETraceEvent " >

Ajax AutoComplete is not working when Cookieless is true


Hi All,

I have a web page that using AutoComplete Asp.net Ajax Control.

It was working find when the Cookieless is not "True".

I have no idea my it is not working when I set cookieless to "true".



Cookieless session



I'm pretty new to the .Net environment and am learning all the time.  I was however quite surprised (or shocked) when I turned off cookies to test a bit of "flowery" functionality on my latest project.  I use the term "flowery" because its nice to have and not key to the overall user experience.

I did however discover that my postbacks stopped working as well :).  I don't know whether this was down to Ajax UpdatePanels or postback as a whole, but it did come as quite a shock.  I changed the webconfig cookieless value and everything works again.  The downside is that the stuff I've read so far doesn't exactly give cookieless sessions a glowing report - what with security issues and potential refactoring.  Admittedly from what I've tested, everything seems to work ok in the cookieless environment but I may have to make changes to things like my Facebook like buttons that capture an absolute URL.

The question I have is why does something as basic as postbacks have a dependency on cookies - may as well use javascript and flash whilst we're at it.  Or have I got it wrong?  Or is there something I can do to work round the issue?

Ironically, with cookies turned off I couldn't even get the ASP.NET site to load!!!

Any advice, tips,hints?


how to consume wcf 4.0 rest services in asp.net MVC



how to consume wcf rest services in asp.net MVC? there is any standards are available?

in my project SOA, so all the data came from wcf 4.0 rest services if there is any coding examples or resources to consume wcf services in MVC 2.0

How to properly test SSL enabled web services


Maybe I am overthinking this a bit but I have a set of SSL enabled third party web services that I want to test. The url for the web service is essentially https://mythirdpartyws.com/webservices/

Do I need to have a certificate setup on my test ASPX page to fully encrypt this connection or am I OK. with simply a simple ASPX page, create my objects from the WSDL and have at it?

Consume SharePoint List in Excel Services


I found some older questions regarding this but they are all listed in the Pre-SharePoint 2010 forums. I wanted to know if there is anything I can do to more easily pull data from a SharePoint List (more specifically a set of related lists) into Excel Services such that data refresh is handled as well.


I found a couple topics that used UDF as solutions to this problem, but I am not sure if they will handle data refresh. These solutions are discussed in: http://social.msdn.microsoft.com/Forums/en-US/sharepointexcel/thread/79f5c968-b68f-4d53-bfe0-d57258cfed6c and http://social.msdn.microsoft.com/Forums/en-US/sharepointexcel/thread/16f9255d-cd06-4687-ab8e-68bd6210d0f8


I am hoping the 2010 version of Excel Services can handle this more simply, thanks!

Create and consume WCF for SharePoint 2010 FBA enabled sites


Hello Everyone:

I would like to get ideas, hints or suggestions on implementing following scenario,

Create a WCF service, host in SharePoint 2010 Form Based Authentication using SQL Membership Provider enabled site collection and consume that service from another seperate asp.net web application such that whenever items in document library is inserted/updated using one of service methods, ModifiedBy field is automatically reflected based on the user who call that service method.

Thanks in advance!

Suman Pradhan

WCF: Consuming Claims-Enabled WCF Web Services as SharePoint 2010 External Content Types, Part 4

Learn how to use SharePoint Designer 2010 to consume a claims-enabled web service.

Access Services are not enabled on the service or ....


I am trying to publish from Microsoft Access to Access Services on Sharepoint 2010. I am getting the following error.

“http://win-rprsdfkljs:33332/team/SitePages/Home.aspx/ “did not respond.  Either the server does not exist, Microsoft Access Services are not enabled on the server, or the server is using an older version of Microsoft Access Services that is not compatible with Access 2010.

I am not sure but I don't think Access Services are enabled because I don't see it listed in the "Service Applications" section of SP 2010 CA.  the list of Items it shows is:

  • Application Discovery and Load Balancer Service Application  Application Discovery and Load Balancer Service Application Started
    Application Discovery and Load Balancer Service Application Proxy_64033b8a-805d-4bb7-9ee7-8cdf22c6f9ac  Application Discovery and Load Balancer Service Application Proxy Started
    Application Registry Service  Application Registry Serv

basics how to consume remote web services

Hello, i'm new in web services area so i need some help. I dont know how to call remote web services, for example http://www.webservicex.net/globalweather.asmx. I watched all video from asp.net about web services but there they are calling local web services. So please share all info what you know :) thanks a lots

Installing and Uninstalling Services

Installing and Uninstalling Services.Unlike most projects you create in Visual Studio .NET, Windows Service projects cannot be run directly from the development environment by pressing F5. This is because the service in the project must be installed before the project can run.

You can quickly install your service application by using a command line utility called InstallUtil.exe.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Getting Started with Windows SharePoint Services

Of all of the capabilities of SharePoint, I thought I would start with the most basic installation - as a corporate intranet. It is likely that we will need to discuss some of the elements of SharePoint as we go along, so this also gives us the opportunity to review these elements for future reference.

Before going into too much detail, I would like to point out that you can try the core SharePoint framework (known as Windows SharePoint Services or WSS) for free. On Microsoft's Web site you can download a trial version of Virtual PC 2004 (VPC). Using VPC, you can install the Windows 2003 Evaluation Kit and the WSS add-on. This combination will give you 45 days to evaluate the setup.

Building a Searchable Phone Directory with Windows SharePoint Services

I want to continue to build out the intranet site we've started in our previous articles. A standard item in every intranet is a staff/employee list. Most companies implementing Windows SharePoint Services (WSS) are large enough to have a database that contains all employees. We will use the aggregation features of SharePoint to include data from this database into our intranet.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend