When I run my asp.net application in debug it runs fine most of the time but if I switch it to Release mode I get the below error. I am not real sure why anyone have anything I can check into ?
System.Exception: Error getting user roles during authentication ---> System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.
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)
at Kroll.Kbs.Fraud.BusinessLogic.AuthService.Contract.IAuthService.GetAuthUser(String username, AuthResponse& serviceResponse)
at Kroll.Kbs.Fraud.BusinessLogic.AuthService.Contract.AuthServiceProxy.GetAuthUser(String username, AuthResponse& serviceResponse) in c:\dev\fraud\source\FraudBusinessLogic\AuthService.Contract\AuthServiceProxy.cs:line 84
at Kroll.Kbs.Fraud.FraudAdministration.Global.Application_AuthenticateRequest(Object sender, EventArgs e) in c:\dev\fraud\source\FraudAdministration\FraudAdministrationUI\Global.asax.cs:line 71
--- End of inner exception stack trace ---
Related
Starting at about 11 PM CST on 5/29/2017, I began receiving "(400) Bad Request" errors for all my ItemSearch() calls. I am using the C# API and have been doing so successfully for well over a year now with no problems. No code or configuration has changed on my end, and I have been able to reproduce the error both in production and development. My security credentials appear to still be valid according to the IAM Management Console, and I haven't received any communications from Amazon that would indicate that my account has been deactivated or anything of that nature.
This is what is returned for all of my calls:
System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
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)
at MyCode.com.amazonaws.ecs.AWSECommerceServicePortType.ItemSearch(ItemSearchRequest1 request)
Is anyone else experiencing this?
I did check this very old thread, but I don't believe it's relevant given how this sprung up out of nowhere and has been working perfectly for so long.
I'm trying duplicate the sample code found here:
https://www.docusign.com/p/APIGuide/APIGuide.htm#Sending%20Group/Create%20and%20Send.htm
I copied the C# code to build the envelope and only adjusted for my environment.. sample file, email address etc. When I execute this I get the following exception:
A processing error occurred: System.ServiceModel.FaultException: The
request contained at least one invalid parameter. Guid cannot be null.
Server stack trace: 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) at
SampleApp.DSAPIService.DSAPIServiceSoap.CreateAndSendEnvelope(Envelope
Envelope)
Has anyone seen this issue? I've looked over the Envelope, Recipient, Document, and Tab types on the API reference and I don't see any field that is a guid.
I found the issue. It looks like I missed setting up the Envelope.AccountId field.
A normal HTTP WCF Service is throwing this error when trying to connect to a legacy NetTCP binding. I want to be able to flow the transaction to the service and have that enabled. I am not using a duplex contract so why is it even mentioning a 'callback' contract in the error message?
Please just say if you need to see some more code, but I'll take any suggestions right now!
** the error is thrown when it's doing a ChannelFactory.CreateChannel()
The operation 'XService' on callback contract 'IXService' is configured with TransactionAutoComplete set to false. TransactionAutoComplete set to false cannot be used with operations on callback contracts.
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.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)
at IXService.Add(Int32 id, Int32 createdById, String note, Int32 productTypeId, Int32 noteTypeId)
at XService.Add(Int32 id, Int32 createdById, String note, Int32 productTypeId, Int32 noteTypeId)
I had the same problem.
I was starting a service programmaticaly all along with the configuration (base address, binding, endpoint,...).
I ended up exporting all configuration to the config file and it worked.
We have a WCF Service which will Upload and Download Documents to and from FileShare respectively.
The client application will pass a FileShareLocation and FileName inthe request.
But we are getting some exception, and not able to get the response.
FileSharePath sample : \\SERVERIP\SHAREDFOLDER
Note: The service is working fine when I don't use Network File Share.
'. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
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)
at wcfServiceTest.wcfService.ICommonService.UploadDocument(UploadDocumentRequest request)
at wcfServiceTest.wcfService.CommonServiceClient.wcfServiceTest.wcfService.ICommonService.UploadDocument(UploadDocumentRequest request) in D:\Test\CMS\wcfServiceTest\wcfServiceTest\Service References\wcfService\Reference.cs:line 2309
at wcfServiceTest.wcfService.CommonServiceClient.UploadDocument(RequestHeader UploadDocumentReqHdr, Byte[]& UploadDocumentContent) in D:\Test\CMS\wcfServiceTest\wcfServiceTest\Service References\wcfService\Reference.cs:line 2316
at wcfServiceTest.frmMain.DocumentUpload_Click(Object sender, EventArgs e) in D:\Test\CMS\wcfServiceTest\wcfServiceTest\frmMain.cs:line 105
Resolved by myself.
Create a new Application pool in IIS
Change Identity of AppPool to the User who has access to FileShare
Change the WCF Service Application Pool to the new Application Pool
I have a program with three WCF services and when I run them locally (i.e: Server and Clients are all on localhost) everything works. However when I test them across a network I get a TimoutException on two services but not the other. I've disabled the firewalls on all the machines involved in the test. I can both ping the server and access the wsdl "You have created a service" webpage from the client
The service that works uses a BasicHttpBinding with streaming and the two which don't work use WSDualHttpBinding. The Services that use WSDualHttpBinding both have CallbackContracts. I apologise for the vagueness of this question but I'm not really sure what code to include or where to even start looking for the solution to this.
Non-working bindings:
public static Binding CreateHTTPBinding()
{
var binding = new WSDualHttpBinding();
binding.MessageEncoding = WSMessageEncoding.Mtom;
binding.MaxBufferPoolSize = 2147483647;
binding.MaxReceivedMessageSize = 2147483647;
binding.Security.Mode = WSDualHttpSecurityMode.None;
return binding;
}
Exception Stack Trace:
Unhandled Exception: System.TimeoutException: The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.
Server stack trace:
at System.ServiceModel.Channels.ReliableRequestor.ThrowTimeoutException()
at System.ServiceModel.Channels.ReliableRequestor.Request(TimeSpan timeout)
at System.ServiceModel.Channels.ClientReliableSession.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ClientReliableDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
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)
at IDemeService.Register()
at DemeServiceClient.Register()
at DemeClient.Client.Start()
at DemeClient.Program.Main(String[] args)
You may enable System.Net tracing on both sides and read about the Timeout exception.
http://support.microsoft.com/kb/947285
You are using a DualHttpBinding. What this means is that you are setting up a duplex channel, where server can send messages (not response message, but a incoming message) to client. But you haven't setup a clientBaseAddress where client will be listening for incoming messages from server. This is what is causing this issue. from http://msdn.microsoft.com/en-us/library/system.servicemodel.wsdualhttpbinding.aspx:
This binding requires that the client has a public URI that provides a callback endpoint for the service. This is provided by the ClientBaseAddress. A dual binding exposes the IP address of the client to the service. The client should use security to ensure that it only connects to services it trusts.