Asp.net 3.5表单身份验证超时

时间:2016-03-16 08:23:16

标签: c# asp.net session web-config

我在

中有这些代码
 <authentication mode="Forms">
  <forms loginUrl="/Login" timeout="180" name="__Auth"     slidingExpiration="true" />
</authentication>

Plesk面板会话设置如下:    身份验证模式:表单    Sesion超时(分钟):180 此设置会自动在web.config aas中添加一行:

 <sessionState timeout="180" />

一切似乎都很好。 会议结束得太早(大约10分钟) 我找不到理由。

2 个答案:

答案 0 :(得分:1)

请在您的应用程序的Web配置中包含以下代码。

  <session State timeout="30" mode="In-proc" />

并检查时间

但是你在会话状态之间删除空格并删除 - 在进程中...

答案 1 :(得分:0)

请在您的web.config文件中包含以下代码并尝试。

<?php $args = array(

    'post_type' => 'referenties', 'posts_per_page' => 5, 'order' => 'DESC',

  ); ?>


<?php 
    $number = 0; 
    query_posts($args); 
    if(have_posts()):  
    ?>




<!-- /Carousel script -->
<div class="container">
    <div class="carousel-loop">
        <div id="myCarousel" class="carousel slide">
  <ol class="carousel-indicators">
    <?php while(have_posts()): the_post(); ?>
    <li data-target="#myCarousel" data-slide-to="<?php echo $number++; ?>"></li>
    <?php endwhile; ?>
  </ol>
    <div class="controle-buttons">
      <a class="carousel-control left" href="#myCarousel" data-slide="prev"><i class="fa fa-chevron-circle-left"></i></a>
      <a class="carousel-control right" href="#myCarousel" data-slide="next"><i class="fa fa-chevron-circle-right"></i></a>
  </div>
  <!-- Carousel items -->
  <div class="carousel-inner">
    <?php while(have_posts()): the_post(); ?>
          <!-- Carousel nav -->

    <div class="item">
        <div class="col-sm-2">
        <?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?>
            <?php the_post_thumbnail(array(150,150)); // Declare pixel size you need inside the array ?>
        </div>
        <div class="col-sm-4">
                    <h4><?php the_title(); ?></h4>
                        <?php $bedrijf = get_field('naam_bedrijf'); ?>
                        <?php $feest = get_field('feest'); ?>
                        <?php $link = get_field('mylink'); ?>
                        <?php echo '<p>Bedrijfsnaam: ' . $bedrijf . '</p>'; ?>
                        <?php $post_object = get_field('mylink');
                            if( $post_object ): $post = $post_object; setup_postdata( $post ); ?>
                                <p>Feest type: <a style="color:#ff6600" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
                            <?php endif; ?>
        </div><?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
        <div class="col-sm-4 col-sm-offset-1">
        <h4>Opmerking</h4>
            <p><?php echo custom_field_excerpt_longer(); ?></p>
                <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
                <?php echo '<p>' . wp_review_show_total() . '</p>'; ?>
        </div>
        <?php endif; ?>
    </div>
    <?php endwhile; ?>
相关问题