Results 1 to 7 of 7

Thread: [RESOLVED] Problem in WCF config for Windows Server

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Resolved [RESOLVED] Problem in WCF config for Windows Server

    Hello Everyone,

    This is a really important post and I would be grateful if I someone can help me.

    A developer had developed a service for me which runs in Windows Server. It communicates with sql server database and passes the data to client application. The client application run on windows and communicates with server database using that service. The person had developed two programs coded in C# (.net). One was service which is configured and installed in server and other is a dll that winforms applications uses to get data and perform other functions.

    Currently the who setup is working fine. A windows server (2008 R2) is running with SQL Server 2012 (Express). It also has IIS and the service is configured. This is what is present/configured:

    - Inetpub folder has a folder where service files are present. It has bin folder with dll file and root folder has wcf service file (svc) and web.config file.
    - IIS has the service configured in application pool and sites
    - SQL Server is running and SQL Server Management Studio is also installed

    The server configuration etc was done by the developer few years ago. Now I wish to shift to another server. So I am trying to configure this in another Windows server (this time Windows Server 2016) and am using Sql Server 2016.

    Inspite of me trying to configure the server the same way it is doing in older server (which is running ok) the program is unable to communicate with the new server. I have checked the IIS config, have imported the database in the new server, create users and matched setting. The web config file was tweaked to match new server name. The firewall has port opened. But still it is not working.

    I wonder what I am missing or have not yet configured. For e.g. the program uses a port e.g. 1670 and firewall has this port opened but I have not registered this port in new server for WCF. Is this the issue or what? The IIS setting is all done as they match with old server IIS settings.

    Please help me in anyway you can. Even when I am trying to run the program locally (on server) to test it, it gives error (network error). The old server (orig) however is working fine.

    Thank you.

    GR

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Problem in WCF config for Windows Server

    One thing to check is the Application Pool identity, are both servers configured to use the same identity?

    I can't remember the defaults but it is possible that the user account the pool is configured to run under may not have permissions to network resources, in that case you might need to create a specific user account for the application pool.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Re: Problem in WCF config for Windows Server

    The application pool identity is same in another server as well. When configuring the IIS I ensured that same names and parameters are used. The program uses a port which I have not registered as WCF using any shell command in new server. Could that be a reason. Running the program in server itself is not doing the work also. One error I got was:

    System.ServiceModel.FaultException was caught
    HResult=-2146233087
    Message=The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
    Source=mscorlib
    StackTrace:
    Server stack trace:
    at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
    at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

  4. #4
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Problem in WCF config for Windows Server

    Did you try either of the suggestions in the error message
    For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
    The full error message or other diagnostic logs might contain more information regarding the underlying problem.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Question Re: Problem in WCF config for Windows Server

    Quote Originally Posted by PlausiblyDamp View Post
    Did you try either of the suggestions in the error message

    The full error message or other diagnostic logs might contain more information regarding the underlying problem.
    I did make changes in config file. Now the program gives error "Object reference not set to an instance of an object". I mean when loading from old server its ok but in new one's case this is error. I am stuck now.

  6. #6
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Problem in WCF config for Windows Server

    Does the error give any more detail than just "Object reference not set to an instance of an object"? Does the error indicate a particular source file or line number? Without knowing exactly where the error is occurring it is very difficult to diagnose what the potential problem might be.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Resolved Re: Problem in WCF config for Windows Server

    Quote Originally Posted by PlausiblyDamp View Post
    Does the error give any more detail than just "Object reference not set to an instance of an object"? Does the error indicate a particular source file or line number? Without knowing exactly where the error is occurring it is very difficult to diagnose what the potential problem might be.
    The problem was solved after I enabled mixed mode authentication in SQL Server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width