locked
Deployment time to our DEV server RRS feed

  • Question

  • So I am moving all my services and Silverlight App to our dev server and of course I expected some deployment issues, so I decided step 1 would be just move my entire ".Web" folder onto IIS and map a virtual directory to that.  I have a service account created and it has access to my database, this is all confirmed. But I am getting the old Service Un-available and that is all Error from IIS.

    The correct version of .Net is assigned to the application, and all versions of the framework are installed.

    .svc is mapped to IIS, I checked that as this is our first hosted WCF Service in the organization.

    So Now I know I need to configure my endpoints for the WCF service, so I decided to go and look into the Web.config and now I am totally confused, I don't have any endpoints in there for my ADO.Net Data Service, so I am sitting wondering how it runs on my DEV pc ????  There is no endpoint information.

    I guess the other question is what is my best method of debugging this to find out what is failing ?

    thanks for any help
    Michael
    Friday, March 27, 2009 5:36 AM

Answers

  • Wow... sorry to take up valuable bandwidth with questions and answers to myself, but maybe somebody somewhere sometime will find this information valuable :)

    My problems were as follows

    • First one stupid simple one this was going to a DEV server and therefore the OP's guys decided not to add my service account to IIS_WPG :(
    • 2nd, this server also has sharepoint installed (it is a DEV server remember! :)) so the default port is not 80 anymore but 8080, CHANGE the URL
    • 3rd, related on from the 2nd one, Kerberos/NTLM, confusion and debarcle, but luckily one of out OP's guys was hanging around with nothing else to do on a Friday night, oh wait and me! Apparently Kerberos requires all sorts of nightmare configuration when not running on the default port, so he went in and hacked IIS to not use Kerberos, stopped us getting the credentials dialog box.
    • Then got a custom error, so turned Custom Errors to Off
    • Then had to turn off Annonymous access because WCF services only support 1 type of endpoint when hosted in IIS, correct ?
    • Then had to install the .xap MIME Type against the application out first silverlight application! As well.
    • So now I am getting some application errors, so.... at least I am at that point.

    thanks for listening!

    Friday, March 27, 2009 7:02 AM

All replies

  • doh, ok, sorry looks like there might be an issue with the service account, I used my account and when I hit the service I get the list of all of the entities returned ok, so I need to sort that out, however, if I try and put in an Entity name after the service address, I just get the standard IIS unavailable error, not the message in my previous post. So, one step fruther, how come I don't need an endpoint for my Data Service ? Or is this stored somewhere else I just don't know of, because I have never deployed to a server yet ?

    sorry the error is the following "This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying."
    Friday, March 27, 2009 5:56 AM
  • Wow... sorry to take up valuable bandwidth with questions and answers to myself, but maybe somebody somewhere sometime will find this information valuable :)

    My problems were as follows

    • First one stupid simple one this was going to a DEV server and therefore the OP's guys decided not to add my service account to IIS_WPG :(
    • 2nd, this server also has sharepoint installed (it is a DEV server remember! :)) so the default port is not 80 anymore but 8080, CHANGE the URL
    • 3rd, related on from the 2nd one, Kerberos/NTLM, confusion and debarcle, but luckily one of out OP's guys was hanging around with nothing else to do on a Friday night, oh wait and me! Apparently Kerberos requires all sorts of nightmare configuration when not running on the default port, so he went in and hacked IIS to not use Kerberos, stopped us getting the credentials dialog box.
    • Then got a custom error, so turned Custom Errors to Off
    • Then had to turn off Annonymous access because WCF services only support 1 type of endpoint when hosted in IIS, correct ?
    • Then had to install the .xap MIME Type against the application out first silverlight application! As well.
    • So now I am getting some application errors, so.... at least I am at that point.

    thanks for listening!

    Friday, March 27, 2009 7:02 AM
  • Wow.  Lots of problems.  Glad you sorted it in the end.

    One thing, regarding the "only 1 end-point" problem....
    You can easily get around this by using a CustomDataServiceHostFactory something like this...

    Imports System.Data.Services 
    Imports System.ServiceModel 
     
    Public Class CustomDataServiceHostFactory 
        Inherits DataServiceHostFactory 
     
        Protected Overloads Overrides Function CreateServiceHost(ByVal serviceType As Type, ByVal baseAddresses As Uri()) As ServiceHost 
     
            Return New DataServiceHost(serviceType, New Uri() {baseAddresses(0)}) 
     
        End Function 
    End Class 
     

    ...Just make sure your create function returns a single DataServiceHost rather than all of them..


    ...and then in your .svc markup.....

    <%@ ServiceHost Language="VB" Factory="MyService.CustomDataServiceHostFactory" Service="MyService.MyService" %> 



    ....and in your web.config....

        <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
          <baseAddressPrefixFilters> 
            <add prefix="http://MyServiceEndPoint:80/MyVirtualDir" /> 
          </baseAddressPrefixFilters> 
        </serviceHostingEnvironment> 
     


    Of course, you only have to do any of this when hosting in IIS.  If you just use the Visual Studio built-in webserver, it all works without you having to configure anything......

    Dave


    Friday, March 27, 2009 10:40 AM
  • Cool thanks Dave, will keep that in mind..... someone did read my ramblings on a Friday night :)

    Saturday, March 28, 2009 9:28 AM