.NET Forum / Visual Studio.NET / IDE / May 2004
Web Project Setting
|
|
Thread rating:  |
John - 14 May 2004 01:59 GMT Hi, All,
I need your help on this wierd thing -
Let's say, I first created a web application by using FrontPage access method then I goto project property page, to change it to File share method
when you click the File share option box, VS.NET automatically add the folder for you - my question is, where VS.NET get that default folder information?
in my case, it always point to a new site I created - I want it be c:\inetpub\wwwroot\something - if I know where VS.NET gets this information then I change it back to c:\inetpub\wwwroot
I could not open any web project my collegue created from SourceSafe.
When use File Share access method, how and where do you map http://localhost to c:\inetpub\wwwroot - it looks like my map messed up so every time I create a web application, VS.NET complains that cannot create project because http://localhost/webapplication1 does not map correctly - it tries to create the web app in c:\websites\mysite\webapplication1 (this is the root folder of the new web site I created) instead of c:\inetpub\wwwroot\webapplication1 folder.
Thanks very very much!
John
Steven Cheng[MSFT] - 14 May 2004 06:17 GMT Hi John,
As for the physical location the VS.NET will search, here are my understandings:
The Mode (fileshare or FPSE) is only representing the approach how we access the website(webserver). The Fileshare will connect to the webserver via Remote file shared mode. This is ok in local intranet or just local computer scenario. The FPSE mode is using the http approach which is also ok for internet scenario. And this is no related to how the website mappign the url to its physical path.
As for the behavior that when we create web application specifying Http://localhost/webapplicaitonx and the VS.NET will search the inetpub\wwwroot or anyother physical folder. This is infact only related to the IIS's site setting and VS.NET won't contain any infomation on this(where to look for the physical path for a certain url). In fact, when creating , the vs.net will done the following things:
looking for the certain website in the iis. For example, if we use http://localhost/.. ,then it'll look for the website which is mapping to localhost(by default it should be the default site). Then, it'll get the website's home directory(the physical path of the website's root folder) from the IIS metabase, we can find this info when right click the site and select properties menu in IIS's manage console and in the HOmeDiretory Panel. And VS.NET will create the new webapplication in the physical folder.
So if you create a new website, its web address is mapped to localhost(unassigned) and its directory is not the "inetpub\wwwroot" the VS.NET will certainly go to the certain folder you set for the site's home directory. And you can set the site's home diretory back to "inetput\wwwroot" in the IIS manage console. Do you think so?
Please have a try and if you there is anything else unclear, please feel free to post here.
Regards,
Steven Cheng Microsoft Online Support
 Signature Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
 Signature Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
John - 14 May 2004 19:33 GMT Hi, Steven,
Thank you very much for responding to my question.
Environment: Windows 2003 Server Sharepoint team services installed I created a new WebSite with host header MySite which pointed to C:\WebSites\MySite, Sharepoint services applied to this site Default Website point to c:\inetpub\wwwroot - with frontpage 2002 extension WebSvcs is a webfolder created under Default website
When I try to create new web application, specify http://localhost/websvcs/webapplication2 then I got the following error: "The default web access mode for this project is set to file share, but the project folder at 'http://localhost/WebSvcs/WebApplication2' cannot be opened with the path 'C:\WebSites\MySite\WebSvcs\WebApplication2'. The error returned was: Unable to create Web project 'WebSvcs/WebApplication2'. The file path 'C:\WebSites\MySite\WebSvcs\WebApplication2' does not correspond to the URL 'http://localhost/WebSvcs/WebApplication2'. The two need to map to the same server location. HTTP Error 404: Not Found"
I also attached two images (one for the iis setting and another is the error i got) - the image is too large but trust me my default website is point to c:\inetpub\wwwroot :)
If VS.NET get the file path from IIS, then it should use c:\inetpub\wwwroot but it did not so I think VS.NET get the file path from somewhere else.
Thanks very much! John
> Hi John, > [quoted text clipped - 45 lines] > Get Preview at ASP.NET whidbey > http://msdn.microsoft.com/asp.net/whidbey/default.aspx Steven Cheng[MSFT] - 15 May 2004 10:23 GMT Hi John,
Thanks for the followup and the further information. Well, since you confirmed that default website is point to c:\inetpub\wwwroot. However, the Http://locahost/.. web url is not always mapping to the default site. This is related to the ip address setting for the website. So I'm interested in the ip address setting for the default site and the new created site. Also, I haven't see any attachment in your response message, would you check it or send them again? Thanks.
Regards,
Steven Cheng Microsoft Online Support
 Signature Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
 Signature Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
John - 18 May 2004 05:10 GMT Hi, Steven,
Thanks very much for your help.
The ip address settings:
default website: IP address: All Unassigned Port: 80 Advanced setting: Default 80 Default 80 localhost new website: IP address: All Unassigned Port: 80 Advanced setting: Default 80 MySite
I added one line in hosts file: 127.0.0.1 MySite
Thanks! John
> Hi John, > [quoted text clipped - 17 lines] > Get Preview at ASP.NET whidbey > http://msdn.microsoft.com/asp.net/whidbey/default.aspx Steven Cheng[MSFT] - 18 May 2004 10:00 GMT Hi John,
Thanks for the followup. From the IP address and host header setting, it seems that there is something strange in your setting. You set both sites' ip as All Unassigned and port:80
and you set both Default 80 and default 80 localhost two items in the default site. I think the "Default 80" item is unnecessary which will make the setting confused. Please try remove it and test again.
Also, you use different host header rather than different port number to distinct the two sites and only add record in hosts file. I think this is only ok for local can't work in a distributed env. And if you just want to run the two sites locally, I recommend that you use various port number to identify the different sites rather than host header, that'll be more convenient.
In addition, you can put some static pages or simple classic asp pages in the two sites and visit them in IE to confirm that which url will map which site and then retry in VS.NET. Hope helps. Thanks.
Regards,
Steven Cheng Microsoft Online Support
 Signature Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
 Signature Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
