Initial Setup

Developer
Sep 9, 2008 at 2:35 PM
Hi - great project - AtomPub and WCF are both high on my list of things to do and I was excited to see a working implementation.

I took a quick look at an earlier release but waited until 0.5 to try running some code and confess I'm stuck. I modified both the Service.config to:

<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:svc="http://blogsvc.net/2008/Service" xmlns:file="http://blogsvc.net/2008/File" svc:domain="localhost" xml:base="http://localhost/blogsvc/">

and the Web.config

<serviceHostingEnvironment>
            <baseAddressPrefixFilters>
        <!-- <add prefix="http://blogsvc.net" /> -->
        <add prefix="http://localhost/blogsvc/" />
      </baseAddressPrefixFilters>
 </serviceHostingEnvironment>

However when I try to run the app - I get the following error: The virtual path '/blogsvcDefault.aspx' maps to another application, which is not allowed.

Confess even the first time around I wasn't sure why the service base and domain were set to localhost, and not localhost+app or virtual directory?

Am I missing something here?

Lastly - I'm using Visual Studio 2008 Pro and don't have a reference to the Microsoft.VisualStudio.TestTools.WebTesting namespace? Is these a team suite only feature?

Any tips or suggestions greatly appreciated......
Coordinator
Sep 9, 2008 at 8:37 PM
Hi Abouch, you dove right into an unsupported area.  BlogSvc does not yet support installation to a virtual directory underneath the root.  This is something we do plan on supporting in future releases. If you'd like to join the team and build this in, let me know.  BTW, on my local dev box I use multiple bindings in IIS7 by adding names to the hosts file.$0$0$0$0Yes, I believe that assembly may only be available with Tester or Suite editions.  I'll convert it to code and remove the dependency.  Thanks for pointing that out.$0$0$0$0
Developer
Sep 10, 2008 at 8:03 AM
Ah - ok - thanks for the reply - will follow suit and create another named binding for a root application.

Would love to join the team if  I can find the time (always the same right). Full time studies start in Oct :-( - but we'll see. Will try to get up to speed with the codebase first.

Thanks again...

Best,

Tony
Developer
Sep 10, 2008 at 8:48 AM
Working now... :-)

Just in case anyone else want's to give it try... here are the steps I took to fire up BlogSvc.Net on a Vista/IIS7 box.

[i) - Checkout BlogSvc.Net from Codeplex into a project directory. If you're using the command line CPC client use the following command:
   cpc checkout blogservice:/main "D:\Projects\BlogSvc.Net\Solutions\Main\" (or where ever you want to put it)]

1) Start the IIS7 snap-in - and under Sites - create a new site (NOT an application under Default Web Site - a completely new site). I called the site name: BlogSvc and then set the physical path to D:\Projects\BlogSvc.Net\Solutions\Main\Source\Web".  Leave the Binding information as it is - http; IP: all unassignd, port:80 - but enter a host name. I chose "blogsvc" for the host name.

2) Go to your C:\Windows\System32\drivers\etc directory and edit the hosts file (or create one if it isn't there - just a plain text file with no extension - hosts).
Edit the hosts file and add the host entry:

192.168.10.3    blogsvc

(using whatever your local IP address is).

3) BEFORE opening the BlogSvc.Net solution - edit the Web.csproj file - near the  bottom of the file - change the  <IISUrl>http://localhost</IISUrl> element to           <IISUrl>http://blogsvc</IISUrl> (or whatever you chose as your host name for the new site in IIS and the hosts file).

4) Open the solution - the solution should load fine - including the Web project. If the Web project does not load - there's something wrong with the new web site setting, hosts file, or the web.csproj file.

5)  If you're using Visual Studio 2008 Professional - comment out the Ape.cs classe in the Test project (for now)

6) The Url for the project on your local machine should now be http://blogsvc

7) Update the Service.Config file to: <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:svc="http://blogsvc.net/2008/Service" xmlns:file="http://blogsvc.net/2008/File"
                 svc:domain="blogsvc" xml:base="http://blogsvc/">

8) Update the Web.config to: <serviceHostingEnvironment>
            <baseAddressPrefixFilters>
        <!-- <add prefix="http://blogsvc.net" /> -->
        <add prefix="http://blogsvc" />
      </baseAddressPrefixFilters>
        </serviceHostingEnvironment>

9) Build and run - the url for the project should now be http://blogsvc

Enjoy... :-)

Coordinator
Sep 11, 2008 at 4:04 AM
nice post, I blogged about it at http://blogsvc.net/blog/2008/09/10/SetupDevEnv.xhtml