Reputation: 1
I have 2 projects in my visual studio soltution (asp.net mvc) ,1st project url is "http://localhost:63603/Home" ,2nd project url is "http://localhost:53422/Home"
Scenario is like that Image is uploading from 1st project but it should be saved on other project's folder .
Upvotes: 0
Views: 44
Reputation: 708
So You have two websites developed together under common VS solution. You must well understand, that VS solution is only a handy common view of application set You are actually developing. It doesnt affect directly how those two apps will be deployed. You may choose to install those separately under two webservers 100s of kilometers from each other.
Not clear for what reason do You want to have UploaderApp to save image under OtherApp. Really the physical place of files is what matters or e.g. You only want that the uploaded file could appear on pages coming from OtherApp?
In first case (physical place matters) the simplest way to share a common file storage (a folder) between deployed apps. If they are on same machine a local folder is okay. If they are on separate machine You still might be able to setup a network share. After upload UploaderApp must save the file into that folder and OtherApp may read it from there. If they cannot share a common file storage then things may become as complicated as e.g. adding a service to OtherApp where UploaderApp could re-upload the file it just got from browser.
In second case (files should appear on pages coming from OtherApp) the solution might be as simple as placing an appropriate url into page html coming from OtherApp. The url may point to image under UploaderApp and the browser will download it from there. Be warned that some cross-site issues may appear in this case.
Anyway You should clarify a bit what You really want to achieve to get more detailed answer :)
Upvotes: 1