I am getting this issue only on my PC. I am using IIS Express 7.5 to host WCF services on my Local Port. I tried in different PC's its working good.
Error:
[CrossDomainError] Arguments:
https//localhost:44300/ClientSyncService.svc Debugging resource strings are unavailable. Often the key and arguments provide
sufficient information to diagnose the problem. See
http//go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60831.0&File=System.ServiceModel.dll&Key=CrossDomainError
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult
result) at
System.ServiceModel.Channels.ServiceChannel.EndCall(String action,
Object[] outs, IAsyncResult result) at
System.ServiceModel.ClientBase1.ChannelBase1.EndInvoke(String
methodName, Object[] args, IAsyncResult result).
I have clientaccesspolicy.xml at the root of https://localhost:44300/clientaccesspolicy.xml
I have no idea whats wrong with my PC.
Any Help is Appreciated
do you access to your service in browser?
may be following this link useful for your problem.
this link so is useful for this problem
Related
I was developing a project with a WCF REST and TCP(inter-role) endpoint on Windows 7. I just upgraded to Windows 8 and now I have serious problems with it.
First of all, when I deploy my project to azure I get these warnings:
Windows Azure Tools: Warning: Remapping private port 80 to 81 in role 'OfisimCRM.WebClient' to avoid conflict during emulation.
Windows Azure Tools: Warning: Remapping private port 443 to 446 in role 'OfisimCRM.WebClient' to avoid conflict during emulation.
Skype is disabled and it is not the issue.
this is not so important but the important thing is I'm getting more serious errors from my interrole communication requests although I disabled firewall completely. Here it is:
Could not connect to net.tcp://127.255.0.0:22000/NotifyService. The connection attempt lasted for a time span of 00:00:01.1820716. TCP error code 10061: No connection could be made because the target machine actively refused it 127.255.0.0:22000. -
Server stack trace:
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.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)
TCP client code:
public static LicenseItem CheckLicense(int userID)
{
// This instance does not exist in memory cache. Check if other servers in the same web role know anything about this instance.
var webRoles = RoleEnvironment.Roles["OfisimCRM.WebClient"];
var myID = RoleEnvironment.CurrentRoleInstance.Id;
LicenseItem remoteValue = null;
foreach (var targetInstance in webRoles.Instances)
{
// I am currently going through a loop of instances. Check if the current enumaration shows my address.
if (targetInstance.Id == myID)
{
// Skip.
}
else
{
// This is a neighbour instance. Check to see if it knows about the instance I'm looking for.
NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);
EndpointAddress targetAddress = new EndpointAddress(
String.Format("net.tcp://{0}/NotifyService", targetInstance.InstanceEndpoints["NotificationServiceEndPoint"].IPEndpoint)
);
ChannelFactory<INotifyService> channelFactory = new ChannelFactory<INotifyService>(binding, targetAddress);
INotifyService targetClient = channelFactory.CreateChannel();
try
{
remoteValue = targetClient.CheckLicense(userID);
if (channelFactory.State != System.ServiceModel.CommunicationState.Faulted)
{
channelFactory.Close();
}
}
catch (TimeoutException timeoutException)
{
Trace.TraceError("Unable to check license on web role instance '{0}'. The service operation timed out. {1}", myID, timeoutException.Message);
((ICommunicationObject)targetClient).Abort();
}
catch (CommunicationException communicationException)
{
Trace.TraceError("Unable to check instance on web role instance '{0}'. There was a communication problem. {1} - {2}", myID, communicationException.Message, communicationException.StackTrace);
((ICommunicationObject)targetClient).Abort();
}
}
}
return remoteValue;
}
Edit 1: Important Update:
I think the problem is about the second instance. I did a debug and I saw the connection refused only by this stopped instance. I think this explains everything but I don't know why it is happening.
Edit 2: Temprorary Solution:
I noticed that is not an issue about Windows 8 because I was upgraded Azure SDK June 2012 SP1 to Fall 2012. I downloaded the not upgraded version of my project from TFS than I saw it's working. In conclusion, its the Azure SDK but I don't know why.
Remapping port numbers is not symptom for issues at all. It is normal behavior and has always been.
While doing/configuring your Windows 8 Dev Box, did you install the "Windows Features" WCF Activation:
Another way to test whether your Service is actually up and running is to:
Make sure you have the endpoint by launching the Compute Emulator and expecting the local deployment
telnet on the provided IP and port number to see whether a connection can actually be established
Verify endpoints UI:
Well, this will show you the Input endpoints. And from what I see you are using Internal Endpoints. Just for the sake of trial, try changing them to Input to see whether there will be some change in behavior.
But first check out that you have installed the WCF Activation.
I always get this issue when I forget to unbind the default web site in IIS (full IIS) on my dev box. Did you remember to do that? By default, your local IIS will bind http to port 80 on the 'Default Web Site'. If you edit that binding (using inetmgr) to another port, then the emulator can grab 80.
I have requirements to configure IIS 6 to host a WCF service targeting .NET Framework 4.0 using a custom identity for the worker process. The identity is a highly restricted domain account that is used to identify and manage the permissions for an entire ecosystem of services that interact in the same business process.
I have run aspnet_regiis.exe with the -ga flag to grant this identity permissions to the relevant ASP.NET locations on the server environment and add it to the IIS_WPG group. For the most part, things seem to work relatively well... except for the auto-generated WSDL specification's includes. Accessing the top-level WSDL spec works fine (i.e. path.to/MyService.svc?wsdl), but IIS 6 is resetting the connection before returning the response for the WSDL's includes (i.e. path.to/MyService.svc?xsd=xsd0, etc). This happens both when accessed via loopback on the server and through the public IP. It does not happen when reconfiguring the app pool to run under the default Network Service account.
I haven't found any documentation for this particular problem, but it's not the first time I've had difficulty with certain bits of the .NET Framework not quite working correctly when the IIS 6 worker process is running under a custom domain identity. I haven't configured any special privileges in the Local Security Policy for this account, other than the pre-configured permission for members of IIS_WPG to log on as a batch job. What might I be missing to get the worker functioning correctly?
EDIT:
The Event Viewer contains no errors and IIS logs show the server responding with 200 OK to the request, but the full status value is 200 0 64, indicating a Win32 status code of 64.
The dump I receive on that error from net helpmsg 64 is as follows:
The specified network name is no longer available.
Responses from various entities are below:
Chrome: Error 101 (net::ERR_CONNECTION_RESET): The connection was reset
Firefox: The connection to the server was reset while the page was loading
Eclipse/Java: java.net.SocketException: Connection reset
EDIT:
Service logging (provided by BNL) produced the following exception dump:
System.InvalidOperationException: Unable to generate a temporary class
(result=1). error CS2001: Source file 'C:\WINDOWS\TEMP\vxmgwmnl.0.cs'
could not be found. error CS2008: No inputs specified.
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String
ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at
System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[]
xmlMappings, Type[] types, String defaultNamespace, Evidence evidence,
XmlSerializerCompilerParameters parameters, Assembly assembly,
Hashtable assemblies) at
System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings,
Type[] types, String defaultNamespace, String location, Evidence
evidence) at System.Xml.Serialization.XmlSerializer..ctor(Type type,
String defaultNamespace) at
System.Xml.Schema.XmlSchema.Write(XmlWriter writer,
XmlNamespaceManager namespaceManager) at
System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.XmlSchemaMessage.OnWriteBodyContents(XmlDictionaryWriter
writer) at
System.ServiceModel.Channels.Message.OnWriteMessage(XmlDictionaryWriter
writer) at
System.ServiceModel.Channels.BufferedMessageWriter.WriteMessage(Message
message, BufferManager bufferManager, Int32 initialOffset, Int32
maxSizeQuota) at
System.ServiceModel.Channels.TextMessageEncoderFactory.TextMessageEncoder.WriteMessage(Message
message, Int32 maxMessageSize, BufferManager bufferManager, Int32
messageOffset) at
System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(Message
message) at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan
timeout) at
System.ServiceModel.Channels.HttpRequestContext.OnReply(Message
message, TimeSpan timeout) at
System.ServiceModel.Channels.RequestContextBase.Reply(Message message,
TimeSpan timeout) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc&
rpc)
Using the guidelines on the Microsoft KB article Error message when ASP.NET 2.0 is configured to run with a user account: "Unable to generate a temporary class", I located the C:\Windows\Temp directory and inspected its folder properties by right-clicking and choosing Properties. I then navigated to the Security tab and clicked Advanced, then Add. I entered the name of the IIS_WPG group on the local computer and allowed it only the special permission List Folder / Read Data. This has now resolved the issue.
I am using a simple wcf service. It works on localhost but when I deploy it to winhost, a shared hosting, I get this error:
The server encountered an error processing the request. The exception message is 'Access is denied.'. See server logs for more details. The exception stack trace is:
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at ....
It actually works fine if I remove a DLLimport function that I use. I am not sure if this is a permission issue or some other errors. My dll is in my bin folder.
Thanks for the help!
I use a sort of reflector tool to read the source code, I think the exception is caused by code access security. I think following link can help you.
http://msdn.microsoft.com/en-us/magazine/cc700337.aspx
You may increase the server permission level to allow the DllImport method.
I am running on Windows 7/IIS 7.5, and have a web service set up to use net.msmq, but when I attempt to access the service using HTTP, I get the following error:
The protocol 'net.msmq' does not have an implementation of HostedTransportConfiguration type registered.
[InvalidOperationException: The protocol 'net.msmq' does not have an implementation of HostedTransportConfiguration type registered.]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15778592
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15698937
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
I have set both http and net.msmq bindings on the site under which it resides, and have enabled both protocols ("http,net.msmq") on both the site and application.
I've looked at the article Debugging a Missing HostedTransportConfiguration Type and have run all the commands there, but none seemed to help; running sc query netmsmqactivator shows:
SERVICE_NAME: netmsmqactivator
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
The App Pool that the application is running under right now is targeting .NET Framework v2.0, but if I change the app pool to target .NET Framework v4.0 (and make appropriate changes to the service's web.config to remove duplicate configSection definitions), I am able to see the WSDL just fine.
As far as I know, the web service is not meant to be run targeting .NET Framework v4.0; it is actually working for a colleague of mine (also running Windows 7), but comparing setups isn't viable at this time for numerous reasons.
Another note, may or may not be related:
After attempting to access the service via HTTP and getting the above error, refreshing the service results in:
An item with the same key has already been added.
[ArgumentException: An item with the same key has already been added.]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15778592
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15698937
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
This requires an app pool recycle to clear.
I don't have experience working with net.msmq, so I do not know what pertinent information I may have left out; please let me know what I've missed.
Figured it out: Not sure what was messed up, but turns out that uninstalling then reinstalling WCF Non-HTTP Activation fixed it.
If you are hosting an MSMQ/WCF service in IIS, you have to tell IIS to allow net.msmq protocol. It's in the advanced settings for the application or site in which you are hosting the service.
We're getting errors every so often with a WCF service (consumed by Silverlight) that don't give us much to go on:
The service '/ourservice.svc' cannot be activated due to an exception during compilation.
The exception message is: Object reference not set to an instance of an object.. --->
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Web.Compilation.DiskBuildResultCache.CacheBuildResult(String cacheKey, BuildResult result, Int64 hashCode, DateTime utcStart)
at System.Web.Compilation.BuildManager.CacheBuildResultInternal(String cacheKey, BuildResult result, Int64 hashCode, DateTime utcStart)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
The service compiles/runs fine whenever I use it via the browser or using the silverlight client. The Silverlight side of the system reports this also equally un-helpful error:
System.ServiceModel.CommunicationException:
[HttpWebRequest_WebException_RemoteServer]Arguments: NotFound
The only lead I've managed to find is possibly changing the instancing behaviour but I'm not sure why we would need to do that, and I can't tell what the default is anyway.
It's hosted on Windows 2008 SP1
The server is behind a load balancer
The timeouts in the web.config for the service are 5 minutes
The maximum object size is 50000000
The services have AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)
Any suggestions would be great
Update
This is another symptom - the Silverlight client frequently sends this exception to our logging service (which writes to the event log + emails)
There was an error saving the report - The error object contained errors
System.ServiceModel.CommunicationException: [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer ---> System.Net.WebException: [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer ---> System.Net.WebException: [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.ReportServiceClientChannel.EndUpdateReport(IAsyncResult result)
at MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.MyNamespaceSilverlight.Core.ReportServiceReference.IReportService.EndUpdateReport(IAsyncResult result)
at MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.OnEndUpdateReport(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
Is anything in the service modifying the contents of the \bin directory? When hosting under ASP.NET, the ASP.NET runtime will monitor the \bin directory for any changes and, when a change is seen, it will attempt to reinitialize the application so that it picks up whatever changes there might have been.
You should not have anything writing to the \bin directory as part of your service's normal operation. Usually this is a problem with log files being configured to write to the \bin directory rather than a specific directory of their own. If you are unable to write the log files someplace outside the root of your application directory for whatever reason, just write them into a \logs sub-directory and configure ASP.NET to block all access to that directory like so:
<location path="logs">
<system.web>
<authorization>
<deny users="*" />
</authorization>
</system.web>
</location>
A similar problem is reported here: Service activation problem that seems to be related to log files.
Looks like a bug in System.Web. Same issue is reported here: http://connect.microsoft.com/VisualStudio/feedback/details/550511/nullreferenceexception-during-service-compilation.
The jury is still out, but I think you have better chances of getting this issue resolved if you post your details on http://connect.microsoft.com.
We've received the similar error during testing of WCF services, when one of the developers started a deployment of a new version of the service.