I am trying to build some unit test using CassiniDev. First of all I create a Server and a Page and generate a request:
CassiniDevServer server = new CassiniDevServer();
server.StartServer("C:\\", 8080, "/", "localhost");
File.Delete(@"C:\Default.aspx");
File.Create(@"C:\Default.aspx");
WebClient browser = new WebClient();
browser.DownloadString(server.NormalizeUrl("Default.aspx"));
Everything is fine, but when I try to use the HttpSessionState object, it is null:
session = HttpContext.Current.Session;开发者_运维知识库
Should I do something else or additional steps?
精彩评论