Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7967823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:58:56+00:00 2026-06-04T06:58:56+00:00

I created WebApplication in local machine. It works good. But when I deploy this

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:58:57+00:00Added an answer on June 4, 2026 at 6:58 am

    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 ~/:

    container
        .Register(       
            Classes
                .FromAssembly(
                    Assembly
                        .LoadFrom(HostingEnvironment.MapPath("~/bin/Habra.Web.dll"))
                )
                .BasedOn<IController>()
                .LifestyleTransient()
        );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created one GWT webapplication project.Inthat i want to create servlet program,but in that
I have created an ASP.NET application on my local machine. In order to test
I created a set up project and installed a web application on my local
I have created a web application with a Silverlight project embedded in it, using
i have created an mvc3 web application that uses forms based authentication. one part
I have a web application that creates directories. The application works fine when creating
I created a RoleService in my silverlight project and through that got hold of
We have two applications running on single machine,one of which is web application that
I have web application that have to access local resources, files/folders, to be able
I have a web application that uses a number of WCF Services. I deploy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.