Visual Studio?
テストプロジェクト中に Web のセッションを利用する場合、下記のように、ダミーなHttpContextを作成すれば、解決できます。
[TestInitialize] public void TestInit() { HttpContext.Current = new HttpContext(new HttpRequest("", "http://localhost", ""), new HttpResponse(new System.IO.StringWriter())); System.Web.SessionState.SessionStateUtility.AddHttpSessionStateToContext( HttpContext.Current, new HttpSessionStateContainer("", new SessionStateItemCollection(), new HttpStaticObjectsCollection(), 20000, true, HttpCookieMode.UseCookies, SessionStateMode.Off, false)); }
ページHandlerの場合は、下記のように
//WebControl.CustomPageはカスタマイズしたページです。 HttpContext.Current.Handler = new WebControl.CustomPage() { MyProperty = "1" };
0
�y�V���o�C��[UNLIMIT�����Ȃ�1�~] EC�i�r�Ń|�C���� Yahoo �y�V
LINE���f�[�^����[�����z500�~�`�I
�����z�[���y�[�W �����̃N���W�b�g�J�[�h �C�O�i���q�� ���萔���O�~�y�������łz �C�O���s�ی��������I �C�O�z�e��