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?

1 Answer 1

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

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

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.