Astoria is out for VS 2008 Beta 2 (September 2007 CTP)!! YAY!

Ok, so perhaps I'm a little more excited than I should be... but this basically untied my twiddling thumbs for a fairly important project that I'm working on, so I finally get to move forward on it.

One question I do have is this - why is it that we cannot create an IIS-hosted Astoria project? Using the "File -> New Project" approach, it allows me to only create a filesystem-based project that is hosted by the VS 2008 web server - meaning that my co-workers and team-mates cannot test/see my project unless I'm running the VS 2008 debugger. This also leaves the deployment scenario a little weak - can I be sure that IIS is actually going to properly serve up the .svc file when I deploy?

I realize that we're still looking at an incubation technology here, but I think for future CTPs / upcoming betas, we need full-on HTTP support within Visual Studio and clear instructions on how to get IIS to host it... I know from personal experience that getting IIS to host a WCF service (that's what Astoria is, after all) that has custom URL schemes isa colossal pain in the butt, so anything Astoria can do to ease the transition from my desktop to the QA lab to the staging environment to the production servers - the happier I'll be.

[1282 byte] By [KevinHoffman] at [2008-3-7]
# 1

So I found out from reading elsehwere that there is HTTP support via IIS for Astoria... funny part is I can't get an ADO.NET Entity Model to come through properly using that. When I try to add an ADO.NET Entity Model to the ASP.NET website, I get "The path is not of a legal form" , whatever that means Smile

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 2

So I can get around one limitation by creating the Entity Data Model in a separate class library, but, this is what I get when I try and run my Astoria web data service within the integrated VS debugger (keep in mind that this is an HTTP web application, not a filesystem web app):

HTTP Error 404.3 - Not Found

Description: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.

Error Code: 0x80070032

Notification: ExecuteRequestHandler

Module: StaticFileModule

Requested URL: http://localhost:80/nwind/NorthwindService.svc

Physical Path: C:\inetpub\wwwroot\nwind\NorthwindService.svc

Logon User: Anonymous

Logon Method: Anonymous

This is the exact error message I get when I try and host regular RESTful services under IIS without using Astoria. Any ideas on how to fix this?

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 3

What OS are you running this on?

MikeFlasko at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 4

Windows Vista, 32-bit, IIS7.

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 5

Hi Kevin,

Wow, that was fast. We just put the bits out there and you're already trying them (and already found problems Smile)

You're right, the HTTP-based projects don't work well in either the tools or the Astoria CTP. In the first CTP of Astoria we only did WAP projects. In this one we added file-based "web site" projects. As we move forward we'll keep adding scenarios.

Based on this thread I just sent mail to the folks in the team to raise more awareness about this specific project type because it's particularly tricky (you cannot assume that file pointers are file paths as in all the other projects). So we'll definitely follow your advice about enabling this scenario to make it easy to do collaborative development.

As for work-arounds, file-based projects do work, so you could use a share in your web server and point VS to that. Web applications obviously also work but they probably won't help.

Also note that deployment should also "just work". So you can work locally and whenever you reach a stable point where you want to share your work you can just hit "publish" in VS. Would that help?

Pablo Castro

Technical Lead

Microsoft Corporation

http://blogs.msdn.com/pablo

PabloCastro-MSFT at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 6

Issues with file-based projects:

1 - They only work when i'm running the VS debugger

2 - People outside my machine can't see them (they just get a timeout when I'm running the app in the debugger)

3 - As soon as I deploy that project to IIS7 I encounter the same problem as the HTTP-based project (mime type mapping failure).

In other words, I have no route to allow other developers or other off-box applications to see my service. Hosting a data service that nobody else can see doesn't buy me much Smile

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 7

Keep in mind that this problem is not specific to Astoria - perhaps you should involve some of the WCF folks as well. To reproduce this problem - ANYWHERE:

1 - Use Orcas on Vista 32-bit or 64-bit with IIS7

2 - Create a web application

3 - Add a WCF service to it

4 - Make that WCF service attempt to respond in any shape or form to HTTP requests or RESTful URLs

5 - Hit the service at http://server/service.svc

6 - Watch the errors fly.

By default, whatever configuration we've got out of the box on Vista/IIS7 absolutely, positively prevents RESTful WCF services from working at all. What I need is some kind of workaround to the mime-mapping problem.

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 8

Hi Kevin!

I was playing with Astoria on my Vista/IIS7 box and I has same problem with HTTP Error 404.3 - Not Found for .svc files

It was fixed by installing WCF from Programs and Features -> Turn Windows Featues On or Off and ensure all under Microsoft .NET Framework 3.0 is checked

Hope this helps

GalinIliev at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 9

I followed that and installed the other options for Microsoft .NET Framework 3.0 and it didn't change my symptoms.

When I run the service in the debugger, I get:

The service cannot be activated because it requires ASP.NET compatibility. ASP.NET compatibility is not enabled for this application. Either enable ASP.NET compatibility in web.config or set the AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode property to a value other than Required.

When I turn on ASP.NET compatibility through the web.config file as suggested, the service simply hangs when I try and run it.

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 10

well.. this is new to me Sad

I suggest you to run Astoria samples on IIS7.

  1. Open IIS 7 Manager
  2. Add new site - you could want to change default port to something like 83... point the folder to C:\Program Files\Microsoft Codename Astoria\Samples\AjaxNavigator or some other of Astoria samples
  3. Ensure Website application pool is one that has .NET v2 enabled and Managed pipeline set to classic instead of integrated
  4. Optional - I modified connection string in web.config in order to use SQL Authentication. You must have Northwind DB installed... you can download it from here
  5. Navigate to http://localhost:83 and this is it...

This worked to me... Make sure you do not misspelled Connection string as you won't get meaningfull message

Hope this helps

GalinIliev at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 11

When I do this I get the same exact symptoms that I get with the other stuff. I rebuild the Astoria samples, create a new app pool that uses a classic pipeline.

I still get "The path is not a legal form" when attempting to add an EDM to a website project.

I still get the same symptoms whether I'm using the Astoria samples or whether I'm using my own custom stuff.

I've also tested this on a completely clean install of VS 2008 on Vista 32-bit.

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 12

Oh, get this... I published the Astoria service/site to a Windows Server 2003 32-Bit IIS6 box on which I had installed .NET Framework 3.5, ADO.NET EF, and Astoria. Guess what?

Same exact errors.

KevinHoffman at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...
# 13

Hi Kevin,

I just wanted to confirm that I tried both 2003+II6 and Vista+IIS7 in clean boxes (outside of our tests to make sure that it wasn't that our tests were testing the wrong thing) and both scenarios worked (cassini was already working for you so I didn't look into that any further).

In vista you have to enable WCF HTTP activation in the Vista Features thingy, and also run the little app to register WCF with IIS if you didn't do that already. Once you did all that it should work.

Other details that you probably already know about:

-when running in IIS you run under a difference account, you need to make sure that either you're using sql auth or that the IIS account has a sql server login mapped to it.

-the server name needs to be visible to the IIS account. if you're using a registry alias it has to be in LOCAL_MACHINE and not CURRENT_USER or the service won't see the alias mapping.

Since we're discussing the same topic in the other thread I'll close this one for the time being and track the other one only so we have all the information consolidated in a single thread.

http://forums.microsoft.com/msdn/ShowPost.aspx?postid=2170771&isthread=false&siteid=1

Pablo Castro

Technical Lead

Microsoft Corporation

http://blogs.msdn.com/pablo

PabloCastro-MSFT at 2007-10-3 > top of Msdn Tech,Incubation Technologies,Project Codename: Astoria...