I created WebApplication in local machine. It works good. But when I deploy this project to IIS i have a problem.
I understand that doing bad, but in ControllerInstaller I write this:
container.Register(
Classes
.FromAssembly(Assembly
.LoadFrom(@"D:\Shevtsov\HarbaHabr\Habra.Web\bin\Habra.Web.dll"))
.BasedOn<IController>()
.LifestyleTransient());
It is clear that this path on the server it will not work…
Please tell me, how path I must to write here?
P.S. ControllerInstaller in assembly Habra.ServiceLocation.
You could use the MapPath method which returns the absolute path to a file on the server given a relative path starting from the root of the web application denoted by
~/: