Web Connection
Using ~ in EXEFile Key in Web.config Does not unload servers
Gravatar is a globally recognized avatar based on your email address. Using ~ in EXEFile Key in Web.config Does not unload servers
  Abhay Sobti
  All
  Jul 30, 2024 @ 10:04pm

Hi All,

Using "~" in the EXEfile key in web.config does not unload the running EXE servers on IISRESET. Like in the entry below:

<add key="ExeFile" value="~\..\myApp.exe" />

However, giving an absolute path like below DOES unload the EXEs on IISRESET.

<add key="ExeFile" value="c:\myWebApp\myApp.exe" />

Any suggestions folks?

##Abhay

Gravatar is a globally recognized avatar based on your email address. re: Using ~ in EXEFile Key in Web.config Does not unload servers
  Rick Strahl
  Abhay Sobti
  Jul 31, 2024 @ 07:12am

Is this in File mode? It definetly works in COM mode.

I have to take a look and see if the logic is different in the modes.

+++ Rick

Gravatar is a globally recognized avatar based on your email address. re: Using ~ in EXEFile Key in Web.config Does not unload servers
  Rick Strahl
  Abhay Sobti
  Jul 31, 2024 @ 04:29pm

Checked this out and it works fine as long as the pathing is correct. ~ refers to the Web Folder (ie. the path of web.config), so if you use that syntax make sure the relative pathing is correct.

If the path is set up as you describe that would assume this hierarchy:

c:
  \myApp
      myApp.exe
          \web
             web.config

Default pathing would be:

c:
  \myApp
      \deploy
          myApp.exe
      \web
          web.config

which would be: ~\..\deploy\myApp.exe

+++ Rick ---

© 1996-2024