473,793 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error loading class when developing web pages under folders

I created a new folder using VS.NET 2003. Then I created a new web form
under that folder, say, \Member\Default .aspx. However, even if I didn't do
anything to that page, a run-time error appears when I try to run it --

Can not load class MySite._Default .

I am using VB to write codes. Does anyone have any idea why this problem
happens? Thanks!
Nov 18 '05
13 1862
Hi John,

In my design, the root folder of my site is open for everyone (don't need to
login) while the sub-folders (say /Member) need authentication. When I was
not using VS.NET (I used notepad to write codes) there is a Web.config in
the root folder and another in /Member, there was no problem at all.

"John" <jc************ *****@hotmail.c om>
pJ************* ***@news-server.bigpond. net.au...
"Duron" wrote in message
Then, I copied Web.config into /Member. After this, if I try to run
/Member/Default.aspx, an error message says I have to make this folder an web application in IIS. I did so. But then the old error (can not load
namespace MySite._Default ) occurs.

I haven't done many things to Web.config except the following,

<authenticati on mode="None">
</authentication>
<authorizatio n>
<allow users="*" />
</authorization>

The reason why I add Web.config to that folder is because I want the root folder be free to access while /Member needs certification. How do people normally do this in VS.NET?


I could be wrong (ultranewb, here), but I believe the reason you're

getting an error message that says you have to 'make the folder an application' in
IIS is because you're trying to specify authentication again in your second web.config file. Authentication can only be set in the web.config file in
the root directory, as it pertains to the whole application. So just remove the <authentication > tag pair from the config file in the subdirectory and
everything else should be fine - the authorization section does the work you need. Or you can, as was suggested, use 'location' tags in a single
web.config file at root.

HTH

-John

Nov 18 '05 #11
Hey there -

Yeah, that should be fine; I think the problem only occurs when you try
to specify 'authentication ' in any web.config file besides the one that's at
the root directory. So you can specify different authorizations in both, but
authentication only in one. The authentication you specify in the web.config
file at root directory then applies to the entire project, even if your root
directory authorizes everyone (and your subs have access limitations).

It's highly likely I'm misunderstandin g the issue, though. ;) Heheh...
Good luck!

-John

"Duron" <jo*********@se ed.net.tw> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi John,

In my design, the root folder of my site is open for everyone (don't need to login) while the sub-folders (say /Member) need authentication. When I was
not using VS.NET (I used notepad to write codes) there is a Web.config in
the root folder and another in /Member, there was no problem at all.

"John" <jc************ *****@hotmail.c om>
pJ************* ***@news-server.bigpond. net.au...
"Duron" wrote in message

> Then, I copied Web.config into /Member. After this, if I try to run
> /Member/Default.aspx, an error message says I have to make this folder
an
> web application in IIS. I did so. But then the old error (can not
load > namespace MySite._Default ) occurs.
>
> I haven't done many things to Web.config except the following,
>
> <authenticati on mode="None">
> </authentication>
> <authorizatio n>
> <allow users="*" />
> </authorization>
>
> The reason why I add Web.config to that folder is because I want the

root
> folder be free to access while /Member needs certification. How do

people
> normally do this in VS.NET?


I could be wrong (ultranewb, here), but I believe the reason you're

getting
an error message that says you have to 'make the folder an application'

in IIS is because you're trying to specify authentication again in your

second
web.config file. Authentication can only be set in the web.config file in the root directory, as it pertains to the whole application. So just

remove
the <authentication > tag pair from the config file in the subdirectory and everything else should be fine - the authorization section does the work

you
need. Or you can, as was suggested, use 'location' tags in a single
web.config file at root.

HTH

-John

Nov 18 '05 #12
http://www.4guysfromrolla.com/webtech/110701-1.2.shtml might be a little
more helpful than my attempts. ;)
"Duron" <jo*********@se ed.net.tw> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi John,

In my design, the root folder of my site is open for everyone (don't need
to
login) while the sub-folders (say /Member) need authentication. When I was not using VS.NET (I used notepad to write codes) there is a Web.config in the root folder and another in /Member, there was no problem at all.

"John" <jc************ *****@hotmail.c om>
pJ************* ***@news-server.bigpond. net.au...
> "Duron" wrote in message

> > Then, I copied Web.config into /Member. After this, if I try to run > > /Member/Default.aspx, an error message says I have to make this

folder an
> > web application in IIS. I did so. But then the old error (can not load > > namespace MySite._Default ) occurs.
> >
> > I haven't done many things to Web.config except the following,
> >
> > <authenticati on mode="None">
> > </authentication>
> > <authorizatio n>
> > <allow users="*" />
> > </authorization>
> >
> > The reason why I add Web.config to that folder is because I want the root
> > folder be free to access while /Member needs certification. How do
people
> > normally do this in VS.NET?

Nov 18 '05 #13

I've created another project for the sub folder and it's working fine (so
far). But still thanks for your help.

- Duron

"John" <jc************ *****@hotmail.c om>
AL************* ****@news-server.bigpond. net.au...
Hey there -

