0 Replies - 4855 Views - Last Post: 02 October 2012 - 10:26 AM Rate Topic: -----

#1 hobeau43  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-October 12

WPF Endpoint.Address Change Losing Cookie

Posted 02 October 2012 - 10:26 AM

I have a wpf application that connects to a soap web service and I need it to connect to any number of locations for this web service so I am allowing the user to type in the URL in a textbox and it gets saved in the Properties.Settings. I am then setting the Endpoint.Address to the url. It all works except for one thing, the web service uses ASP.net sessions to validate that the application is logged in so the service be set to allow cookies = true. I have it set in the app.config of my wpf application under Binding but for some reason the cookie is not being managed anywhere. When I use Fiddler I can see where the cookie is set in a return request from the service but the client isn't saving/using that cookie across web service methods.


AdminWebServiceClient adminclient = new AdminWebServiceClient();
adminclient.Endpoint.Address = new EndpointAddress(MyWPFApp.Properties.Settings.Default["CurrentURL"] as string);


This does set the URL correctly but again, I'm losing the cookie somewhere as the request isn't keeping track of it and sending the 'ASP.NET_Sessionid' cookie to the service to identify who is sending this service request. Anyone have any ideas on how to get the cookie when it's set and manage it? Thanks!

Is This A Good Question/Topic? 0
  • +

Page 1 of 1