File tree Expand file tree Collapse file tree 3 files changed +14
-15
lines changed
AspNetCoreModuleV2/InProcessRequestHandler Expand file tree Collapse file tree 3 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -235,13 +235,11 @@ IN_PROCESS_APPLICATION::ExecuteApplication()
235
235
LOG_INFOF (L" Setting current directory to %s" , this ->QueryApplicationPhysicalPath ().c_str ());
236
236
}
237
237
238
- // TODO this doesn't work when running in VS and with the shared framework.
239
- // We could hack it so we check if the dll exists before and after setting the current directory
240
- // But the best solution would be to be able to set a specific assembly name rather than full path
241
- // See: https://github.com/dotnet/core-setup/issues/5556
242
- auto startupHookDll = Environment::GetCurrentDirectoryValue () + std::wstring (L" \\ Microsoft.AspNetCore.Server.IIS.dll" );
238
+ // TODO add a way to disable this.
239
+ auto startupHookDll = std::wstring (L" Microsoft.AspNetCore.Server.IIS" );
243
240
244
241
SetEnvironmentVariable (L" DOTNET_STARTUP_HOOKS" , startupHookDll.c_str ());
242
+ SetEnvironmentVariable (L" COMPlus_UseEntryPointFilter" , L" 1" );
245
243
246
244
bool clrThreadExited;
247
245
{
Original file line number Diff line number Diff line change @@ -118,14 +118,15 @@ public void Configure(IApplicationBuilder app)
118
118
119
119
public static void Main ( string [ ] args )
120
120
{
121
- var host = new WebHostBuilder ( )
122
- . UseKestrel ( )
123
- . UseIIS ( )
124
- . UseIISIntegration ( )
125
- . UseStartup < Startup > ( )
126
- . Build ( ) ;
127
-
128
- host . Run ( ) ;
121
+ throw new Exception ( "woah" ) ;
122
+ //var host = new WebHostBuilder()
123
+ // .UseKestrel()
124
+ // .UseIIS()
125
+ // .UseIISIntegration()
126
+ // .UseStartup<Startup>()
127
+ // .Build();
128
+
129
+ //host.Run();
129
130
}
130
131
}
131
132
}
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ internal class StartupHook
27
27
public static void Initialize ( )
28
28
{
29
29
// TODO make this unhandled exception
30
- AppDomain . CurrentDomain . FirstChanceException += ( sender , eventArgs ) =>
30
+ AppDomain . CurrentDomain . UnhandledException += ( sender , eventArgs ) =>
31
31
{
32
- var exception = eventArgs . Exception ;
32
+ var exception = ( Exception ) eventArgs . ExceptionObject ;
33
33
34
34
// Get the content root from IIS.
35
35
var iisConfigData = NativeMethods . HttpGetApplicationProperties ( ) ;
You can’t perform that action at this time.
0 commit comments