I have a solution with two projects in it. A portable areas project, and a web site that references the portable areas project, and Both reference MvcContrib.

The problem I am have is with the embedded resources, they are giving me a 404 error when I try to get to them. It seems like it's trying to access a physical path not the dll. The partial view works fine.

The file I'm trying to access looks like this inside my visual studio solution explorer

AdHocReporting/Areas/AdHocReportBuilder/Content/adhoc.css (the build action is embedded)

**Here is the routing for the portable area:**

```
using System.Web.Mvc;
using MvcContrib.PortableAreas;

namespace AdHocReporting.Areas.AdHocReportBuilder
{
    public class AdHocReportBuilderAreaRegistration : PortableAreaRegistration
    {
        public override string AreaName
        {
            get { return "AdHocReportBuilder"; }
        }

        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            RegisterRoutes(context);
            RegisterAreaEmbeddedResources();

        }
        private void RegisterRoutes(AreaRegistrationContext context)
        {
            context.MapRoute(
              AreaName + "_content",
              base.AreaRoutePrefix + "/Content/{resourceName}",
              new { controller = "EmbeddedResource", action = "Index", resourcePath = "Content" },
              new[] { "MvcContrib.PortableAreas" }
          );

            context.MapRoute(
                AreaName + "_default",
                base.AreaRoutePrefix + "/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}

```

**Here is the Web sites Global.aspx that has the reference to the portable area**

```
namespace AdHocReportingSite
{
    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());
        }

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

        }
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            PortableAreaRegistration.RegisterEmbeddedViewEngine();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }
    }
}

```

**here is an image of what my solution explore looks like:**

![Solution Explorer](https://i.stack.imgur.com/6P0TK.png)
['https://Stackoverflow.com/questions/14695580', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/937294/']
```
Callback from service to activity to update UI.
ResultReceiver receiver = new ResultReceiver(new Handler()) {
    protected void onReceiveResult(int resultCode, Bundle resultData) {
        //process results or update UI
    }
}

Intent instructionServiceIntent = new Intent(context, InstructionService.class);
instructionServiceIntent.putExtra("receiver", receiver);
context.startService(instructionServiceIntent);

```
My solution might not be the cleanest but it should work with no problems.
The logic is simply to create a static variable to store your data on the `Service` and update your view each second on your `Activity`.

Let's say that you have a `String` on your `Service` that you want to send it to a `TextView` on your `Activity`. It should look like this

Your Service: 

```
public class TestService extends Service {
    public static String myString = "";
    // Do some stuff with myString

```

Your Activty:

```
public class TestActivity extends Activity {
    TextView tv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        tv = new TextView(this);
        setContentView(tv);
        update();
        Thread t = new Thread() {
            @Override
            public void run() {
                try {
                    while (!isInterrupted()) {
                        Thread.sleep(1000);
                        runOnUiThread(new Runnable() {
                            @Override
                            public void run() {
                                update();
                            }
                        });
                    }
                } catch (InterruptedException ignored) {}
            }
        };
        t.start();
        startService(new Intent(this, TestService.class));
    }
    private void update() {
        // update your interface here
        tv.setText(TestService.myString);
    }
}

```