locked
How to copy DLLs? RRS feed

  • Question

  • User-1793215261 posted

    Hello

    From what I can gather, the server of my Web hosting service is missing certain DLLs and that is why I am getting the error: The file '/Frina/Contact.aspx' has not been pre-compiled, and cannot be requested.

    I do not know what those missing DLLs are or where to find them! Any advice, please?

    On another note, my Web.config looks like this (do I need all of that assembly code, parameters, entity Framework, etc?). This is a simple site with a contact form and that's it: no log-ins required, no database, etc.

    <?xml version="1.0" encoding="utf-8"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      https://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <configSections>
        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      </configSections>
      <connectionStrings>
        <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=aspnet-Home-Flix-20171207133658;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-Home-Flix-20171207133658.mdf" />
      </connectionStrings>
      <system.web>
        
        
        
        <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
         <customErrors mode="Off"/>
    
     </system.web>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
      </system.webServer>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
            <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" />
            <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
          <parameters>
            <parameter value="mssqllocaldb" />
          </parameters>
        </defaultConnectionFactory>
        <providers>
          <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
        </providers>
      </entityFramework>
    </configuration>
    Thursday, December 7, 2017 5:05 PM

Answers

  • User753101303 posted

    You can control this in "Settings". See the earlier image posted by zxj (this is the "Precompile during publishing" checkbox).

    You don't mix data with your site ? If not I would check "Remove additional files at destination" and would uncheck "Precompile during publishing" (or is it what you have already) to wipe out current files and to make sure to publish a non compiled site on which no old compiled files remain.

    What I hope is that as the web site is not compiled yet, it will try to compile and will hopefully show a more detailed messsage about the exact problem that prevents your app to run (assuming the issue is really a missing file).

    Also how the web site was created? /Frina was really defined as a web site root rather than just as a subfolder of a / site ?

    Ah this is is web site project rarther than a web application project ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 8, 2017 5:07 PM

