My WebApp.Start method throws a System.IO.FileLoadException when other exe's are in the same folder. I have no clue why this is happening and its driving me nuts. Any help is appreciated.
//Calling webapp.start
string url = "http://*:8080/";
SignalRServer = WebApp.Start(url);
//My Owin Startup Class
class Startup
{
public void Configuration(IAppBuilder app)
{
// Branch the pipeline here for requests that start with "/signalr"
app.Map("/signalr", map =>
{
map.UseCors(CorsOptions.AllowAll);
var hubConfiguration = new HubConfiguration
{
EnableJSONP = false,
EnableDetailedErrors = true,
EnableJavaScriptProxies = true
};
map.RunSignalR(hubConfiguration);
});
}
}
This was working fine until I threw the service into testing for a production rollout and now it gives the following error.
System.IO.FileLoadException: Could not load file or assembly 'AutoServiceController, Version=1.0.5270.19403, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) File name: 'AutoServiceController, Version=1.0.5270.19403, Culture=neutral, PublicKeyToken=null' ---> System.IO.FileLoadException: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Owin.Loader.DefaultLoader.AssemblyDirScanner.d__1e.MoveNext() at Owin.Loader.DefaultLoader.SearchForStartupAttribute(String friendlyName, IList
1 errors, Boolean& conflict) at Owin.Loader.DefaultLoader.GetDefaultConfiguration(String friendlyName, IList
1 errors) at Owin.Loader.DefaultLoader.LoadImplementation(String startupName, IList1 errorDetails) at Owin.Loader.DefaultLoader.Load(String startupName, IList
1 errorDetails) at Microsoft.Owin.Hosting.Loader.AppLoader.Load(String appName, IList`1 errors) at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp(StartContext context) at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context) at Microsoft.Owin.Hosting.Starter.DirectHostingStarter.Start(StartOptions options) at Microsoft.Owin.Hosting.Starter.HostingStarter.Start(StartOptions options) at Microsoft.Owin.Hosting.WebApp.StartImplementation(IServiceProvider services, StartOptions options) at Microsoft.Owin.Hosting.WebApp.Start(StartOptions options) at Microsoft.Owin.Hosting.WebApp.Start(String url) at PvValuationController.PvValuationController.OnStart(String[] args) in c:\Users\ahardy\Documents\Visual Studio 2013\Projects\PvValuationController\PvValuationController\PvValuationController.cs:line 156