Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

asp.net and time out error on input page

Hi folks,
 I have a web page that was written in Asp.net, and it is a input form for the user. ou can view the page at htpp://thejourneyofbear.com/adoptfrm.aspx (it also has the codepage of adoptfrm.vb.aspx). By the time the user clicks on the submit button (which really is just a button) it gives me this message:

"Your request timed out. Please retry the request."

I added the following tag to my web.config file <sessionState timeout="60" /> and I added it to my adoptfrm.aspx page too,  <% Session.Timeout = "60"%> but it still gives me the same error message. I am not sure what I need in the web config file, but I don't do any database connections nor logging in etc. I turned on the debug to true thinking that might help me trace it down but same old-same old error message. All the adoptfrm.aspx is a input form and the codepage is just a validation routine that gathers the info and sends it as an email. No db connects or anything like that, just simple.

What is wrong and how can I fix it?


<configuration>
  <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <system.web>
    <compilation debug="false" strict="false" explicit="true" targetFramework="4.0"/>
        <customErrors mode="Off"/>
        <sessionState timeout="60" />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
    </authentication>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
      </providers>
    </roleManager>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>
0
Overthere
Asked:
Overthere
  • 5
  • 3
  • 2
1 Solution
 
Rajkumar GsSoftware EngineerCommented:
Thougths

Can you try restart IIS ? - Since you changed web.config

Run - cmd - iisreset
0
 
OverthereAuthor Commented:
This problem is on the hosting site so I can not do that...
0
 
Rajkumar GsSoftware EngineerCommented:
Since the issue is with hosted site, you should have access to IIS to test properly.

Also session changes to web.config will come effect on restart IIS. Lets give this a try by contact IIS admin.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
OverthereAuthor Commented:
Okay, I have called them. Are ther items in the web config that I can safey delete? I do not do a sql connection nor do I do any forms authenication. It's strange what happens and has me baffled - one time it works fine with no time outs and the next time when I click the button to send, it times out. I let you know what happens soon, thanks for your patiences.
0
 
OverthereAuthor Commented:
I contacted the web hosting company and because we are on a shared server, they do not stop/restart web sites.
But here is the odd thing - even though I received a the error message on two tries after clicking the button, it sent the email message anywhere and the information was correct! I have  try/catch in the page that does the emailing and wonder if it is throwing a message because it is waiting on the rely-server? I have a sneaky suspion that is really where the problem lays.
I use Import Namespace="System.Web.Mail" even though it tells it's obsolete ( I can not seem to get a handle on doing the newer net.mail coding even with examples.)
what about content expires ( I don't know the format of that command) and no-cache ?
I am a stumped chump...:(
0
 
Rajkumar GsSoftware EngineerCommented:
Hi - I have requested moderator attention to this question. Hope your issue will be solved soon.

Raj
0
 
sammySeltzerCommented:
Are you using any session variables?

If yes, you may want to consider using cookies as your session is timing out on you.
0
 
OverthereAuthor Commented:
Yes, I am using session variables. What I decided to do was delete the current pages on the web site and upload them again.
And I commented out the tr/catch routine. Not a good thing but time is pressing - so far it seems to be okay, and although there has not been hardly any traffic using the input form, I thought I'd give it a day or two and see what happens.
I do know I do not want the page to cache and haven't figured out where to put that yet.
0
 
sammySeltzerCommented:
To be honest with you, the timeout you put in your web.config should be sufficient.

Try changing the mode from Forms to  InProc

From    <authentication mode="Forms">

to

   <authentication mode="InProc">

it has been known to solve these kinds of problems.
0
 
OverthereAuthor Commented:
That did it! Thanks!  Never had to change it like that before..
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now