Monday, February 20, 2012

Visual Studio AsyncCTP Install Issues

This is a quick post for anyone attempting to install and use the Visual Studio AsyncCTP library.

1) Here is the link: Visual Studio AsyncCTP from Microsoft
2) It REQUIRES having visual studio SP1 installed.
3) Installation should run fairly smooth, but it does take awhile.  At the end of installation, after you click "Finish" it should open up a web page AND there should be an AsyncCTP folder in your My Documents folder.

4) For those of you that didn't have number 3 work out as stated, read on, for everyone else, have fun :)
5) First you will need to uninstall Visual Studio SP1, and you need to fully uninstall, not just try to repair.
     a)  This process is done through the Add/Remove programs section under Control Panel, just find Service Pack 1 for Visual Studio, and click Uninstall.
     b)  Again, make sure you Uninstall it and NOT try to repair it
     c)  You will need to make sure you either have your Visual Studio iso available to mount to a virtual drive or your visual studio disc in your dvd drive.  It will require this media at some point in the installation and you have to use it.  Cancelling out will simply fail the revert process and you will be stuck where you were in item #3.
6) Once the revert process is complete, reinstall Visual Studio SP1, only.  Do not install any add-ons or windows updates with it, just SP1 clean.
7) Once that is complete, re-install AsyncCTP, everything should work out correctly as detailed in Item #3.
8) There are no shortcuts to this, it is a long and painfully slow process...

Friday, January 27, 2012

Silverlight, WCF, and the clientaccesspolicy...

This is just a quick post because I found it painfully difficult to find the answer to this, without jumping through hoops.

I have 2 solutions in seperate visual studio instances.  One solution is the WCF service that is running.  The other solution is my Silverlight application, which is also running.  When attempting to make a service call, I get a wonderful error about security policies and cross domain issues.  There is a simple fix.

1) Create a notepad file on your desktop.
2) Place this into that file:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

3) Save the file with this filename:  "clientaccesspolicy.xml" (minus the quotes)
4) Copy the file to your project folder that is running the service.  So for example, in my wcf solution, i Have a project called IISHost that is my startup project to run my services on the dev server while I am developing.  Simply drop the "clientaccesspolicy.xml" into that folder (that folder will contain the web.config for that project also).
5) Run your service project again and you should be good to go...
6) Now to figure out how to do "cross domain" step in debugging from the client project...