질문하기질문하기
 

답변됨could not load type "_Default"

  • 2005년 10월 11일 화요일 오후 3:21granville 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi everybody :)

    I'm doing a web app for some university coursework, its the first time I've used ASP.NET C# and I'm loving it but when I put the files on the remote server I get the error on this page.

    http://www.apixelmind.com/email/

    Someone told that I need to copy a project or something and do it that way, I'm using the Visual Studio 2005 Beta 2 version and I can't find this function anywhere.  If anyone could help with that or give me another fix then I would be very grateful.

    Thank you for your time.


    Granville

    p.s. this is my code but this still gives me the same error



    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;

    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }

     


    And I am using the default generated statement at the top of each .aspx page.


    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
     


답변

모든 응답

  • 2005년 10월 11일 화요일 오후 6:02MarcD중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Your code should be compiled in a DLL file that is called the Assembly. This assembly needs to be deployed with your project - namely it should be put in the bin directory just like it is in on your local host. This allows you to semi-protect your code and makes deploying alot easier.
  • 2005년 10월 11일 화요일 오후 7:32granville 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    how do I do that?? I'me very new to Visual Studion and ASP.NET.

    I have already (in VS 2005) gone to build >> publish htpp://.......

    That created a .dll and some other precompiled files in a bin folder but when I put these on my web server I get the same error still. (url - - http://www.apixelmind.com/bonjovi/)

    Am I going to the wrong function in VS?? if so can someone exaplin the menu and how it is accessed etc please.


    Thank you for your time.


    Granville
  • 2005년 10월 16일 일요일 오전 2:10douglaspMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    this is an asp.net issue.

    You should post it on http://www.asp.net.
  • 2005년 10월 20일 목요일 오후 4:44Talespinner 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I have found that I have to go into the offending *.vb file, make a small change (it doesn't matter what), and save the project.  This apparently resets something in the Visual Studio project.  Good luck.
  • 2006년 3월 4일 토요일 오전 4:51Luis Esteban Valencia MCP Web 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Has somebody solved this?

    I have a solution with 5 class libraries, and they work fine on my pc, I checkin to Visual Source Safe, the other developer download the solution, and when he tries to see a page, He gets that error

     

    Any idea

  • 2007년 2월 21일 수요일 오전 9:32Katil 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I heard that when you didn't embed the source codes as script in c# or VB, a dll file  created by .net in source directory(c:\, d:\ ....etc) and same named with your project. So you must either checkin this dll if that isn't like this, you can add your source code as script between head tags.
  • 2007년 10월 17일 수요일 오후 3:18magnets 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I've been forced to do an aspx C# project and it looks like I've got the same problem you've reported.  In a similar version my aspx file with an expanded version of the C# code the same "could not load type "_Default" " does not occur.

    Obviously it is my fault because I did something wrong.  It could not possibly be the fact that the Microsoft product design crew intentionally created so many exceptions to rules so that they could generate maximum revenue by selling even more tools "to make it easier" on developers.  But, I do believe it is a fact that Microsoft designers have an inherent bias against the web because they want to give everything the option of being a Windows-like, if not a Windows, world.

    That being said, it looks like you do have an option, just go write your code in PHP.

    I on the other hand, still need to figure out this context problem where Microsoft could not possibly put themselves out and create either a completely non-Visual Studio or at least create a web context within Visual Studio.  (For example, "Request.QueryString["encryptedData"].ToString()" is out of context since Microsoft decided not to make provisions to simulate the query string as input.)

    Good Luck to you.  I hope you found / find your answer.
  • 2007년 10월 23일 화요일 오후 5:06RenjithG 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

     

    Hi,

     

    This is problem with multiple versions of framework installed on the machine.

     

    To rectify this go to IIS manager and right click on Default Web Site and go to properties. In the property window go to ASP.Net tab and There select the ASP.Net Version as 2.0....... instead of 1.1..... Then go to Documents tab and add 'Default.aspx' document if it is not there in the list. and select the virtual directories to which you want to apply this rule for.

     

    Then you should be able to eliminate this error.

     

    Have a nice programing time. Bye

  • 2008년 11월 9일 일요일 오전 4:16princeTace 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I simply created a folder with the name "bin" in the IIS virtual directory for my site, and then dropped the dll in said folder.. problem solved, hope this helps.