Hi, I got the same problem.
My app works fine on my local PC, but gets this error when copied to the hosted server.
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'M1Logs.WebForm1'.
Source Error:
Line 1: <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="M1Logs.WebForm1" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3: <HTML> |
Source File: C:\home\aquarius\yyy.net\yyy.net\www\m1logs\webform1.aspx Line: 1
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
I read http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306155 PRB: "Could not load type" error message when you browse to .aspx page by using Visual C# .NET and it says:
CAUSE
These errors occur if the .aspx page or the Global.asax page contains a reference to a code-behind module and if the application has not been built.
RESOLUTION
Use one of the following methods to build the application:
| • |
Use the C# command line compiler (CSC.exe) to run the following command:
csc /t:library /r:System.web.dll /out:mydll.dll myfile.cs
|
| • |
In Microsoft Visual Studio .NET, click Build on the Build menu. |
NOTE: Microsoft Visual Basic .NET background compiles the project as soon as it is created. Because Visual C# .NET projects only background parse, you must explicitly build the application.
I checked and my DLL is there in the bin folder. I copied it to the same folder as .aspx and .aspx.cs files but the problem still persists.
My app is a simple one built using VS.NET 2003. I have notepad handcrafted aspx and aspx.cs pages on the same server and they work fine on both my PC and the hosted server. My handcrafted ones someone does not need the DLL files.
What have I done wrong? Or what must I ask the hosting company to do on their server.
Thanks.