views:

234

answers:

4

Dear All,

I need to put a file at this address: http://localhost:51547/file.txt

What folder would I put it in on C:/?

Tony

A: 

Any folder you want. The port designator is specified in IIS itself.

http://support.microsoft.com/kb/149605

somacore
A: 

This depends on the server configuration that listens on port 51547.

Sorry, your question is very, very unclear.

Andrejs Cainikovs
A: 

I suggest you that if you want to do a site(HTTP) is better to use the port 80 or to do a redirection for another port, remember too that localhoost is a loop back and also take a look at PortForward to check some ports that are used by specific applications and types of servers, and please improve your question.

Regards.

Nathan Campos
A: 

If I understand your question correctly and you're trying to expose a file via the ASP.NET development server at that location (http://localhost:51547/file.txt) I'm afraid the answer is not quite to your liking.

Basically I don't think you can serve files from the root of the ASP.NET development server (i.e right after the localhost:port/ part - the port is automatically selected by ASP but you can also manually configure it). ASP.NET automatically creates a virtual application path right after localhost:por> and so you're most likely going to be limited to serving files from the virtual application folder. So, assuming you web application name is: "testApp", if you put a file called file.txt in the directory where you're storing the source code for "testApp" it will also become available when you're testing at: http://localhost:port/testApp/file.txt (note the testApp in between the host-name & port, and the file-name)

UPDATE

In light of you comment, here's something you could do. You could try to get a simple HTTP server installed on your development computer and have it serve files on a different port (say port 8000). In that case you would serve file.txt using this secondary HTTP server and it would be accessible at: http://localhost:8000/file.txt.

You could try to install Apache or use IIS which comes with Windows. For Apache, the quickest way to get it going would be to install a WAMP environment. You may also try Lighttpd, and also note that MySQL or PHP are not required at all if you're only serving static files.

Miky Dinescu
Dear Miky D,Your answer totally makes sense. But let me explain what I'm trying to do. I'm trying to get a WCF service make a cross domain call to a Sl3 app. Per MSDN references you're supposed to put the crossdomain.xml at the root of the domain, but I cannot seem to do that, as it puts it at localhost:51547/myservice/crossdomain.xml. The service however doesn't find the file at that location. HTTP 404 error returned. Any ideas? or is my explanation insufficent?
Tony
See my answer for an update (for space reasons)
Miky Dinescu
THANK YOU SOOO MUCH!! You helped me fix it!! It works!!! :) :) :)
Tony