I have created my asp pages in "D:/test" . This i have created as a virtual directory.
i am having some files in "D:/download/cont/somename" From the asp page i want to access the files in the d:/download/cont/somename folder. Here somename changes according to username. i.e first i want to check whether this path is valid and then get all the files from it but its giving me the following error
Server.MapPath(), ASP 0174 (0x80004005)
An invalid '/' or '' was found in the Path parameter for the MapPath method.
/test/contractsfile.asp, line 11
code:
somename = Request.cookies("username")
source = ".. est" & "/download/cont/" & somename
if fs.folderexists(server.MapPath(source)) ---------------------------> line 11
Is there some good mapping software out there that integrates well with ASP apps? I need to be able to pass in several addresses, and display a route on a map with driving directions.
Does anyone have an example of field mapping? I am trying to write an app that reads a .csv file and then allows a user to map those .csv fields to existing SQL fields.
I have the reading of the .csv & writing to SQL, but hit the wall trying to get a mapping process to work. Ideally, I would check off a field from the csv and check off a corresponding field in the sql field then hit a map button and it would set the fields in the sql statement according also removing those two selections.
I was susseesful in mapping remote machine with vbscript. Now I am building the same tool with ASP .I am using the same code but its not working. Below is the portion where I am mapping the drive: Code:
I am thinking of mapping out a website. The website is very large and the reason I am doing this is to find out which files are redundant and how I can go about tidying up and simplifying the code.
Can anyone recommend any good mapping tools? I am working for a company which gets all the Microsoft development tools. If anyone can recommend a Microsoft tool that would be better as I would already have access to it.
I try to use the below code to do mapping but, i saw no value in my dropdown. I'm using classic ASP, with MS SQL Server 2005. I have check, There are value in rs("statusid") and status table. Anyone can detect the problem here?
<select name="status" class="FormTextField" id="status"> <% SQL = "SELECT (CASE WHEN statusid='" & RS("StatusID") & "' " & _ " THEN '<option selected>' " & _ " ELSE '<option>' " & _ " END) + statusid " & _ " FROM Status ORDER BY statusid "
Set RSTypes = MM_cSupport_STRING.Execute(SQL) Response.Write RSTypes.GetString() RSTypes.Close %> </select>
I've setup several FTP shares on IIS 5, where some of the shares are located on another computer, while other directories are on the local computer.
Is there a function similar to server.mappath that I can use to return the physical path of a FTP virtual directory using ASP?
For example, I have a virtual directory called TestA located at C:TestA on the local computer running IIS 5. I have another virtual directory called TestB located at DevserverTestB where Devserver is another machine on the network.
In my ASP code, I need to be able to access the physical directories directly and I would like to avoid having additional code to deal with hard coded directory paths.
Is there something similar to the command server.mappath("TestB") which would return "DevserverTestB"? This way, the physical path is transparent and I can treat local and network shares in the same way.
I am trying to write an app that reads a .csv file and then allows a user to map those .csv fields to existing SQL fields...
I have the reading of the .csv & writing to SQL, but hit the wall trying to get a mapping process to work...
Ideally, I would check off a field from the csv and check off a corresponding field in the sql field then hit a map button and it would set the fields in the sql statement according - also removing those two selections.
i'm working on uploading images to the webserver.Got a "test" version working, but as soon as i try to modify it.on my server i've got an Upload folder in the same folder as my aspUpload page.the path connection is as follows:Code:
sPath = Server.MapPath(".Uploads") & ""
but now i don't want it saved in the Uploads folder.The folder path i want is ../../../images/models/
Main folder is "Web". In the "WEB" folder some asp file resides. another folder named "Admin" also reside in the "WEB" folder. My DB resides in the DB folder that is outside of the "WEB" folder and on the same root where "WEB" folder is.
I have a file named Connect.asp which contains the path for DB. I have included this file in both user files (which are simply in web folder) and in the administrator files. But when the admin tries to log-in the file didn't read the appropriate path as it finds the DB in the WEB folder. But it works fine when i communicate with the DB through user files.
I want to write logfiles to a textfile. But when the file doesn't exist, then the file should be created. But the code gives an error at this part of the code. I have no idea of what the mistake could be. Here's the code:
I'm writing an ASP validation script that uses a cookie that is created by a user validation page and has a single value. This site will be used only under Internet Explorer 5 and more recent.
My problem is that the page called after the cookie creation can't read the cookie unless I set the Cookie.Path attribute to "". All the documentation that I found about it is very brief, don't explain how it really works and if there's any kind of "side effects". An even stranger fact is that some people of my team can read the cookie without setting the Cookie.Path attribute.
Can anyone tell me how the Cookie.Path really works or witch browser settings make it needed (or not)?
I'm trying to concatenate a path of Application("WebSiteFullPath") which equals http://www.mywebsite.com/ and an image file like CODE below. My problem is the full path listing in RESULTS below adds an extra " quote and obviously breaks the path to the image. How can I script the quotes to not add the extra double quote between my website path variable and my image path?CODE:
I'm developing a content management system that uses a file uploader. The uploader works fine and uploads the file when using a mac computer, but doesn't upload the file when using a PC. I am thinking this is a path issue??
While my wwwroot is under C:inetput, how can I make URL pointing to the downloadable files on D:downloadmyfile? Do I have to use download COM? If yes, which one is recommended for free?
im having a problem with folder path in include files. I have a solution, but there must be a way better one. The problem is when i have an include file... menu.inc in my root directory root/. This menu.inc references images in the root/images/ folder. I also have an articles folder root/articles/. The menu.inc is included in files in the articles folder, however this messes up the image paths and files in the articles folder are looking for the images in root/articles/images/. to combat this, in front of every image reference in my menu.inc file, i have a variable <%= pathVar %>. At the top of every file in the articles folder, i have the command <% pathVar = "../" %>. this will insert a ../ before the images folder in the reference therfore correcting the image reference. In the root folder I use <% pathVar = "" %> , so the <%= pathVar %> amounts to nothing leaving the paths correct. This works, however means having to switch from HTML to ASP mode for every image in the include file, which is not efficient. Is there a better way around the path problem.
if you need to place the path to your database, what path do you place when you are having you site hosted by a web hosting company. For example my database is in a folder called "db" and its called "company.mdb"
the path I'm using is: "Data Source=c:dbcompanx.mdb"
but I keep getting a "database can't be found error" what path am I to assume they used. I mean its probably not a "C" drive so what do I place? I tried it without placing the drive but it doesn't work it seems to want only the direct path.
Why it is that to saVE a file an absolute path is required and to read a file or pic an relative path is required.can any one ellaborate it and also diff between relative and absolute path