Map path of another project


I have a ASP WEB solution, and I have 4 projects in the solution. I have to map the path of a folder ( Images ) that is in a project named ADMIN . And from my WEB project I have to save the images inside this same folder.

My directory code looks like this ...

diretorio = Server.MapPath("~/Imagens/"); // mas ele da erro diz que o caminho virtual nao pode ser encontrado...

So I took it and put it all the way like this ...

diretorio = Server.MapPath("~/siteWEB/siteADMIN/Imagens/"); // que seria o caminho todo mas ele da o mesmo erro, que o caminho nao pode ser encontrado.

How to save images to different projects?

asked by anonymous 15.05.2014 / 22:37

2 answers


It is important to remember that the path must be the physical directory on the server, for example:


Also remember that ASP 3.0 does not accept ; at the end of lines / commands.

28.05.2014 / 22:40

This images folder is in which location to your asp code?



If so, just

diretorio = Server.MapPath("Imagens/")

Now if you look like this:


diretorio = Server.MapPath("../Imagens/")

I do not remember anymore, but I think ASP does not have all the folders back, try:

diretorio = Server.MapPath("\Imagens")
16.10.2014 / 15:07