Access folder from cross domain Dedicated Server (Asp.net)

217 views Asked by At

We have two different website which share same database on dedicated server.

For example:

  1. www.student.com
  2. www.Teacher.com

Teacher will upload files on www.Teacher.com/Upload. Student is user of (www.student.com) and he will access files from www.Teacher.com/Upload.

Question:

How to ccess folder of another domain?

1

There are 1 answers

0
sanjeev kumar On
FileUpload Fu1 = up1;

string timek = System.DateTime.Now.Ticks.ToString();
string virtualFolder = "Upload/" + timek;
string physicalFolder = Server.MapPath(virtualFolder);

Fu1.SaveAs(physicalFolder + Fu1.FileName);  

timek = timek + Fu1.FileName;

HiddenField1.Value ="http://www.Teacher.com/Upload/" + timek;

Insert this path (HiddenField1.Value) into database, you can access both websites