Thank you for the helpful suggestions!

@Dan

I've got this at the beginning of my test script:

# Setup sessions
app->secrets(['SessionTest']);
app->sessions->cookie_name('sessiontest');
app->sessions->default_expiration(157248000);

I'm setting a session variable with this route:

get '/set' => sub {
 my $c = shift;
 
 $c->session(testvar => 1);
 $c->redirect_to('/');
};

And I'm checking the variable with a helper:
helper testvar => sub {
 my $c = shift;
 
 if($c->session('testvar')) {
  return 1;
 }
 
 return undef;
};

@Charlie

This is a freshly installed W2k12R2 box running IIS 8.5. I have ActivePerl 
5.24 installed. The config is as basic as I can get. Here's the steps I 
took to configure IIS.


   1. Install IIS w/ CGI support
   2. Copy test app to C:\Code\sessiontest\
   3. From Default Web Site -> Add Application
   4. Alias: sessiontest, Physical path: C:\Code\sessiontest\
   5. Select sessiontest application
   6. Add Handler Mapping for *.pl to C:\Perl64\bin\perl.exe "%s" %s

I'm then able to access the site at http://fqdn/sessiontest/app.pl. But 
sessions are a no go and no cookie is being created. When run from Morbo I 
see from Chrome Developer tools that the cookie is created with the name 
'sessiontest' which is what I named it.

I've ripped everything out and started from scratch in case I missed 
something, but nothing seems to be working so far.

Any other suggestions?



On Tuesday, July 18, 2017 at 10:34:35 PM UTC-4, Charlie Brady wrote:
>
>
> On Tue, 18 Jul 2017, Brandon Woodson wrote: 
>
> > So to further help anyone interested in helping me solve this problem. I 
> > put together a small Mojo::Lite app to help me troubleshoot. You can 
> check 
> > it out on Github <https://github.com/BWoodson/MojoSession>. 
>
> You'll need to also provide information about the IIS configuration. 
>
> My guess is that browsers are not returning the cookies to the application 
> (when the application is behind IIS) because of mismatched hostnames or 
> cookie path. 
>
> Standard browser development tools should show you any cookies being set 
> or returned in requests. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to