Answer the question
In order to leave comments, you need to log in
How to set the path to a project in ASP.NET?
Good day!
There is a project on ASP.NET MVC. At the output, with libraries (in bin\Debug (Release)) there is a folder. When the web application is running, files should be read from there (not only from under the studio, but already on the deployed application)
In a normal application, I would simply set a relative path and use this folder, but in this case, the relative path points to the C:\Program folder Files (x86)\IIS Express
I also tried this:
In this case, I get the path to the cache folder (ASP.NET Temporary files)
How can I read files from my folder? String path = typeof(MyType).Assembly.Location
Answer the question
In order to leave comments, you need to log in
var path = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "bin");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question