|
-
Mar 14th, 2004, 02:51 PM
#1
figuring out the directory for localhost?
is there a way to figure out where http://localhost points to? I want to get the local path
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Mar 14th, 2004, 03:12 PM
#2
Frenzied Member
I'm interested. Why?
A quick look on my mahchine show a registry key HKLM\Software\Microsoft\InetStp PathWWWRoot as c:\inetpub\wwwroot - which is where my root is. So I suppose you could grab it from there.
Unsure whether there's some object that encapsulates IIS and you can get some property.
Mike
-
Mar 14th, 2004, 04:10 PM
#3
well I wanna open a solution file (for an asp project) and the project paths are relative to localhost. So I'm guessing there is a proper way to figure out the location of the default site folder so you think that registry value is the right one?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Mar 14th, 2004, 07:02 PM
#4
Frenzied Member
I don't know if that's the correct registry value or not - it was just a quick look. But I'm guessing it's the one.
But again, why? localhost is your machine, why do you need to figure out where the wwwroot is? Whenever I create a default web application, the solution file is not created under Inetpub anway.
I assume you're talking about your local machine, or a machine on your LAN. If not, guess I don't know what I'm talking about 
Mike
-
Mar 14th, 2004, 07:52 PM
#5
-
Mar 15th, 2004, 10:25 AM
#6
Frenzied Member
I must be dumb, because I still don't understand the why of what you're doing. But anyway, when I open up a .sln file, it has the full path - i.e. http://localhost/WebApplication1/WebApplication1.vbproj - this is VS 2003.
Maybe you can search the registry to see what the key is for the value of your local host.
Mike
-
Mar 15th, 2004, 01:31 PM
#7
Originally posted by Mike Hildner
I must be dumb, because I still don't understand the why of what you're doing. But anyway, when I open up a .sln file, it has the full path - i.e. http://localhost/WebApplication1/WebApplication1.vbproj - this is VS 2003.
Maybe you can search the registry to see what the key is for the value of your local host.
Mike
ok, now what I'm askign is how can you figure out what folder in your computer this path represents: http://localhost/WebApplication1/WebApplication1.vbproj
if you try to open that file with StreamReader you'll get an error cuz it wont be able to find the path. You have to change the path from http protocol to file protocol or just the way normal paths are displayed.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Mar 15th, 2004, 03:29 PM
#8
Frenzied Member
Ok - I see now, yes, I am dense. But did you search your registry? How about HKLM\System\CurrentControlSet\Services\W3SVC\Parameters\Virtual Root? Name = "/"
-
Mar 15th, 2004, 07:02 PM
#9
Originally posted by Mike Hildner
Ok - I see now, yes, I am dense. But did you search your registry? How about HKLM\System\CurrentControlSet\Services\W3SVC\Parameters\Virtual Root? Name = "/"
yeah that seems to be the right path... but before I go with that, I wanna see if this thing works: Would someone help me to figure out how to use this in a windows applicatoin? I think I used it in an asp.net application a long time ago, but dunno how to use it in a windows app. I've added the system.web reference and now I wanna be able to use this:
System.Web.HttpContext.Current.Server.MapPath()
If I try to call it, it gives me a null reference error (cuz Current has a value of nothing) how do I get this to work?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
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
|