John - 18 May 2004 17:37 GMT Hi, Steven,
It looks like you were trying to help me how to setup a new website - I had this setting even in production environment and they worked pretty well and that is how you can host multiple website by using only one IP address - you do not want to ask customer to type different port other than 80 to access your website. My both websites works perfect - the only problem I was asking is why VS.NET tries to create web application in C:\Websites\MYsite folder when I try to create web application at http://localhost and my localhost point to c:\inetpub\wwwroot?
WHERE and HOW VS.NET get other site's root folder? from registry? any configuration file?
I only need to run my test site locally that's why I use hosts file. Please ask VS.NET group one question: when creating new web application, how VS.NET get the folder information? As I stated in my previous post, if I changed to use Frontpage instead of fileshare, the application will be created without any problem, after it's created, go to project property, try to change its access mode, VS.NET default to a folder - where does VS.NET get that folder information?
Thanks a lot!
John
> Hi John, > [quoted text clipped - 31 lines] > Get Preview at ASP.NET whidbey > http://msdn.microsoft.com/asp.net/whidbey/default.aspx Steven Cheng[MSFT] - 19 May 2004 10:33 GMT Hi John,
After the further research, I've found the following guide on creating asp.net web applcation through ProntPage Server Extension and File shared mode. The following solution is for creating Web projects on host header Web Sites using VS.NET 2003:
We followed the following Steps to get the Project Creation working in both File share and Front Page Server Extensions (FPSE) mode.
1) Created the sites with host headers. 2) Assigned the IP Address for the Website to be "All UnAssigned" 3) Configure FPSE on the Website with host headers 4) Hosts File was updated properly with the IP address and host header name For File Share more, we also had to follow these extra steps: 5) Create a share for the root of the host header WebSite 6) Grant all the share and Security permissions to the VS Developers group and add the current user to that group 7) When you get Web Access Failed dialog box when you try creating the project on host header using a URL like http://<hostheadersitename>/WebAppName, change the File Share Path to the following and retry: \\actualmachinename\Sharenamecreated\WebAppName.
In addition, as for your questions on ================= WHERE and HOW VS.NET get other site's root folder? from registry? any configuration file? =================
I don't think there're any configuration file or registry. I still think the VS.NET find the site's root dir from its IIS metabase settings. I think you can use RegMon or FileMon to have a check when trying to open an existing asp.net web appliction.
Further more, as you mentioned that the problem occurs when you have created the web app via FPSE but change it to FileShare. How do you change it? In project's property or would you provide some detailed steps when the error occurs. Thanks.
Regards,
Steven Cheng Microsoft Online Support
 Signature Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
 Signature Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
John - 19 May 2004 18:18 GMT Hi, Steven,
If VS.NET grab the folder information from IIS metabase then it should use c:\inetpub\wwwroot because http://localhost/ root is pointed to the default folder. I had problem creating application on http://localhost not on the new site - I will not want to create web application on the new site but VS.NET kept using my new site's root folder when I was trying to create web application on the default website.
Here is my initial posting with some clerification: ============================================================================ == I created a web application at http://localhost/websvcs/webapplication1 by using FrontPage access method then I goto project property page to change the access method to File share
when I click the File share option box, VS.NET automatically add the folder for me - as "c:\websites\mysite\websvcs\webapplication1", my question is, where does VS.NET get that default folder information? if it gets it from IIS metabase it should default to "C:\inetpub\wwwroot\websvcs\webapplication1" because my default website's root folder is c:\inetpub\wwwroot.
I could not open any web project my collegue created from SourceSafe.
When use File Share access method, how and where do you map http://localhost to c:\inetpub\wwwroot - it looks like my map messed up so every time I create a web application, VS.NET complains that cannot create project because http://localhost/webapplication1 does not map correctly - it tries to create the web app in c:\websites\mysite\webapplication1 (this is the root folder of the new web site I created) instead of c:\inetpub\wwwroot\webapplication1 folder.
Thanks very very much!
John ============================================================================ ==
> Hi John, > [quoted text clipped - 53 lines] > Get Preview at ASP.NET whidbey > http://msdn.microsoft.com/asp.net/whidbey/default.aspx Steven Cheng[MSFT] - 21 May 2004 09:41 GMT Hi John,
Thanks for the followup. Since currently when you creating a new web application, it still will locate into the new website's directory rather than the wwwroot, yes? And as I mentioned in the last reply that when we use file shared to create a new web application fail, it will popup the error dialog and let us manually input a file path, ===================== 7) When you get Web Access Failed dialog box when you try creating the project on host header using a URL like http://<hostheadersitename>/WebAppName, change the File Share Path to the following and retry: \\actualmachinename\Sharenamecreated\WebAppName.
=====================
Have you meet this dialog or try manually inputing the correct file path (wwwroot ) path?
Regards,
Steven Cheng Microsoft Online Support
 Signature Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
 Signature Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Steven Cheng[MSFT] - 26 May 2004 09:50 GMT Hi John,
Any futher progress on this issue? If there is anything else we can help, please feel free to post here. Thanks.
Regards,
Steven Cheng Microsoft Online Support
 Signature Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
 Signature Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|