|
-
Nov 13th, 2002, 08:05 AM
#1
Thread Starter
Addicted Member
Creating a ASP.NET project other than under WWWRoot
I received what seems to be good instructions on how to create
a ASP.NET project on a location other than INETPUB:
I created a virutal directory in wwwroot and pointed it to a folder "MyFolder" I created on the C: drive. I then pasted a default htm page in it, went to my browser and went to http:\\localhost\MyVirtualDirectoryName and voila the page was displayed. So I believe I did this part right.
I then went into .NET IDE to create a new project and typed in
http:\\localhost\MyVirtualDirectoryName\Project1 as the location.
I ended up with a error:
Web Access Error
"The default Web access mode for this projectis set to file share, but the folder at "Http://localhost/MyVirtualDirectory/Project1"
cannot be opened with the path "C:\Myfolder\Project1"
"Unable to create Web project "MyVirtualDirectory/Project1".
the UNC share "C:\Myfolder\Project1" doesnot exist or you do
not have access."
I made MyFolder as a share with permissions to all (Was not
logged on as administrator) with no change in results.
Any Clues?
Thanks
Tom
****All we are saying is give war a chance****
-
Nov 13th, 2002, 10:20 AM
#2
New Member
dont enter the project name as a folder in vs.net when creating the project - the project name will be the same as the folder you are trying to create it in.
So if you want to create a project called MyProject then create a folder called MyProject anywhere you want and set it up in IIS as you did then in VS.NET - new project called MyProject, and vs.net will expect it to be created in wwwroot/MyProject and should do so.
-
Nov 13th, 2002, 10:34 AM
#3
Thread Starter
Addicted Member
Not sure I follow
When I initially select new project I get:
Name: "WebApplication1"
Location: "http://Localhost/MyVirtualDirectory/Webapplication1"
I change the name "WebApplication1" to "Project1"
No good.
If I change the location to
"Http://localhost/MyVirtualDirectory
everything greys out
What should it be?
Thanks
Tom
****All we are saying is give war a chance****
-
Nov 13th, 2002, 10:54 AM
#4
Thread Starter
Addicted Member
Ok I understand but still no go
I created under C:\MyFolder a sub folder called "Project1"
Went to create a new project with
Name: Project1
Location: http://localhost/MyVirtualDirectoy/Project1
Still Crappo!
Aieeeee!!! Ive lost it!!!! The computer is sailing off the second
story (just a fantasy of course)
Tom
****All we are saying is give war a chance****
-
Nov 13th, 2002, 12:10 PM
#5
New Member
The first time you ever create an asp web app in vs.net it should be called WebApplication1 and will be created under http://localhost/WebApplication1
This means that vs.net will do it all for you. It will create a virtual directory under wwwroot called WebApplication1 and place all initial files there.
So I have tested successfully the same idea. I created a folder called testfolder in my c: directory. Then I added a virtual directory in IIS with an alias of testfolder (same as it's name).
Then in vs.net selected new web app and changed the location it will be created to http://localhost/testfolder and it works fine.
What is yVirtualDirectoy in http://localhost/MyVirtualDirectoy/Project1? Your virtual directory should be the same alias as the project name you intend to have. It doesn't matter where the folder is, what it is a sub folder of as long as IIS has it listed as a virtual directory with an alias of either the same name as the folder or what project name you want it to have.
-
Nov 13th, 2002, 02:17 PM
#6
Thread Starter
Addicted Member
Bwahahhah!!!
Naming the alias the same as my folder did the trick.
But. Ain't much of an "Alias" if you have to give it the same IMO.
But I guess disguising location not name is the point...
Thanks for holding my hand. This stuff isn't hard but it is hard to
find out about.
Tom
****All we are saying is give war a chance****
-
Nov 14th, 2002, 06:39 AM
#7
Member
It worked on my m/c
i did exactly what you wrote & it worked in my m/c. ( i have windows 2000 advanced server which is also a PDC). but i did it thru administrator login id. BTW, did you create the virurual directory thru the "Internet Information Services" Virtual Directory Creation Wizard ? If not give that a try.
sujala
-
Nov 14th, 2002, 07:08 AM
#8
Thread Starter
Addicted Member
Worked for you?
Did it work by calling the virtual directory and
actual folder the same name, or by using different names like
I was unsuccessfully doing? I did create the virtual directory
in IIS. (don't where else you could actually)
Tom
****All we are saying is give war a chance****
-
Nov 14th, 2002, 07:17 AM
#9
Member
Diffrent names no problems
Diffrent names no problems
-
Nov 14th, 2002, 07:20 AM
#10
Thread Starter
Addicted Member
How about that!
I wonder if Administrator made the difference? Musicman,
What do you make of this?
Tom
****All we are saying is give war a chance****
-
Nov 14th, 2002, 07:31 AM
#11
Member
hold on, cud simulate ur problem!
there seems to be some problem with sharing of 'nested' folders, which as u said u did. will get back to u.
-
Nov 14th, 2002, 07:50 AM
#12
Member
VS.Net is unable to create a web-application in a virtual directory in IIS if that..
VS.Net is unable to create a web-application in a virtual directory in IIS if that virtual directory is nested inside another directory on the had-drive. 1 curious work-around is U name the alias as the same name as the actually directory!!
ANY BODY ANY ANSWERS ??
sorry tom cudnt figure this out. BTW do you know, there will be always 1 file which is beyond ur control while u create a web-application in VS.Net & that is the .sln file which is always stored like this - "My Documents/Visual Studio Projects/ProjectName/ProjectName.sln"
-
Nov 14th, 2002, 08:01 AM
#13
Thread Starter
Addicted Member
Do I have this right?
You said:
VS.Net is unable to create a web-application in a virtual directory in IIS if that virtual directory is nested inside another directory on the had-drive.
This is confusing:
"if that virtual directory is nested inside another directory on the had-drive."
It is not the virtual directory aka "MyVirtualDirectory" that is nested on the hard drive; "MyVirtualDirectory" is under WWWROOT where it belongs. It is the "Actual" directory aka "MyFolder" which is to store the project that is elsewhere on the C: drive.
Is this what your saying? If so we are on the same page.
****All we are saying is give war a chance****
-
Nov 14th, 2002, 11:30 PM
#14
Member
-
Nov 15th, 2002, 10:42 AM
#15
Addicted Member
Guys,
I am reading this thread with interest.
Tom, I have on many occassions received the dreaded
'Web Access Error...'
"The default Web access mode...blah blah blah'
message.
1. Open IIS.
2. Create a 'New Web Site' - Assign my IP address
3. Browse to Folder of Home Directory: 'C:\Inetpub\wwwroot\ChrisTest'
4. I can now see the new web site 'ChrisTest' in IIS.
5. Open VisualStudion.NET to create a new project.
6. Select ASP.NET project
First Question:
In the 'Location' box, do I enter:
http://10.1.1.2/ChrisTest
or, should I enter:
http://localhost/ChrisTest
If I enter 'http://10.1.1.2/ChrisTest', the new project is created without any problems.
If I enter 'http://localhost/ChrisTest', then I receive 'The default Web access mode for this project is set to file share...etc' and the project cannot be completed.
Any advice on this would be much appreciated 
Thanks, Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|