1

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?

James Z
  • 12,209
  • 10
  • 24
  • 44
Wajid khan
  • 842
  • 9
  • 18

1 Answers1

1
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

James Z
  • 12,209
  • 10
  • 24
  • 44