473,493 Members | 2,265 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Compiler Error Message CS0246

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 :)
Jul 12 '07 #1
3 3220
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! :)
Jul 13 '07 #2
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/
======================================
"Mariano" <x@xxx.comwrote in message news:ut**************@TK2MSFTNGP04.phx.gbl...
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! :)

Jul 13 '07 #3
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.
Jul 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
360
by: Alex Duggleby | last post by:
Hi everybody, I'm trying to add some mime types to the local IIS server using some c# code. The code I'm using is: ---snip--- DirectoryEntry _mimeMap =
3
13255
by: Joe DeAngelo | last post by:
When I try to compile a source code which should normally run I got this error message error CS0246: The type or namespace name 'XmlSchemaSet' could not be found (are you missing a using...
1
3231
by: Leo | last post by:
Hi, The code below is working: Main.cs ------------- using System; namespace test3
1
1661
by: Kumar Bhogaraju | last post by:
We developed an application in 2.0; but our new hosting provider supports only 1.1. Can anyone point me to a link where we can migrate the application easily without rewriting the code? When we...
0
3234
by: WebDev2 | last post by:
I can't get AJAX.NET Pro to work. I keep getting a Compiler Error Message: CS0246: The type or namespace name 'AjaxPro' could not be found (are you missing a using directive or an assembly...
4
23826
by: infinetinc | last post by:
I'm receiving the following error when this site is published to the production environment: Compiler Error Message: CS0246: The type or namespace name 'GridViewHelper' could not be found (are you...
5
1472
by: Michael Bray | last post by:
I have some class files in App_Code (eg MyClass.cs) but if there is an error during compilation, the error list doesn't say what file the error is in. It just shows something like "(0,0): error...
1
2566
by: rhea06car | last post by:
i got an error massage cs0246: The type or namespace name 'StringCollection' could not be found (are you missing a using directive or an assembly reference?) heres my code: public static...
10
1243
by: Weeble | last post by:
The included program compiles without errors, but produces an error when you attempt to use a refactoring tool: J:\TypeofTest\TypeofTest1\Program.cs(3,27): error CS0246: The type or namespace...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6873
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7367
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
644
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.