Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 11, 2007 12:06 PM by John Spurlin
Apr 30, 2007 05:29 AM|LINK
I hope my question is clear.I would really appreciate some help in this.
Apr 30, 2007 07:52 AM|LINK
Apr 30, 2007 11:14 AM|LINK
Thnks for your reply.I am going to be put the files in my web root. But I have no control over the folder in the webroot folder where the the application is going to be stored and hence where the file is going to reside.
For eg: it could be http://localhost/sample1/file.txt (If the target server location is C:\inetpub\wwwroot\sample1)
or it could be also be http://localhost/sample2/file.txt (If the target server location is C:\inetpub\wwwroot\sample2)
So what I need to know is is there anyway I can somehow find out the URL of the file and somehow pass that information to the JS file,so that when the client downloads the JS file,it contains the correct URL
Apr 30, 2007 11:25 AM|LINK
Apr 30, 2007 11:43 AM|LINK
I created a web setup deployment project which installs the web application in the target server.When the .msi file is run in the target,it gives the option to the person running the setup file to mention the name of the virtual directory which is going
to house the application and hence the files.It is the folder name(which as u say is dynamic in the sense that it is going to be created during the time app is installed) which i am trying to determine to write in my JS file.
and like you said,my URL in the final sense wont be http://localhost.. but right now I am just testing it on my local machine and a separate target machine..
thanks for all your replies
Apr 30, 2007 12:37 PM|LINK
Apr 30, 2007 03:05 PM|LINK
But when I install from the msi file in the target server,the option is given to change the name of the virtual directory.So a change in the name of the virtual directory would change the value of the URL.
So I wanted to know if it is possible for me to somehow get the new name of the virtual directory to reflect the changed URL
Apr 30, 2007 04:05 PM|LINK
Apr 30, 2007 07:30 PM|LINK
I think I have worked out the cause of your confusion. I suspect you are using Windows XP Pro and IIS 5.1 to create and test your applications. If this is the case, IIS 5.1 will only allow you to create one "web site" by default. This runs under localhost.
If you want ot create any more sites or projects, you have to put them in folders under wwwroot, and browse to them as http://localhost/myproject1 or http://localhost/myproject2 etc. You know that the myproject1 folder contains your "site", but as far as
IIS 5.1 is concerned, that's just a subfolder of the default site.
IIS 5.1 is NOT a proper web server. When you deploy your application on a proper server, such as IIS 6.0 or 7.0, the files get put into a virtual directory. It doesn't matter what this is called, because the domain of your site is mapped to that directory.
When you want to run a page in your app, you now request http://www.mydomain.com/mypage.aspx. http://www.mydomain.com is an alias for the virtual directory. The mapping is taken care of behind the scenes. All the files and subfolders are placed identically
in relation to the root folder/virtual directory (which is now know as http://www.mydomain.com from outside the web server) and can be referenced in an identical way to the structure on your PC. ie /subfolder1 or /subfolder2/page3.aspx etc.
If you are using XP Pro, hopefully this will make things clearer for you. You might also be interested in a tool from
jetstat.com called IISAdmin. It's a free download that allows you to create multiple sites on IIS 5.1. You can still only run one site at a time, but whichever one you are running will be reached at just http://locahost.
May 01, 2007 01:34 AM|LINK
thanks for all ur help.i really appreciate this..
i am using windows xp with IIS 5.1.
i have no control over wat version of IIS is going to be in use in the target server.Nor do i have the control over installing the tool on the target server.
I guess I dont have any other options then right?
Is there any way that I can make sure that the virtual directory which is created at the target server always has the same name? I mean can i remove the option of the user having the ability to change the name of the virtual directory which is created at
the target server?