Parser Error "he file 'xxx.xxx.aspx.vb' does not exist"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dougancil
    Contributor
    • Apr 2010
    • 347

    Parser Error "he file 'xxx.xxx.aspx.vb' does not exist"

    I'm a new vb.net user and am creating a page on a Windows 2003 Server. When I try to view the page with a browser I get the following error:

    Parser Error Message: The file '/Sandbox/fileinput.aspx. vb' does not exist.

    Here is the code for the page:

    Code:
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="fileinput.aspx.vb" Inherits="_fileinput" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
        <style type="text/css">
            .style1 {
                text-align: center;
            }
        </style>
    </head>
    <body>
    
    <p class="style1">&nbsp;</p>
    <p class="style1">Please upload your file below. </p>
    <p class="style1"><input name="File1" type="file" /></p>
    <form method="post">
    	<div class="style1">
    	<input id="Submit1" name="Submit1" type="submit" value="Upload File" OnServerClick="Upload Click" runat="server"/></div>
    </form>
    </p>
    
        <div class="style1">
    
    <script>
    'Save uploaded file to server at C:\ServerFolder\
      Try 
        MyFile.PostedFile.SaveAs("C:\ServerFolder\" + c)
        Span1.InnerHtml = "Your File Uploaded Successfully: " & _
                          "C:\ServerFolder\" & c
      Catch Exp as exception
        Span1.InnerHtml = "An Error occured. Please check the attached file"
        UploadDetails.visible = false
        Span2.visible=false
      End Try
      </script>
      
    <asp:RegularExpressionValidator 
    id="FileUpLoadValidator" runat="server" 
    ErrorMessage="Upload .CSV files only." 
    ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.csv|.CSV|)$" 
    ControlToValidate="Submit1">
    </asp:RegularExpressionValidator>
    
        </div>
    
    <p class="style1">&nbsp;</p>
    
    </body>
    
    </html>
    Can anyone offer any help on this?

    Thank you,

    Doug
  • MrMancunian
    Recognized Expert Contributor
    • Jul 2008
    • 569

    #2
    The file '/Sandbox/fileinput.aspx. vb' does not exist.
    Now why do you think it gives you this error? Did you check if it does exist?

    Steven

    Comment

    • dougancil
      Contributor
      • Apr 2010
      • 347

      #3
      well I know that the file doesnt exist but I have no idea how to create it. I guess that's my bigger question.

      Comment

      • MrMancunian
        Recognized Expert Contributor
        • Jul 2008
        • 569

        #4
        Where do you refer to this file?

        Comment

        • dougancil
          Contributor
          • Apr 2010
          • 347

          #5
          This line is line one .... I don't refer to it in any other place but there.

          Comment

          • MrMancunian
            Recognized Expert Contributor
            • Jul 2008
            • 569

            #6
            Where is the fileinput.aspx. vb located? Do you see it in your solution explorer? If not, you can try to add it as "Existing Item"...

            Comment

            • dougancil
              Contributor
              • Apr 2010
              • 347

              #7
              I dont see fileinput.aspx. vb listed in the Solution Explorer. I'm sorry but I don't know how to add it as an "Existing Item" ... I'll look that up.

              Comment

              • dougancil
                Contributor
                • Apr 2010
                • 347

                #8
                I discovered what the problem was. I had initially written this page using Expression Web and essentially copied the code to Visual Studio without recreating the page. I had not created the .vb page or the proper web.config file. I started the page over and created it from scratch and now everything works fine. Thank you for your help.

                Comment

                • MrMancunian
                  Recognized Expert Contributor
                  • Jul 2008
                  • 569

                  #9
                  That is why I said you could add it as "Existing Item". You could have simply copied the file to your solution folder and then there is an option to add an existing file. Would have saved you time :-)

                  Steven

                  Comment

                  Working...