title: Virtual file not found using servicestack 4.0.5 after adding Telerik OpenAccess datacontext
body: <p>I'm testing out the new 4.0.5 Service stack (previously I was using version 3), and starting afresh I just can't seem to get my service to start when I add Telerik OpenAccess. 
  I'm using Telerik's OpenAccess to talk to a MSSQL database again, which all works fine using version 3.x - As soon as I add in the Telerik Domain model I get a "Virtual File Not Found"</p>
  
  <blockquote>
    <p>Virtual file not found<br/>
    Description: An unhandled exception occurred during the execution of the current web request.<br/> Please review the stack trace for more information about the error and where it originated in the code. <br/></p>
    
    <p>Exception Details: <code>System.IO.FileNotFoundException</code>: Virtual file not found<br/>
    Source Error: <br/></p>
    
    <p>Line 23:         <code>' Fires when the application is started</code><br/>
    Line 24:         <code>Dim apphost = New VPNTestAppHost()</code><br/>
    Line 25:         <code>apphost.Init()</code><br/>
    Line 26:     <code>End Sub</code><br/></p>
  </blockquote>
  
  <p>Here is the full IIS error screen</p>
  
  <blockquote>
    <p>Source File: c:\users\tw\documents\visual studio 2013\Projects\VPN_ApiTest\VPN_ApiTest\Global.asax.vb    Line: 25 </p>
  </blockquote>
  
  <p><strong>Stack Trace:</strong> </p>
  
  <pre class="lang-cs prettyprint-override"><code>[FileNotFoundException: Virtual file not found]
     ServiceStack.VirtualPath.ResourceVirtualDirectory.CreateVirtualFile(String resourceName) +303
     System.Linq.WhereSelectListIterator`2.MoveNext() +108
     System.Linq.Buffer`1..ctor(IEnumerable`1 source) +216
     System.Linq.&lt;GetEnumerator&gt;d__0.MoveNext() +106
     System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) +392
     System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection) +10
     ServiceStack.VirtualPath.ResourceVirtualDirectory.InitializeDirectoryStructure(IEnumerable`1 manifestResourceNames) +593
     ServiceStack.VirtualPath.ResourceVirtualDirectory..ctor(IVirtualPathProvider owningProvider, IVirtualDirectory parentDir, Assembly backingAsm, String directoryName, IEnumerable`1 manifestResourceNames) +227
     ServiceStack.VirtualPath.ResourceVirtualDirectory..ctor(IVirtualPathProvider owningProvider, IVirtualDirectory parentDir, Assembly backingAsm) +131
     ServiceStack.VirtualPath.ResourceVirtualPathProvider.Initialize() +141
     ServiceStack.VirtualPath.ResourceVirtualPathProvider..ctor(IAppHost appHost, Assembly backingAssembly) +138
     ServiceStack.ServiceStackHost.&lt;Init&gt;b__4(Assembly x) +58
     ServiceStack.EnumerableExtensions.Map(IEnumerable`1 items, Func`2 converter) +337
     ServiceStack.ServiceStackHost.Init() +778
     VPN_ApiTest.Global_asax.Application_Start(Object sender, EventArgs e) in c:\users\tw\documents\visual studio 2013\Projects\VPN_ApiTest\VPN_ApiTest\Global.asax.vb:25
  
  [HttpException (0x80004005): Virtual file not found]
     System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9935033
     System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
     System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
     System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
     System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
  
  [HttpException (0x80004005): Virtual file not found]
     System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9913572
     System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
     System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
  </code></pre>
  
  <p><strong>WEB.CONFIG</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" strict="false" explicit="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime requestPathInvalidCharacters="" targetFramework="4.5" /&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;handlers&gt;
        &lt;add path="*" name="ServiceStack.Factory" type="ServiceStack.HttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" /&gt;
      &lt;/handlers&gt;
      &lt;httpProtocol&gt;
        &lt;customHeaders&gt;
          &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
          &lt;add name="Access-Control-Allow-Headers" value="Content-Type, Accept" /&gt;
        &lt;/customHeaders&gt;
      &lt;/httpProtocol&gt;
    &lt;/system.webServer&gt;
    &lt;connectionStrings&gt;
      &lt;add name="XYZ" connectionString="data source=abc.xyz.com;initial catalog=xyz;persist security info=True;user id=sa;password=abc" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>Global.Asax</strong></p>
  
  <pre class="lang-vb prettyprint-override"><code>Imports System.Web.SessionState
  Imports ServiceStack
  Imports ServiceStack.Auth
  
  Public Class Global_asax
      Inherits System.Web.HttpApplication
  
      Public Class VPNTestAppHost
          Inherits AppHostBase
  
          Public Sub New()
              MyBase.New("VPN Test Web Services", GetType(LanguageLibrary).Assembly)
          End Sub
  
          Public Overrides Sub Configure(container As Funq.Container)
              SetConfig(New HostConfig With {.DebugMode = True})
              Plugins.Add(New AuthFeature(Function() New AuthUserSession(), New Auth.IAuthProvider() {New BasicAuthProvider()}))
          End Sub
      End Class
  
      Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
          ' Fires when the application is started
          Dim apphost = New VPNTestAppHost()
          apphost.Init()
      End Sub
  </code></pre>
  
  <p>Can anybody point me in the right direction? </p>
  
  <p>Many thanks</p>
  
  <p>Terry</p>