2
Answers

File Copy

basanth alluri

basanth alluri

15y
3.7k
1
Hello, I want to do a small program (C#) that allows me to copy some files from one computer to another.(the computers are in the same local network). How can I do this? can you give me an example? some classes that do that? thanks
Answers (2)
0
jinwolf

jinwolf

NA 176 0 20y
My method is wrong, that only finds out if the browser is capable of handling cookies. To find out if cookies are enabled you have to write a cookie then read it back, if they are disabled you recieve nothing back because you have written nothing. e.g. HttpCookie MyCookie = new HttpCookie("test"); MyCookie.Value = "test"; MyCookie.Expires = DateTime.Now; Page.Response.Cookies.Add(MyCookie); HttpCookie myCookieRead = new HttpCookie("test"); myCookieRead = Page.Request.Cookies["test"]; // Read the cookie information and display it. if (myCookieRead != null) return true; else return false; Thanks for the help given on this.
0
jinwolf

jinwolf

NA 176 0 20y
Cookieless is false. It just doesn't seem to matter what I do I get the same problem. The application thinks cookies are allowed.
0
nick 0

nick 0

NA 37 0 20y
That is the correct way to do it. Did you change the value of cookieless in the sessionState xml value. check your web.config under sessionState. cookieless="false"