IIS7 HTTP Error 503. The service is unavailable

Last post 09-10-2009, 6:14 PM by ddoms. 5 replies.
Sort Posts: Previous Next
  •  09-09-2009, 2:43 PM 55492

    IIS7 HTTP Error 503. The service is unavailable

    I need some assistance again please.
     
    Solving the original problem I had (see link above) has now created a new problem but I don't why it's happening.  On the dedicated web server (configuration at the end of this post) wile using FF, I'm getting a message that states "The connection was reset" when requesting a page that has 14 file upload controls on the page.  If I keep trying to access the page, I'll eventually (a couple of tries later) get "HTTP Error 503. The service is unavailable" and won't be able to access the site until the app pool is reset.  This does not happen on pages where I use only one upload control.
     
    This never happened with the AjaxUploader 3.0 20090518, only with AjaxUploader 3.0 20090827.  In referencing this KB post, I made the following changes in web.config:
     
    appSettings
    1. <add key="CuteWebUI.AjaxUploader.TempDirectory" value="\\computername\TempFolder"/>    
    2. <add key="CuteWebUI.AjaxUploader.WindowsUsername" value="userAccount" />    
    3. <add key="CuteWebUI.AjaxUploader.WindowsPassword" value="userPassword" />    
    4. <add key="CuteWebUI.AjaxUploader.WindowsDomain" value="companyDomain" />    

    system.web
    1. <securityPolicy>  
    2.     <trustLevel name="Full" policyFile="internal" />  
    3. </securityPolicy> 
    The KB post also had some info about the page lifetime being affected by altering the trust level.  It's not clear to me what is trying to be communicated here.  Maybe this is something I need to look at?
     
    If I run this locally (XP machine using Cassini), I get a System.Web.HttpException, "An error occurred while attempting to impersonate.  Execution of this request cannot continue." with the following stack trace:
     
       at System.Web.ImpersonationContext.GetCurrentToken()
       at System.Web.ImpersonationContext.ImpersonateToken(HandleRef token)
       at System.Web.ApplicationImpersonationContext..ctor()
       at System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e)
       at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
       at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
       at System.Web.HttpRuntime.ProcessRequest(HttpWorkerRequest wr)
       at Microsoft.VisualStudio.WebHost.Request.Process()
       at Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)
       at Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)
       at Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(Object acceptedSocket)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
     
    I'm wondering how the component impersonation works.  Does the network traffic to the temp folder use the supplied account?  Or is it the entire page or application?
     
    Here are the other relavent web.config settings:
     
    system.web > pages > controls
    1. <add namespace="CuteWebUI" assembly="CuteWebUI.AjaxUploader" tagPrefix="CuteWebUI"/> 
     system.webserver > modules
    1. <remove name="CuteWebUI.UploadModule" />  
    2. <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader"/> 
    Couple of notes about the environment.  This site is a virtual directory in the root of the domain.  It's typically a mirror of what we have in production and we use it as a staging environment.  Since production is using the older component and configuration (I haven't released this version yet) they are not currently the same and production doesn't suffer from this problem.  This is why I have the "remove" statement in the system.webserver > modules node in web.config.  We're using Windows Server 2008, IIS7 running in a separate app pool in Integrated mode.
     
    This is as much info as I've been able to gather.  I'm hoping you can setup a test and try for yourselves.
     
    Thanks,
    David
  •  09-09-2009, 10:09 PM 55502 in reply to 55492

    Re: IIS7 HTTP Error 503. The service is unavailable

    David
     
    does your web.config contain <identity impersonate = "true" > ?
     
    What account is running for the ASP.NET ?
     
    Is the userAccount an account of your Server ?
     
    how about make the userAccount into Administrators of the Server ?
     
    Regards,
    Terry
  •  09-09-2009, 10:15 PM 55503 in reply to 55492

    Re: IIS7 HTTP Error 503. The service is unavailable

    The uploader will impesonate the account while it need read write the files.
     
    But for the Uploader controls , it will impesonate the account again and again for the controls.
     
    I think that caused that problem.
     
    Please test it more.
     
    We will try to reproduce your issue at first.
     
    Regards,
    Terry
  •  09-09-2009, 10:26 PM 55504 in reply to 55492

    Re: IIS7 HTTP Error 503. The service is unavailable

    David,
     
    We can reproduce your issue in a multiple uploader page.
     
    We are investicating on this issue and will get back to you asap.
     
    Regards,
    Terry
  •  09-09-2009, 11:49 PM 55506 in reply to 55504

    Re: IIS7 HTTP Error 503. The service is unavailable

    David:
     
    Please try the last version. We have improve it to prevent that issue (in our testing environment)
     
    I suggest you put more time to test your application.
     
    Regards,
    Terry
  •  09-10-2009, 6:14 PM 55546 in reply to 55506

    Re: IIS7 HTTP Error 503. The service is unavailable

    I think you got it!  We've tested it out and all is good again.  Thank you for the super fast turn-around.
View as RSS news feed in XML