CodeSmith Community
Your Code. Your Way. Faster!

WCF integration with .netTiers

Latest post 05-20-2008 11:06 PM by SuperJeffe. 26 replies.
  • 02-08-2007 11:07 AM In reply to

    Re: WCF integration with .netTiers

    To answer my own question... I grabbed the 473 revision from SVN instead of HEAD and it worked.

    Thanks for your contribution Lex!

    • Post Points: 5
  • 02-08-2007 6:37 PM In reply to

    Re: WCF integration with .netTiers

    I am finally able to generate and compile without much issue - except when I run the console app against the WCF service I get the following error:

    System.ServiceModel.CommunicationException: An error occurred while receiving th
    e HTTP response to http://localhost/PM4Service/EstimateService.svc. This could b
    e due to the service endpoint binding not using the HTTP protocol. This could al
    so be due to an HTTP request context being aborted by the server (possibly due t
    o the service shutting down). See server logs for more details. ---> System.Net.
    WebException: The underlying connection was closed: An unexpected error occurred
     on a receive. ---> System.IO.IOException: Unable to read data from the transpor
    t connection: An existing connection was forcibly closed by the remote host. ---
    > System.Net.Sockets.SocketException: An existing connection was forcibly closed
     by the remote host
       at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size,
     SocketFlags socketFlags)
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 s
    ize)
       --- End of inner exception stack trace ---
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 s
    ize)
       at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetriev
    edStream, Boolean probeRead)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpCha
    nnelRequest.WaitForReply(TimeSpan timeout)
       --- End of inner exception stack trace ---

    This happens on my Vista Ultimate, and Windows 2003 R2 Server (the only two tested with.). I can browse to the svc location, and also get the wsdl using the browser. The code is not alterred in any way from what us generated using the 473 svn code base.

    So any ideas - I've checked that it hits my SQL Server (had to grant a few permissions there.), and alterred the Vista web server to the Classic ASP.NET Pool.

    Mal. Hmm 

    Filed under:
    • Post Points: 35
  • 02-09-2007 2:36 AM In reply to

    • Lex
    • Top 50 Contributor
    • Joined on 09-28-2006
    • Posts 72
    • Points 1,945

    Re: WCF integration with .netTiers

    Maybe try to uncheck "HTTP Keep Alive Enabled" in the IIS config.

    • Post Points: 35
  • 02-11-2007 10:42 AM In reply to

    • Lusid
    • Not Ranked
    • Joined on 02-04-2007
    • Posts 8
    • Points 130

    Re: WCF integration with .netTiers

    Am I just getting my hopes up thinking that this type of WCF support is going to eventually be patched into the SVN repository? I mean, it's really pretty silly to include the DataContract and DataMember attribute support on the entities without the ServiceContract and OperationContract attributes on the service layer as well, and due to the lack of security support in the WebServices and WebServicesClient layer, I can't wait to see this stuff running with WCF.

    At the very least, forget trying to make it so it works out of the box... just add the correct attributes and interfaces to the entities and services layer, and I'll build my app to connect up with WCF as needed. After all, the reason I don't use the WebServices layer is because there's very little room to cram in any type of security.

    Sorry, just ranting because I don't know enough about writing templates to do it myself. Stick out tongue

    • Post Points: 5
  • 03-19-2007 1:31 PM In reply to

    • Alex
    • Top 10 Contributor
    • Joined on 07-26-2005
    • Australia, Canberra
    • Posts 526
    • Points 10,645

    Re: WCF integration with .netTiers

    Hi, Lex!

    Would be great to see this wonderful patch updated with latest .NetTiers...

    Guys, why this is not integrated into latest .NetTiers yet?

    Thanks for the most cool templates!


    Best regards,
    Alex.
    • Post Points: 35
  • 03-23-2007 6:45 AM In reply to

    • Lex
    • Top 50 Contributor
    • Joined on 09-28-2006
    • Posts 72
    • Points 1,945

    Re: WCF integration with .netTiers

    Hi all,

    We are still working on the WCF integration and we will release a full patch in April. We will integrate a STS solution for authentication, and probably an authorization solution as well, for row-based security.

    WCF implies also that some native features of NetTiers will not be available, because WCF v1 has several limitations. Example : the "Delete()" on a TList cannot work. So several workarounds will be shipped as well.

    The patch will also comprise Children Collections and autopmatic Junctions management.

    Please be patient ;-)

    • Post Points: 65
  • 03-23-2007 11:31 PM In reply to

    • Alex
    • Top 10 Contributor
    • Joined on 07-26-2005
    • Australia, Canberra
    • Posts 526
    • Points 10,645

    Re: WCF integration with .netTiers

    Hey, Lex, that's great!

    Gald to hear about that.

    I've got one odd problem with WCF:

    _____________________
    Q When hosting ASMX classes in my own app, what happens to HttpContext.Current? What about SoapExtensions?


    A Unfortunately, the ASMX design is tightly coupled with ASP.NET. For example, when Visual Studio® creates new ASMX classes, it derives them from System.Web.Services.WebService by default. This exposes the various System.Web.HttpContext properties through properties on the new ASMX class, thereby encouraging their use throughout WebMethods. Some developers are also accustomed to explicitly using the HTTP context via HttpContext.Current.

    When you host an ASMX class using SoapReceivers in WSE 3.0, this type of code no longer works. In this case, your code is executing outside of IIS and the ASP.NET HTTP pipeline. HttpContext.Current will always be null, so this may require you to modify your existing WebMethod logic. In general, you'll want to avoid depending on anything in the HTTP pipeline throughout your WebMethod code if you plan to reuse that type across hosting environments outside of ASP.NET.

    Also, when using SoapReceivers as a host, you can no longer depend on HttpModules or SoapExtensions to do the work for you. These intermediaries are no longer in play since you're now executing outside of the ASMX handler.
    __________________

    So, the following code in DataRepository.cs does not work anymore:

    /// <summary>
    /// Gets a reference to the application configuration object.
    /// </summary>
    public static Configuration Configuration
    {
    get
    {
    if ( _config == null )
    {
    // load specific config file
    if ( HttpContext.Current != null )
    {
    _config = WebConfigurationManager.OpenWebConfiguration("~");
    }
    else
    {
    String configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.Replace(".config", "").Replace(".temp", "");

    // check for design mode
    if ( configFile.ToLower().Contains("devenv.exe") )
    {
    _config = GetDesignTimeConfig();
    }
    else
    {
    _config = ConfigurationManager.OpenExeConfiguration(configFile);
    }
    }
    }

    return _config;
    }
    }

    ______________

    Any ideas how to fix this?


    Best regards,
    Alex.
    • Post Points: 35
  • 04-12-2007 9:30 AM In reply to

    • Sarynn
    • Top 500 Contributor
    • Joined on 02-05-2007
    • Posts 12
    • Points 360

    Re: WCF integration with .netTiers

    What is the progress on full integration with WCF within .netTiers for April release?  Are you on target?  I'm heavily considering building a multi-tiered application using WCF and .netTiers.
    • Post Points: 35
  • 09-13-2007 3:22 AM In reply to

    • Naughty
    • Not Ranked
    • Joined on 09-13-2007
    • Posts 1
    • Points 5

    Re: WCF integration with .netTiers

    Hi all,

    I'd also like to know what's the status on that topic.
    It seems it would save us a great deal of weightlifting in the next few months.

    We're currently developing on WCF, so I'd be willing to contribute also if this'd be a supported feature in the official NetTiers.

     N

    • Post Points: 5
  • 05-13-2008 9:19 PM In reply to

    • kuhf
    • Not Ranked
    • Joined on 05-14-2008
    • Posts 1
    • Points 35

    Re: WCF integration with .netTiers

    The lasted nettiers2.2 didn't contained WCF.Why?Sad

    • Post Points: 35
  • 05-20-2008 6:03 PM In reply to

    • gromer
    • Not Ranked
    • Joined on 05-19-2008
    • Posts 2
    • Points 70

    Re: WCF integration with .netTiers

     I would also like to see the status of this. I have the latest and don't seethe WCF stuff needed.

    • Post Points: 35
  • 05-20-2008 11:06 PM In reply to

    • SuperJeffe
    • Top 25 Contributor
    • Joined on 05-05-2006
    • Tulsa, Ok
    • Posts 408
    • Points 10,290

    Re: WCF integration with .netTiers

    We are working behind the scenes on an initial list of the next version of Nettiers.  Wcf is on an initial list.  Give the new team some time to get organized and then you will see a list.  But, the next version if I had to guess is not anytime soon.  It will be a pretty good sized undertaking.

    jeff

    ----------------------------------------------------------------------
     Member of the .NetTiers team | Visit http://www.nettiers.com
    ----------------------------------------------------------------------

    • Post Points: 5
Page 2 of 2 (27 items) < Previous 1 2 | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems