Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP 2.0 Class File Not Found

ASP 2.0 Class File Not Found

Scheduled Pinned Locked Moved ASP.NET
helpcsharpsysadminwindows-adminquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Haseeb Mukhtar
    wrote on last edited by
    #1

    Hi all, I have created a simple ASPX web page using aspx 2.0 and C#. When I was designing it was working fine, but now i have copied the website in inetpub\wwwroot folder. No when I run using IIS server its giving error; Compiler Error Message: CS0246: The type or namespace name 'Class1' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 17: protected void Button1_Click(object sender, EventArgs e) Line 18: { Line 19: Class1 c = new Class1(); Line 20: TextBox1.Text = c.name(); Line 21: } I cant understand that why its not finding the classes. All classes are in App_Code folder. Any one could please help me. regards, Haseeb Mukhtar

    T G 2 Replies Last reply
    0
    • H Haseeb Mukhtar

      Hi all, I have created a simple ASPX web page using aspx 2.0 and C#. When I was designing it was working fine, but now i have copied the website in inetpub\wwwroot folder. No when I run using IIS server its giving error; Compiler Error Message: CS0246: The type or namespace name 'Class1' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 17: protected void Button1_Click(object sender, EventArgs e) Line 18: { Line 19: Class1 c = new Class1(); Line 20: TextBox1.Text = c.name(); Line 21: } I cant understand that why its not finding the classes. All classes are in App_Code folder. Any one could please help me. regards, Haseeb Mukhtar

      T Offline
      T Offline
      Tarakeshwar Reddy
      wrote on last edited by
      #2

      coldice111 wrote:

      I cant understand that why its not finding the classes. All classes are in App_Code folder.

      All your code behind and classes get compiled as a dll which goes into the bin folder. Efectively your wwwroot\SampleApp folder would contain a SampleApp.aspx and a bin folder containing SampleApp.dll.


      Tarakeshwar Reddy MCP, CCIE Q(R&S) Experience is like a comb that life gives you when you are bald - Navjot Singh Sidhu

      H 1 Reply Last reply
      0
      • T Tarakeshwar Reddy

        coldice111 wrote:

        I cant understand that why its not finding the classes. All classes are in App_Code folder.

        All your code behind and classes get compiled as a dll which goes into the bin folder. Efectively your wwwroot\SampleApp folder would contain a SampleApp.aspx and a bin folder containing SampleApp.dll.


        Tarakeshwar Reddy MCP, CCIE Q(R&S) Experience is like a comb that life gives you when you are bald - Navjot Singh Sidhu

        H Offline
        H Offline
        Haseeb Mukhtar
        wrote on last edited by
        #3

        Hi thanks for your reply, I tried that too, but its then saying that dll file not found.

        1 Reply Last reply
        0
        • H Haseeb Mukhtar

          Hi all, I have created a simple ASPX web page using aspx 2.0 and C#. When I was designing it was working fine, but now i have copied the website in inetpub\wwwroot folder. No when I run using IIS server its giving error; Compiler Error Message: CS0246: The type or namespace name 'Class1' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 17: protected void Button1_Click(object sender, EventArgs e) Line 18: { Line 19: Class1 c = new Class1(); Line 20: TextBox1.Text = c.name(); Line 21: } I cant understand that why its not finding the classes. All classes are in App_Code folder. Any one could please help me. regards, Haseeb Mukhtar

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          In the Build menu you will find Publish Web Site. Use that to create the files that you can use to publish the web site on the server.

          --- It's amazing to see how much work some people will go through just to avoid a little bit of work.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups