Application Restart on folder creation

Discussion in 'ASP .Net' started by Ray Booysen, Jun 23, 2006.

  1. Ray Booysen

    Ray Booysen Guest

    In our application, we merge documents for our clients. The directory
    structure is as follows:



    webroot
    ->bin
    ->Documents
    ->Company
    -> Company X
    -> Company Y


    If I create a new folder under Company:

    webroot
    ->bin
    ->Documents
    ->Company
    -> Company X
    -> Company Y
    -> New Company

    The application immediately restarts. Nothing is in the Event log.
    What am I missing?

    Kind Regards
    Ray Booysen
     
    Ray Booysen, Jun 23, 2006
    #1
    1. Advertising

  2. Hi Ray,

    It sounds like your merges are touching the file system in a way (or
    location) that affects the application's root. Is it possible to do your
    merging in a separate application area?

    Here's more on restarts:

    http://msdn2.microsoft.com/en-us/library/ms178473.aspx

    Ken
    Microsoft MVP [ASP.NET]


    "Application Restarts

    Modifying the source code of your Web application will cause ASP.NET to
    recompile source files into assemblies. When you modify the top-level items
    in your application, all other assemblies in the application that reference
    the top-level assemblies are recompiled as well.

    In addition, modifying, adding, or deleting certain types of files within
    the application's known folders will cause the application to restart. The
    following actions will cause an application restart:

    Adding, modifying, or deleting assemblies from the application's Bin folder.

    Adding, modifying, or deleting localization resources from the
    App_GlobalResources or App_LocalResources folders.

    Adding, modifying, or deleting the application's Global.asax file.

    Adding, modifying, or deleting source code files in the App_Code directory.

    Adding, modifying, or deleting Profile configuration.

    Adding, modifying, or deleting Web service references in the
    App_WebReferences directory.

    Adding, modifying, or deleting the application's Web.config file.

    When an application restart is required, ASP.NET will serve all pending
    requests from the existing application domain and the old assemblies before
    restarting the application domain and loading the new assemblies."


    "Ray Booysen" <> wrote in message
    news:u$...
    > In our application, we merge documents for our clients. The directory
    > structure is as follows:
    >
    >
    >
    > webroot
    > ->bin
    > ->Documents
    > ->Company
    > -> Company X
    > -> Company Y
    >
    >
    > If I create a new folder under Company:
    >
    > webroot
    > ->bin
    > ->Documents
    > ->Company
    > -> Company X
    > -> Company Y
    > -> New Company
    >
    > The application immediately restarts. Nothing is in the Event log. What
    > am I missing?
    >
    > Kind Regards
    > Ray Booysen
     
    Ken Cox [Microsoft MVP], Jun 23, 2006
    #2
    1. Advertising

  3. Are you sure 'Company' is not a web application in IIS?

    I would recommend keeping all your files outside the virtual directory
    anyway. It would eliminate this problem, and eliminate the possibility that
    someone simply browses to the right folder,e tc.

    "Ray Booysen" <> wrote in message
    news:u$...
    > In our application, we merge documents for our clients. The directory
    > structure is as follows:
    >
    >
    >
    > webroot
    > ->bin
    > ->Documents
    > ->Company
    > -> Company X
    > -> Company Y
    >
    >
    > If I create a new folder under Company:
    >
    > webroot
    > ->bin
    > ->Documents
    > ->Company
    > -> Company X
    > -> Company Y
    > -> New Company
    >
    > The application immediately restarts. Nothing is in the Event log. What
    > am I missing?
    >
    > Kind Regards
    > Ray Booysen
     
    Marina Levit [MVP], Jun 23, 2006
    #3
  4. Ray Booysen

    Ray Booysen Guest

    Hi Ken. I'll have a look at this.

    I can't unfortunately without a big rewrite of the file handling. I
    wrote a user control that allows clients to view their own files. And
    the control exposes the URLs of the files to allow downloading. This
    would obviously need a change.

    Its strange as I use the .NET Framework to create the folders. Anyway,
    I'll test more and let the newsgroup know of any findings I have.

    Cheers
    Ray


    Ken Cox [Microsoft MVP] wrote:
    > Hi Ray,
    >
    > It sounds like your merges are touching the file system in a way (or
    > location) that affects the application's root. Is it possible to do your
    > merging in a separate application area?
    >
    > Here's more on restarts:
    >
    > http://msdn2.microsoft.com/en-us/library/ms178473.aspx
    >
    > Ken
    > Microsoft MVP [ASP.NET]
    >
    >
    > "Application Restarts
    >
    > Modifying the source code of your Web application will cause ASP.NET to
    > recompile source files into assemblies. When you modify the top-level items
    > in your application, all other assemblies in the application that reference
    > the top-level assemblies are recompiled as well.
    >
    > In addition, modifying, adding, or deleting certain types of files within
    > the application's known folders will cause the application to restart. The
    > following actions will cause an application restart:
    >
    > Adding, modifying, or deleting assemblies from the application's Bin folder.
    >
    > Adding, modifying, or deleting localization resources from the
    > App_GlobalResources or App_LocalResources folders.
    >
    > Adding, modifying, or deleting the application's Global.asax file.
    >
    > Adding, modifying, or deleting source code files in the App_Code directory.
    >
    > Adding, modifying, or deleting Profile configuration.
    >
    > Adding, modifying, or deleting Web service references in the
    > App_WebReferences directory.
    >
    > Adding, modifying, or deleting the application's Web.config file.
    >
    > When an application restart is required, ASP.NET will serve all pending
    > requests from the existing application domain and the old assemblies before
    > restarting the application domain and loading the new assemblies."
    >
    >
    > "Ray Booysen" <> wrote in message
    > news:u$...
    >> In our application, we merge documents for our clients. The directory
    >> structure is as follows:
    >>
    >>
    >>
    >> webroot
    >> ->bin
    >> ->Documents
    >> ->Company
    >> -> Company X
    >> -> Company Y
    >>
    >>
    >> If I create a new folder under Company:
    >>
    >> webroot
    >> ->bin
    >> ->Documents
    >> ->Company
    >> -> Company X
    >> -> Company Y
    >> -> New Company
    >>
    >> The application immediately restarts. Nothing is in the Event log. What
    >> am I missing?
    >>
    >> Kind Regards
    >> Ray Booysen

    >
    >
     
    Ray Booysen, Jun 23, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MisterG
    Replies:
    3
    Views:
    2,168
    MisterG
    Aug 22, 2003
  2. Vyacheslav Lanovets
    Replies:
    2
    Views:
    3,131
    Juan T. Llibre
    Jul 27, 2005
  3. =?Utf-8?B?Q2hhaW5zYXdEdWRl?=

    retain application variables on application restart

    =?Utf-8?B?Q2hhaW5zYXdEdWRl?=, Feb 3, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    442
    Brock Allen
    Feb 3, 2006
  4. IUnknown
    Replies:
    5
    Views:
    806
    Juan T. Llibre
    Jun 3, 2008
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    301
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page