-
Dec 22nd, 2016, 11:40 AM
#1
Thread Starter
Fanatic Member
[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
-
Dec 22nd, 2016, 11:48 AM
#2
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.
-
Dec 22nd, 2016, 11:58 AM
#3
Thread Starter
Fanatic Member
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)
-
Dec 23rd, 2016, 08:21 PM
#4
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.
-
Dec 24th, 2016, 12:10 AM
#5
Thread Starter
Fanatic Member
Re: Problem in WCF config for Windows Server
Originally Posted by PlausiblyDamp
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.
-
Dec 29th, 2016, 05:54 PM
#6
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.
-
Dec 30th, 2016, 12:04 PM
#7
Thread Starter
Fanatic Member
Re: Problem in WCF config for Windows Server
Originally Posted by PlausiblyDamp
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|