• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

"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 :(  
0
jimshock
Asked:
jimshock
  • 9
  • 7
  • 3
  • +1
2 Solutions
 
riyasjefCommented:
Hi

This probably means that ASP.NET is not registering with your IIS. To repair this, you can use a registration tool called aspnet_regiis.exe, which updates the script maps at the IIS metabase root (C:\inetpub\wwwroot). First you need to open up the command prompt (go to start, run, type in command, and press enter). For Version 1.1 of the .NET framework, you must type in the following at the prompt and then press enter:  
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis –i  
[Make sure you check the .NET Framework Version – it may be slightly different that the one in the example.] After pressing enter, the mapping is automatically updated. Check the wwwroot again to see if your project folder is there, and then try opening it again in Visual Studio.
 

See FAQ

http://tallulah.kennesaw.edu/csis4490/faq.htm

RJ

0
 
riyasjefCommented:
0
 
jimshockAuthor Commented:
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?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
riyasjefCommented:
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
0
 
riyasjefCommented:
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
0
 
riyasjefCommented:
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

0
 
jimshockAuthor Commented:
Still getting same above error, page opens as 'Page cannot be displayed..."
0
 
podiluskaCommented:
Have you built/compiled the project before looking at it?
0
 
jimshockAuthor Commented:
Nope.  I'm a total nube to web developing, how do I do that?
0
 
podiluskaCommented:
in visual studio, go to the build menu, and choose build solution
0
 
jimshockAuthor Commented:
still same error
0
 
riyasjefCommented:
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




0
 
riyasjefCommented:
Create the folder in c:\inetpub\wwroor directory and let me know the result
0
 
jimshockAuthor Commented:
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 :(
0
 
ajitha75Commented:
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.
0
 
jimshockAuthor Commented:
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?
0
 
ajitha75Commented:
Open Visual Studio.NET and create a new web application. Check if this is happening successfully.
0
 
jimshockAuthor Commented:
It does open correctly
0
 
ajitha75Commented:
Ok. Then it looks like your folder is not configured as Virutal Directory. Can you make 'C:\Microsoft Press\ASPNETSBS\Chapter_01'  as a virtual directory and try opening it.
0
 
jimshockAuthor Commented:
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
0
 
jimshockAuthor Commented:
All the other files open fine in VS but that first one.  I think it's just corrupted.  Thanks for all your help guys!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 9
  • 7
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now