Link to home
Start Free TrialLog in
Avatar of jimshock
jimshock

asked on

"Unable to open Web project ... two need to map to the same server location" Visual Studio.NET problems

I just purchased the Microsoft ASP.NET/Programming with Visual Basic.NET book and have installed Visual Studio.NET 2003 on an XP Pro machine, and when I navigate to the sample projects installed on my C:, I get this message:
"Unable to open Web project 'Chapter_01'. The file path 'C:\Microsoft Press\ASPNETSBS\Chapter_01' does not correspond to the URL 'http://Localhost:/Chapter_01'. The two need to map to the same server location. HTTP Error 404: Object Not found"
Can someone please help?!  I've just started and I'm stuck already :(  
SOLUTION
Avatar of riyasjef
riyasjef

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of riyasjef
riyasjef

Avatar of jimshock

ASKER

Tried both, to no avail.  I tried copying the folder directly into the C:\inetpub\wwwroot, and found I can open the project in there, but when I right-click the 'Welcome.aspx' page and hit 'View in Browser,' I get the following error:

Server Error in '/' Application.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 37:            by Microsoft that offers a single logon and core profile services for member sites.
Line 38:     -->
Line 39:     <authentication mode="Windows" />
Line 40:
Line 41:
 
Source File: C:\Inetpub\wwwroot\Chapter_01\web.config    Line: 39

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Any ideas?
OK try this

1.Go to your IIS manager and click on the ur site properites
2.Click Edit - enble anonymous access.......
3.set ur window logon account name and password under which the apllication should run..

By default anonymous access account is used

RJ
oh sorry

>>This error can be caused by a virtual directory not being configured as an application in IIS.

1.Go to your IIS manager and click on the ur site properites
2.Virtual Directory tab
3.Application Settings click on "Create application" - set the name
4.Apply

RJ
or

create a virtulal directory...

1.Go to your IIS manager and right click on the ur site properites
2.New -> Virtual Directory - Follow the procedures
3.Give an alias (say "test") and browse ur application folder
4.finish

and in IE like this

http://test/default.aspx

RJ

Still getting same above error, page opens as 'Page cannot be displayed..."
Have you built/compiled the project before looking at it?
Nope.  I'm a total nube to web developing, how do I do that?
in visual studio, go to the build menu, and choose build solution
still same error
ok let us try to trobleshoot it now

creaeate a new folder and a new , a new aspx file (hello.aspx) and put this code

<%
     Response.write("hello")

%>

and

http://localhost/test/hello.aspx




Create the folder in c:\inetpub\wwroor directory and let me know the result
I went to c: /inetpub/wwwroot directory and created a folder called hello.  how do I create the aspx file and put the code behind it?  excuse my ignorance :(
Can you check this.
Go to InetMgr.
Go to Web Service Extenstions
You will see a web service extension ASP.NET v1.1.4322. If it is prohibited, change it to Allowed. That should work.
I'm in IIS V5.1 - my I've looked under File, Action, View, and checked the properties of Website Folder, Default Website Icon, and Default SMTP Virtual Server, don't see a tab for Web Service Extensions - I'm looking in the wrong place, maybe?
Open Visual Studio.NET and create a new web application. Check if this is happening successfully.
It does open correctly
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Strange.  I did so, and when I right-click the file in IIS and hit Browse the page does finally open.  But again, if I'm in Visual Studio and I browse  C:\Microsoft Press\ASPNETSBS\Chapter_01 , I still get the same errors I had above
All the other files open fine in VS but that first one.  I think it's just corrupted.  Thanks for all your help guys!