1

I have two web application in my solution. One of them is for managing the system and another is for clients.

I should publish them one by one in separated places (of course on a machine but in separated addresses for Example http://manager.com and http://clients.com)

My question here is that, can clients web application access the files that the other manager web application has (in its physical directory)? If not how can I approach this problem?

see this design to get more details for this problem :

enter image description here

Thanks!

3
  • What are the files that you want to share between two projects? Commented Apr 22, 2015 at 5:56
  • @SBirthare thank you for editting my question.I meant that files with every type that manager uploads to web , would be accessible to clients from another application Commented Apr 22, 2015 at 6:11
  • Could you be more explicit with the scenario please. That will get your an answer faster. I think if you could elaborate your comment in the question, that's all needed. Commented Apr 22, 2015 at 6:17

3 Answers 3

2

What I usually do in a scenario like this, is store the files in a folder in the application that does the writing. Then I use IIS to create a virtual directory in the other application that points to the folder containing the files in the first application.

So in your case, you could have a folder "Files" in the manager.com website. Let's say the folder has this full path: D:\Websites\manager.com\Files You can then create a virtual directory in the clients.com website pointing to that path.

This has the advantage that you can code everything as if the folder exists in both applications.

Sign up to request clarification or add additional context in comments.

Comments

1

If your applications placed on one machine - certainly can.

You should do only one thing - give permission to folder with files (Or permission to DB with files) to user that run your web application on web server (Usually IIS if you use MVC < 5)

Comments

1

It seems from your comment that you want to share uploaded files between multiple web project. You can store them in a common folder outside your web project folder.

For example, create a folder in "C:\Temp\" say "SharedFiles".

The manager web application that receives the file from user (through upload) can store the files in this folder. The client web application can refer this location for file while reading.

You may have to give permission to the user (IIS_IUSRS) to access this folder.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.