All replies

  • User-2010311731 posted

    The DLLs are usually in the Bin folder after you deploy a site.  You don't have to pre-compile, but it is recommended.

    Thursday, December 7, 2017 5:18 PM
  • User-1793215261 posted

    Thanks, Matt, for your reply.

    So I just have to ensure that the DLLs in the bin folder have been copied to the bin folder through, for example, fileZilla, the FTP that I use.

    How would I precompile in VS 2017? I usually compile in Cmd Prompt.

    Thanks again

    Thursday, December 7, 2017 5:57 PM
  • User991499041 posted

    Hi Bluenose,

    So I just have to ensure that the DLLs in the bin folder have been copied to the bin folder through, for example, fileZilla, the FTP that I use.

    How would I precompile in VS 2017? I usually compile in Cmd Prompt.

    1. Create Profile

    2. Select Precomplie during configuration

    I am getting the error: The file '/Frina/Contact.aspx' has not been pre-compiled, and cannot be requested.

    Ensure that Build Action is Content.

    Content - For ASP.NET projects, these files will be included as part of the site when it's deployed.

    Regards,

    zxj

    Friday, December 8, 2017 3:18 AM
  • User-1793215261 posted

    Thanks

    In trying to follow your example, with my two Web files (Contact.aspx and Contact.aspx.vb finished), I right-click the name of the project, Home-Flix, and see this:

    I then click on 'Publish Web App'. I cannot see your IIS/FTP or Folder options. I see this:

    This project is a normal Web Forms project in vb.net and is unrelated to Azure. So I click on Custom and give the Profile a name:

    What do I now select here, please? Web Deploy, Web Deploy Package, or FTP?

    Basically, all I am trying to do it pre-compile the project. I assume that is done on the server and that I am then allowed to compile the project in the usual way, through Command Prompt, which deposits the compiled files into a folder on my C drive before I upload that folder to my Web hosting server.

    Thanks again.

    Friday, December 8, 2017 1:46 PM
  • User753101303 posted

    Bluenose

    to compile the project in the usual way, through Command Prompt

    I'm not sure it's really the usual way. This is done for you behind the scene when publishing the project.

    This is in house or do you use an hosting service? There is no right answer. It depends on what has been made available to you. If this is an hosting service check maybe their support forum or doucmentation to see which publishing method is supported (AFAIK most should support using Web Deploy).

    In house and if allowed you could publish to a network share (or server admins could install and configure web deploy as well). Once again it dépends on what is made available to you .

    Friday, December 8, 2017 2:09 PM
  • User-1793215261 posted

    Hello Patrice

    I would normally compile a project through Command Prompt or PowerShell and I have not experienced problems before. I wouldn't know how to compile a project through Visual Studio, so I will stick with my tried and tested method.

    Yes, it is an external Web hosting service. Locally, I view the Web page in my browser: 

    Thanks. The Web hosting service has warned of security risks using Web Deploy and they have asked me to ensure that my server Control Panel log-in credentials and the same as my FTP log-in credentials (I used fileZilla to upload my compiled files).

    Friday, December 8, 2017 2:43 PM
  • User753101303 posted

    So it seems they are using FTP.

    The publishing process you are using above is to publish directly the application from VS without going through the command line. So I'm a bit confused about which path you are trying to take now. I would suggest to try at least once to see if it makes a difference.

    Try maybe https://www.codeproject.com/Questions/184639/Solved-Receiving-The-file-default-aspx-has-not-be and solution 1 which have a link to another post that seems to list also some other possible causes.

    Friday, December 8, 2017 2:46 PM
  • User-1793215261 posted

    Hello

    I selected FTP (screenshot above) and eventually achieved this in the Output pane of Visual Studio:

    ------ Build started: Project: Home-Flix, Configuration: Debug Any CPU ------
    ------ Publish started: Project: Home-Flix, Configuration: Debug Any CPU ------
    Connecting to ftp://96.44.171.106...
    Transformed Web.config using C:\Users\Steve\Documents\Visual Studio 2017\mySite\Home-Flix\Web.Debug.config into C:\Users\Steve\AppData\Local\Temp\WebSitePublish\Home-Flix-925774006\obj\Debug\TransformWebConfig\transformed\Web.config.
    Copying all files to temporary location below for package/publish:
    C:\Users\Steve\AppData\Local\Temp\WebSitePublish\Home-Flix-925774006\obj\Debug\Package\PackageTmp.
    Publishing folder /...
    Publishing folder Account...
    Publishing folder App_Code...
    Publishing folder bin...
    Publishing folder Content...
    Publishing folder Content/themes...
    Publishing folder Content/themes/base...
    Publishing folder Content/themes/base/images...
    Publishing folder Content/themes/base/minified...
    Publishing folder Content/themes/base/minified/images...
    Publishing folder images...
    Publishing folder Scripts...
    Web App was published successfully ftp://96.44.171.106/
    
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
    

    Does this mean that the project is now pre-compiled and that I can now compile it in the way I usually do?

    It seems a lot of messing about.

    Thanks

    Friday, December 8, 2017 3:54 PM
  • User-1793215261 posted

    I am still getting that message:

    The file '/Frina/Contact.aspx' has not been pre-compiled, and cannot be requested.

    http://www.dimadayoub.net/Frina/Contact.aspx

    In building the project (my immediate post above), have I only published it but not pre-compiled it?

    Thanks again.

    Friday, December 8, 2017 4:13 PM
  • User753101303 posted

    You can control this in "Settings". See the earlier image posted by zxj (this is the "Precompile during publishing" checkbox).

    You don't mix data with your site ? If not I would check "Remove additional files at destination" and would uncheck "Precompile during publishing" (or is it what you have already) to wipe out current files and to make sure to publish a non compiled site on which no old compiled files remain.

    What I hope is that as the web site is not compiled yet, it will try to compile and will hopefully show a more detailed messsage about the exact problem that prevents your app to run (assuming the issue is really a missing file).

    Also how the web site was created? /Frina was really defined as a web site root rather than just as a subfolder of a / site ?

    Ah this is is web site project rarther than a web application project ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 8, 2017 5:07 PM
  • User-1793215261 posted

    Hello Patrice

    Sorry for the delay in getting back to you.

    When I am publishing (is that the same as pre-compiling?) my Web pages via VS 2017, is there a way to specify the folder on my web hosting service where those files should be published to.

    At the moment, VS 2017 asks for the IP address of the server and what happens is that the Frina project copies over the files that belong to an entirely different project (my Web hosting service has had to reinstate the files that belong to the other project.

    I also wonder if you know the command prompt code to pre-compile the Frina pages and then upload then before I then compile the Frina pages to their own folder on the web hosting server. I don't really know what the point of pre-compiling the Frina pages is when I am going to paste over them with my compiled files.

    Thanks

    Tuesday, December 12, 2017 7:47 PM
  • User-1793215261 posted

    I have given up on this now and gone back to VS 2017 where it seems to work without any pre-compile errors.

    Thanks to all.

    Wednesday, December 13, 2017 8:15 PM
  • User753101303 posted

    Not sure about the publishing target. They maybe expose your app as a subfolder? My understanding is that you have multiple web app available through this FTP server and that a first problem was to publish at the right place.

    If you really want you could perhaps later grab files on the FTP server and then compare with what you create from the command line to spot differences

    I'm myself doing it the other way round ie I just publish from VS unless I really need the command line (for now I have this for a huge old monolithic app that I wanted to split into multiple DLLs).

    Thursday, December 14, 2017 10:21 AM
  • User-1793215261 posted

    It just seems to be less problematic the way I have been doing it. I have a project, save it, compile it, and upload it. That way, I have bypassed 'precompilation', 'publishing', etc.

    If I had a command line for the old MS-DOS or PowerShell, I would try precompiling my saved project and upload it - maybe it would reveal some errors. I would then try to correct those erros and then compile it correctly before uploading it - but I can't seem to locate a command line to precompile for the old MS-DOS (Command Prompt) or PowerShell.

    Thanks for your post.

    Thursday, December 14, 2017 2:08 PM