Compiler Error Message CS0246

M

Mariano

Greetings,
I'm developing a web site in asp.net 2.0. I have class files in App_Code
and they are used in aspx. Example:
* App_Code ( i have users.cs containing users class, data.cs is DAL)
* index.aspx

Example in index.aspx
private void read() {
users u = new users();
....
}

The trouble is in this point is reported in the production server:
Server Error in '/' Application
Compiler Error Message: CS0246: The type or namespace name 'users' could not
be found (are you missing a using directive or an assembly reference?)

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42

I deployed copying all files and directories to the production server
without pre compilation.
In local mode the web site run great, but no in the production server.

HELP ME, PLEASE
thanks in advance :)
 
M

Mariano

Thanks Juan, but the problem is not in developing, the intellisense run ok
even in localhost run great. The problem is to copy all directories and
files to the production server ( show the error CS0246 when run to url to
the production server) . I don't know if is configuration or if I did
something wrong.

Thanks for your help! :)
 
J

Juan T. Llibre

What you should do is *publish* the website to any directory you want to in your
local disk, and copy *that* directory, and its subdirectories to the production server.

To *publish* a website, right-click it in the Solution Explorer, and select "Publish Web Site".
Make sure you select the directory you want to publish the website to, and make sure
you select the "allow this precompiled site to be updatable" option.

If you want to use fixed-naming, select that, too.

After the website is "published", you can copy the directory's contents to your production server.
You shouldn't have the problem you describe if you do that.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
M

Mariano

Thanks Juan, I already have resolved the problem, it was configuration of
production server. The directory to deploy must be created like virtual
directory to run asp.net correctly.

Thank!!!!
This News is excelent, I hope to help too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top