locked
Moving application (.Net + VB) from Windows 7 to Windows 10 RRS feed

  • Question

  • User1973920632 posted

    Hi Guys,
    I've been struggling with this for days now. I am trying to move an application from Windows 7 to Windows 10 machine. While setting up Win10 I was trying to configure it the same way as Win7, but looks like I might be missing something. When opening any page that had some code behind I get an error:

    Parser error: File '/Default.aspx.<acronym title="Visual Basic">vb</acronym>' doesn't exist.
    <%@ Page Title="Main page" Language="<acronym title="Visual Basic">VB</acronym>" AutoEventWireup="false" Codefile="Default.aspx.<acronym title="Visual Basic">vb</acronym>" Inherits="_Default" aspcompat=true %>

    Both Win7 and Win10 have IIS set to run with .NET 2.0.50727
    The application works with no issues on Win7 - no changes of the code are required there.

    Thanks in advance!

    K

    Sunday, February 14, 2016 10:11 PM

Answers

  • User614698185 posted

    Hi kgadowski,

    Parser Error Message: Could not load type '_Default'.

    I think you haven't configured your virtual directory as an application in IIS.

    Best Regards,

    Candice Zhou

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 16, 2016 9:10 AM

All replies

  • User614698185 posted

    Hi kgadowski,

    In Default.aspx change CodeFile to CodeBehind. You'll probably have to do the same for the Site.master:

    <%@ Page Title="Main page" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" 
    CodeBehind="Default.aspx.vb" Inherits="_Default" %>

    Web Site projects use CodeFile, Web Application projects use CodeBehind. CodeFile requires the source file, it is compiled on the fly when the page is loaded, CodeBehind requires the compiled code.

    Please see: http://www.drdobbs.com/windows/codefile-and-code-behind/187202007

    Best Regards,

    Candice Zhou

    Monday, February 15, 2016 3:12 AM
  • User1973920632 posted

    Thanks Candice,

    After changing to Codebehind I get the following:

    Parser Error Message: Could not load type '_Default'.

    <%@ Page Title="Main page" Language="VB" AutoEventWireup="false" Codebehind="Default.aspx.vb" Inherits="_Default" aspcompat=true  %>

    Also, could you specify what changes I'd have to make in the Site.master?

    The Site.master was already set to use CodeBehind:

    <%@ Master Language="vb" AutoEventWireup="true" CodeBehind="Site.master.vb" %>

    Thanks

    K

    Monday, February 15, 2016 10:47 PM
  • User614698185 posted

    Hi kgadowski,

    Parser Error Message: Could not load type '_Default'.

    I think you haven't configured your virtual directory as an application in IIS.

    Best Regards,

    Candice Zhou

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 16, 2016 9:10 AM