473,668 Members | 2,600 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTP Server Root Folder

Hi All,

I have this BaseHTTPServer. HTTPServer that is located at C:\ (im on
Windows XP), when i run the program (httpserver.pyw ) from the Run
Dialog as "C:\httpserver. pyw" the root folder ("\") for http server is
C:\, but when i add an entry to Registry Run so that it runs at boot
time, the root folder becomes "C:\Documen ts and Settings\<usern ame>" ?

Does anyone know what the problem is?

Cheers

Sep 5 '06 #1
1 2552
placid wrote:
Hi All,

I have this BaseHTTPServer. HTTPServer that is located at C:\ (im on
Windows XP), when i run the program (httpserver.pyw ) from the Run
Dialog as "C:\httpserver. pyw" the root folder ("\") for http server is
C:\, but when i add an entry to Registry Run so that it runs at boot
time, the root folder becomes "C:\Documen ts and Settings\<usern ame>" ?

Does anyone know what the problem is?
Yes. Rather obviously, these two different ways of running programs
assert different working directories for the program.

A simple way around this would be to have your program make an
os.chdir() call to ensure the correct working directory before it starts
the server.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
14314
by: John Rebbeck | last post by:
I've got the directory f:\Company\Product set as web shared so it's got a virtual directory in the default web site on my test server's IIS. If I try to use Server.MapPath in that site it returns a path within c:\Inetpub\wwwroot rather than the real path. Can anyone please tell me why this isn't working? Regards, John
9
9417
by: JR | last post by:
Hi, I'm migrating my website to an IIS 6.0 server and all the asp pages work fine except for the ones that reference include files, even though I have "Enable parent paths" enabled in the App/Options tab. The include files are being called as <!-- #include virtual="../includes/file.inc" --> <!-- #include virtual="../includes/script.asp" --> If I remove the parent path call it works just fine. I
6
635
by: Javier Cortés Cortés | last post by:
i am getting this error when i am trying to access any file(with the ext. aspx) from my remote server. the error is : Server Error in '/' Application. ---------------------------------------------------------------------------- ---- Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application
5
1234
by: moondaddy | last post by:
I'm setup with a new ISP where we were given an account which we could setup multiple domains. To do this we were given a root directory where we setup a folder for each domain. then we mapped the folders to virtual domains. Then I copied a VS 2003 project (an old front page website that was turned into a VS project for this process) by using the Copy Project menu to its new location in one of these virtual domains. When I surf to the...
3
2795
by: Calvin KD | last post by:
Hi everyone, I don't know if there's anyone out there is having the same problem. My DotNet 1.1 version uses FormsAuthentication.RedirectFromLoginPage() method to take user from the Login page to the Welcome page. My folder structure is as follows: Root Dir bin images secure Welcome
6
1389
by: Dave | last post by:
This is such a "dead in the water" problem I don't even know if this is the right forum for it. I have developed an ASP.NET/C# project on my own PC and it's working. I then transferred it to the remote serverwhere it will finally reside. I'm not a server expert, but the administrator says that ASP.NET is enabled. However, when I access any of the pages I just get a generic "Server Error in '/' Application. Runtime Error" page that tells me...
17
2911
by: Michael | last post by:
Hello, I am writing an app that will sit on the desktop. It needs to be able to make a copy of a folder that sits on the server. It will copy the folder from the server and place it in the same directory on the same server. This is the line of code that I am using: System.IO.File.Copy(sDistinationFolder + "NewOrderTemplate", sDistinationFolder + myDate.Date + "_" + mtxtJobNumber.Text); So, as you can see, I am copying a folder...
7
6241
by: teo | last post by:
I need to use the 'Server.MapPath' function in the 'Session_End' event of the Global.asax file (to reach a folder and the clean some temporary files up), but it doesn't work: Sub Session_End(ByVal sender As Object, ByVal e As EventArgs) Dim myPath As String = (Server.MapPath("../public/MyFolder/") End Sub
1
2726
by: ats | last post by:
Hi there. I have a folder named reports on my web server. Inside the folder is a page named reports.aspx and 2 folders named client1 and client2. I have some spreadsheets in each of the folders that are relative to each individual client. I would like to know how I can use server.mappath to choose the correct folder depending on which client is logged. For example I would have the following code on my page behind: <CODE> Dim dirReo as...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8371
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8572
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.