Yeah, that should be fine; I think the problem only occurs when you try to specify 'authentication ' in any web.config file besides the one that's at the root directory. So you can specify different authorizations in both, but authentication only in one. The authentication you specify in the web.config file at root directory then applies to the entire project, even if your root directory authorizes everyone (and your subs have access limitations).

It's highly likely I'm misunderstandin g the issue, though. ;) Heheh...
Good luck!

-John

"Duron" <jo*********@se ed.net.tw> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi John,

In my design, the root folder of my site is open for everyone (don't need
to
login) while the sub-folders (say /Member) need authentication. When I was not using VS.NET (I used notepad to write codes) there is a Web.config in the root folder and another in /Member, there was no problem at all.

"John" <jc************ *****@hotmail.c om>
pJ************* ***@news-server.bigpond. net.au...
> "Duron" wrote in message

> > Then, I copied Web.config into /Member. After this, if I try to run > > /Member/Default.aspx, an error message says I have to make this folder an
> > web application in IIS. I did so. But then the old error (can not load > > namespace MySite._Default ) occurs.
> >
> > I haven't done many things to Web.config except the following,
> >
> > <authenticati on mode="None">
> > </authentication>
> > <authorizatio n>
> > <allow users="*" />
> > </authorization>
> >
> > The reason why I add Web.config to that folder is because I want the root
> > folder be free to access while /Member needs certification. How do
people
> > normally do this in VS.NET?

I could be wrong (ultranewb, here), but I believe the reason you're getting
an error message that says you have to 'make the folder an
application' in IIS is because you're trying to specify authentication again in your

second
web.config file. Authentication can only be set in the web.config file in the root directory, as it pertains to the whole application. So just

remove
the <authentication > tag pair from the config file in the subdirectory and everything else should be fine - the authorization section does the

work you
need. Or you can, as was suggested, use 'location' tags in a single
web.config file at root.

HTH

-John


Nov 18 '05 #14

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

Similar topics

0
3687
by: Jagdeesh | last post by:
Hai Colleagues, I am using Tomcat 4.1.24 and JDK 1.4.0_03 in my winXP machine. I've transferred a set of folders(containing jsp files) into tomcat's webapps directory(to /webapps/bob , /webapps/sue) and i have added the folders bob, sue in my server.xml(in the context path). When i am trying to run jsp files from my browser, it works fine. But, the following jsp files reports some exceptions which is quite hard to understand. Here is...
2
828
by: Gustavo L. Fabro | last post by:
Greetings. I had an user control built on Visual Studio 2003 that I used in some forms build also with Visual Studio 2003 (C++ was the language for both cases). Now I'm trying to port this to VS 2005. The forms that use these specialized ..NET /CLR compiled controls will compile and run, but won't show in the Design editor. What happens is that when I double click the .h file to open it under the
6
4756
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
5
2492
by: Manish Jain | last post by:
Environment: Windows 2000 Server (SP4), ASP.Net/C# (Framework 1.1) Hardware: PIII @ 700 MHz, 512 MB RAM ---------------------------------------------------------------------------- ------------------------------------------------------- I have developed a web application which I am deploying on above mentioned environment. Problem is that when I run it for the first time after a Build, then there is too much of CPU hogging. The Task...
0
1555
by: RK | last post by:
Hello I am using Microsoft Development Environment 2003 Version 7.1.3088 & Framework 1.1.4322 and developing Windows Forms using Visual C#. It was working fine for quite a month. Currently while opening the c# project the designer started giving lot many errors. The compiled exe, before the last project closing is still working as desired. The following are the problems. 1. A class file shows error in the Solution Explorer, also...
5
1699
by: David | last post by:
I'm developing an ASP.NET application to run on Win2K server with IIS 5.1, which has run perfectly happily in various development, test and staging environments. I've recently deployed it on one of our production servers and I'm getting an intermittent 'Access is denied' error when pages are loading. The file being accessed is an xml globalisation file that is used to load the text for the page according to the language settings of the...
2
3737
by: moondaddy | last post by:
I have a simple sample site I'm building in asp.net 2.0. I created a master page and a default.aspx content page in the project's root directory. Then I created a subfolder called content and added some aspx pages in the 'content' folder. when these pages were created I referenced the master page so everything should be linked up OK. Now, back on default.aspx I added a linkbutton and referenced one of the aspx pages in the 'content'...
1
1751
by: Nathan Sokalski | last post by:
I am revieving the following error for one of my controls when loading any pages that use it: Server Error in '/exposure/app' Application. -------------------------------------------------------------------------------- Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
8
12789
by: ajos | last post by:
hi frnds, the situation is im developing a web application in struts-- my specifications-eclipse3.2.2,struts1.1,tomcat5.5.23 mysql5.0 db. the scenario-i have a jsp page which adds the records in the db.when the user clicks submit,a javascript gets fired and checks the validation.on submit the BdgMastAction.java does all the data access and forwards the control to a jsp named bdgm.jsp.the results are displayed in the jsp.the values...
0
10433
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10161
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9035
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6777
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.