I have a solution with 4 projects inside. In my controller I need to open an HTML that is inside another project, but I can not open the file folder.
Below is the following with my structure:
TheclassfileistheUtils.cscontrolleriswithin1-Services/JWT/ControllersItriedtoopenthefileusingthefollowingcode...
CrieiumaclassenoprojetoondeestámeuarquivoHTML.publicstaticclassUtilDirectory{publicstaticstringGetDirectory(){returnDirectory.GetCurrentDirectory();}}
InthecontrollerwhereImaketheaccessclassinstanceasfollows:
vardirectory=UtilDirectory.GetDirectory();StreamReaderreader=newStreamReader(directory+@"/ApiUtils/HtmlEmail/CorpoEmailBoletoDimensao.html");
string mensagem = reader.ReadToEnd();
reader.Close();
But when I do this by doing this I end up getting the folder of my project that is the controller and not the Html itself.
Can you help me out?