I am concerned that the web hosting that I pay for is not configured correctly. ASP.NET websites that compile and run correctly on my local computer do not work after they are deployed.
The problem I am facing is a compilation error: CS0246, "Type or namespace could not be found (did you specify the" using "link or assembly link?)
My website contains the following files and folders:
websitedemo/Default.aspx
websitedemo/Default.aspx.cs
websitedemo/App_Code/HelloClass.cs
A compilation error occurs if I try to use any code contained in my Application Code folder. I have included the entire / websitedemo / folder in this archive if it helps to fix the error: http://kivin.ca/websitedemo/source.zip
I left the folder in debug mode. The compilation error screen can be viewed at http://kivin.ca/websitedemo/
Sincerely.
- update:
If this helps to fix this error, I got this behavior when I try to deploy ASP.NET WebApplication instead of a website.
In the event that my aspx file contains @Page right like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="myproj._Default" Debug="true" %>
Compilation error: "Parser error message: Failed to load type" myproj._Default ".
Webapps are deployed via ftp using Build β Publish β [X] Replace the corresponding files, [X] Only the files needed to run this application. [X] Include the App_Data folder.
Kivin source
share