简体   繁体   中英

CS0246: The type or namespace name 'Employee' could not be found (are you missing a using directive or an assembly reference?)?

I am having a terrible time deploying a web app.

Environment

There is an intranet site that currently has lot's of files and folders, and works fine. It was not configured to use ASP.NET, it was just plain static web pages.

This is on a Win2k3 box with IIS 6.0.

What I have tried:

The application works fine on my development machine. The class Employee is in the same directory, with the same namespace as the asp.net page that is giving me this error.

There is a directory "INFO" that I have been attempting to deploy my application to. So I have:

  1. Enabled ASP.NET (confirmed)
  2. Confirmed that it is using .net 2.0
  3. I have right clicked the directory in IIS and clicked the button "Create" next to the greyed out "Application Name" to make it an application
  4. I've compiled and deployed (using VS publish tools) the application to the INFO directory (which is a share)

... and still it is not working.

Any ideas? What else do I need to do to get this thing working??

在此处输入图片说明

So it looks like this ?

MyWebapp/bin

MyWebapp/info/bin

Try setting the info directory to an application in IIS. The folder above it should be an application as well I think.... it's hard to know based on what you've said.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question error CS0246: The type or namespace name 'IWebHostEnvironment' could not be found (are you missing a using directive or an assembly reference?) CS0246 The type or namespace name 'ErrorViewModel' could not be found (are you missing a using directive or an assembly reference?) error CS0246: The type or namespace name 'BannerPosition' could not be found are you missing a using directive or an assembly reference? error CS0246: The type or namespace name 'Npgsql' could not be found (are you missing a using directive or an assembly reference?) CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference Error CS0246 The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) Error CS0246: The type or namespace name 'StreamingContext' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'CreateRandomAnswersForKey' could not be found (are you missing a using directive or an assembly reference?)? CS0246 The type or namespace name 'MailKit' could not be found (are you missing a using directive or an assembly reference? CS0246 C# The type or namespace name 'ForeignKeyAttribute' could not be found (are you missing a using directive or an assembly reference?)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM