.svc (wcf) project don't start on Local IIS
the project was running normally.
but when he bought a new computer, it stopped working.
It may be because iis settings have changed. How can I fix
Error Image
System.IO.IOException
HResult=0x8007016A
Message=The cloud file provider is not running.
Source=mscorlib
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.get_EndOfStream()
at Microsoft.Tools.TestClient.ApplicationSettings.ReadSettingFile()
at Microsoft.Tools.TestClient.ApplicationSettings..ctor()
at Microsoft.Tools.TestClient.ApplicationSettings.GetInstance()
at Microsoft.Tools.TestClient.UI.MainForm.ConstructRecentServiceMenuItems()
at Microsoft.Tools.TestClient.UI.MainForm..ctor()
at Microsoft.Tools.TestClient.UI.MainForm..ctor(String[] endpoints)
at Microsoft.Tools.TestClient.Program.Main(String[] args)
This exception was originally thrown at this call stack:
[External Code]
I think there was a connectivity problem with OneDrive. The problem was solved after restarting the computer
Related
I have WCF websrvice Hosted on IIS 7.5 and IIS8, and I'm suing a REST endpoint to communicate to web service from my web application.
I'm using httpWebrequest to upload a file and I have set each and every setting possible in web.config of both sides to make sure asp.net will let me upload large files.
Its working fine with large files in IIS 8 but in IIS 7.5 I get the following Error:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/02/2014 4:04:39 PM
Event time (UTC): 10/02/2014 6:04:39 AM
Event ID: 8aea1d07d67743ba81a4c46bcd622ed1
Event sequence: 63
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/OP.Web-1-130364857480032265
Trust level: Full
Process information:
Process ID: 5320
Process name: w3wp.exe
Account name: IIS APPPOOL\MyApplication AppPool
Exception information:
Exception type: IOException
Exception message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
I would be thankful if you help me with this issue.
There are two different places where request size can be specified in IIS, as explained
in this answer. Maybe additional places within the WFC architecture also. But all of them are limited to 4GB (or 2GB in some cases). In one of our implementations, we found the best route to be that we host a custom Owin based web server to specifically handle uploaded requests. It takes a few lines of code to get that up and running, and there are samples available on asp.net website.
I'm using Microsoft Service Trace Viewer to check a log for an exception. Exception is:
An error occurred while receiving the HTTP response to ...someservice.svc.
This could be due to the service endpoint binding not using the HTTP protocol.
This could also be due to an HTTP request context being aborted by the server
(possibly due to the service shutting down). See server logs for more details.
The webservice is up and running, and I can reach it fine. I'm generating several reports using methods from the same webservice, and all is fine except one. (this report has a lot of data). I'm guessing it has to do with returning too much data / timeout, but how can I examine this using Microsoft Service Trace Viewer? (I'm new at this tool).
This is my exception string:
<ExceptionString>System.ServiceModel.CommunicationException: An error occurred
while receiving the HTTP response to http://someservice.svc. This could be due
to the service endpoint binding not using the HTTP protocol. This could also
be due to an HTTP request context being aborted by the server (possibly due to
the service shutting down). See server logs for more details. --->
System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a receive. --->
System.IO.IOException: Unable to read data from the transport connection: An
existing connection was forcibly closed by the remote host. --->
System.Net.Sockets.SocketException: An existing connection was forcibly
closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---</ExceptionString>
Please help, I really got no clue here...
To try to get a more specific error, enable tracing on both the client and the service, see the links below for more information. Once you have a .svclog file, open it with the trace viewer and click on any activities highlighted in red to view details - if you're exceeding a WCF limit such as MaxReceivedMessageSize it should appear in the log for either the client or service.
http://msdn.microsoft.com/en-us/library/ms733025.aspx
How to turn on WCF tracing?
A common cause for this from what I've encountered is a DataContractSerializer exception. Usually it's a circular reference for me.
Typically what I will do is leave a commented block of code in the service somewhere that uses DataContractSerializer to manually serialize the object that is about to return. You will get a more useful message from the exception it generates.
Assuming you have a "value" variable, here is one way to accomplish the task:
var xs = new DataContractSerializer(value.GetType());
var ms = new MemoryStream();
xs.WriteObject(ms, value);
Then I will execute the code to examine the exception.
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.
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.
I am working with silverlight3 with WCF service for a while.. I have developed and hosted my application into client mechine. It was working good. Then i need to do some modifications in my application, so I have added new functions in to my .svc file(i.e in to the wcf service). I have updated the servicereference successfully. When i re published and access it, it throws the error in a particulare method which i newly added.. But the other functions and data retreival are working good.. The newly added functions of the wcf services throws the communication error.
This is the function which i used to bind the combobox by the data retrieved from the wcf service..
Actual Error:
System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c_DisplayClass5.b_4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c_DisplayClass2.b_0(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.ClientBase1.ChannelBase1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at foundproject.ServiceReference1.Service1Client.Service1ClientChannel.EndUsergetBasedWorkgroup(IAsyncResult result)
at foundproject.ServiceReference1.Service1Client.ServiceReference1_IService1_EndUsergetBasedWorkgroup(IAsyncResult result)
at foundproject.ServiceReference1.Service1Client.OnEndUsergetBasedWorkgroup(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at foundproject.ServiceReference1.UsergetBasedWorkgroupCompletedEventArgs.get_Result()
at foundproject.UserMaster.BindUsers(Object sender, UsergetBasedWorkgroupCompletedEventArgs e)
Please Please help me to solve it out..
It will be a great help for me..
Thanks
Lakshmi.A
All methods in webservice are implemented using Interfaces, if you have added your function in Class file make sure its implemented by its interface-template/interface-method signature.
You have not changed the namespace of the newly added method.
the access modifier is public.
Try running your webservice file "svc" from IIS Management Console using Browse by Right clicking on "svc" file. it must show a default web service UI that we normally expect.
Debug your web service, and see if it hits the break point over your newly added method.
I'm sure by following these simple steps you will solve your problem.