PC Review


Reply
Thread Tools Rate Thread

CS0246: The type or namespace name...

 
 
SubZane
Guest
Posts: n/a
 
      8th Feb 2007
I've quite new to C# and asp.net and have been following a tutorial in
an e book on how to make a simple component. However the website
cannot find my component.

The component compiles without any errors
I've added reference to the component in the website
The DLL is in the Bin folder
I'm not misspelling it, I've checked several times.

Component Source:
-----------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;

namespace Components {
public class SimpleTest1 {
public string GetInfo(string param) {
return "Value sent: "+param;
}
}
}
-----------------------------------------------------

Website Source:
-----------------------------------------------------
....
using Components;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e) {
SimpleTest1 test = new SimpleTest1();
string message = test.GetInfo("coolare!");
Response.Write(message);
}
}
-----------------------------------------------------

Any help would be nice, I've searched the groups but all I find is
"have you set the references"

 
Reply With Quote
 
 
 
 
SubZane
Guest
Posts: n/a
 
      9th Feb 2007
I've found the answer to my problem, I need to make the folder of my
website an application in order for it to work.

How to do this:
1. Start IIS Manager
2. Locate the folder and choose properties
3. Click the "Create" Button next to the grayed "Application Name"
field
4. Done!

Now it will work!! yay

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CS0246: The type or namespace name 'ManagementObjectSearcher' couldnot be found CKKwan Microsoft C# .NET 1 20th Mar 2009 05:58 PM
Compiler Error Message: CS0246: The type or namespace name 'AjaxPr =?Utf-8?B?V2ViRGV2Mg==?= Microsoft ASP .NET 0 24th Aug 2006 11:17 AM
Compilation error CS0246: The type or namespace name 'MySql' could not be found Benny Dein Microsoft ASP .NET 0 20th Mar 2006 06:30 PM
CS0246: The type or namespace name 'TemplateContainer' could not be found robseflops@gmail.com Microsoft ASP .NET 1 16th Mar 2006 06:56 PM
What means this error: CS0246: The type or namespace name 'xxxx' could not be found Joe DeAngelo Microsoft C# .NET 3 12th Aug 2004 01:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:46 AM.