Wcf service in same app as the web

15 views
Skip to first unread message

HAXEN

unread,
Jan 13, 2011, 2:29:41 AM1/13/11
to S#arp Architecture
I'm trying to setup a few services in my application using the
Northwind example, but I would like to have the whatever.svc in my
solution.web. Since there is a very limited number of methods being
exposed with services I would like to avoid having to host another web
application.

Is that possible? Can my service use WebSessionStorage instead of
WcfSessionStorage or do I have to use them both?

/HAXEN

Seif Attar

unread,
Jan 13, 2011, 3:53:34 AM1/13/11
to sharp-arc...@googlegroups.com
I haven't tried it myself, but you might be able to do it if you enable aspnet compatability mode (i think that' what it is called). Then httpcontext would be available and websessionstorage should work for the services, theoretically at least :)



--
You received this message because you are subscribed to the Google Groups "S#arp Architecture" group.
To post to this group, send email to sharp-arc...@googlegroups.com.
To unsubscribe from this group, send email to sharp-architect...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sharp-architecture?hl=en.

HAXEN

unread,
Jan 13, 2011, 6:31:36 AM1/13/11
to S#arp Architecture
Yes that was the trick. Thanks!

In solution.Web web.config
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>

And on my concrete service implementation
[AspNetCompatibilityRequirements(RequirementsMode =
AspNetCompatibilityRequirementsMode.Allowed)]
public class TestWcfService : ITestService

/HAXEN


On Jan 13, 9:53 am, "Seif Attar" <i...@seifattar.net> wrote:
> I haven't tried it myself, but you might be able to do it if you enable aspnet compatability mode (i think that' what it is called). Then httpcontext would be available and websessionstorage should work for the services, theoretically at least :)
>
Reply all
Reply to author
Forward
0 new messages