Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I use ASP.NET to check if cookies are enabled without having a web page?
    text
    copied!<p>I am working on a desktop application that automates numerous websites and processes the returned data. This application will be run on a server and the user will connect with remote desktop. The automation breaks when the server doesn't have cookies enabled, and instead of having the application stop working, I would like to check the server settings and tell the user why it isn't working.</p> <p>To do this, I decided to create an ASP.NET Web Service. I figured that the web service could store the cookie and then try to access the data. If the data is found, cookies are enabled and everything is good to go.</p> <p>I have read numerous tutorials like: <a href="http://www.csharphelp.com/2006/05/c-and-cookies/" rel="nofollow">http://www.csharphelp.com/2006/05/c-and-cookies/</a> that explain how to store and access cookies through ASP.NET. All of these however use a website. The user clicks a button to generate a request and the web service can then send a response. I do not know how to make the process work without having a website, and I do not wish to automate a site of my own hosting as well. I feel like I should be able to run a method on my webservice and it should work.</p> <p>Does anyone know how this would be done? I'd like a webservice that can handle request and response so I can create, store, and access cookies. I thank you for any help that you may offer.</p> <p>Nathan Tornquist</p> <p>EDIT:</p> <p>I am working on an database driven application. Some of the pieces are automated web sites, where the user puts in some data and then the program opens up a webBrowser control, fills in the forms, and then formats the resulting data. I would like to test if cookies are enabled based on the users security privileges so that I can disable automation and allow the user to fill in the data on their own if required. Most of the websites require cookies to log in.</p> <p>This will be running on various versions of Windows Server. By default I think the webBrowser control has the same security settings as Internet Explorer.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload