Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need cookies files location, searched in google i got below sollution

string strPath = Environment.GetFolderPath(Environment.SpecialFolder.Cookies);
this is working fine in test application, using above line "C:\Documents and Settings\My System name\Cookies"

but in my application it is showing that "C:\Documents and Settings\APP Pool name\ASPNET\Cookies" this is the wrong.

In test application it is working, but in my original application not working. What is the problem? shall i change any web.config settins.

Thank you,
Posted
Updated 23-Apr-14 3:33am
v3

i think u have not entered correct username and password
 
Share this answer
 
Comments
sampath1750 24-Apr-14 2:43am    
I entered correct user name and password
sampath1750 24-Apr-14 2:46am    
My original problem is, if the user deletes the history cookies also deleting, cookies wont delete permanently? is ther any alternate for cookie
Actually what you want to achieve with cookies?
 
Share this answer
 
http://stackoverflow.com/questions/3801675/where-cookies-are-stored-in-system
 
Share this answer
 
Comments
sampath1750 23-Apr-14 9:29am    
I need cookies location using c#.net code. Test application working, original appication it is showing different
XML
Set identity : ApplicationPoolIdentity

add impersonate=true under web.config file as

<identity impersonate="true" userName="OS_Username" password="os_password"/>
 
Share this answer
 
Comments
sampath1750 24-Apr-14 1:45am    
in which section should i add above line in web.config, i am using forms authentication
XML
<system.web>
<identity impersonate="true" userName="OS_Username" password="os_password"/>
</system.web>
 
Share this answer
 
Comments
sampath1750 24-Apr-14 2:17am    
i applied, but i got below error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not create Windows user token from the credentials specified in the config file. Error from the operating system 'Logon failure: unknown user name or bad password.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900