WCF & IIS - This site can’t be reached. The connection was reset - wcf

I'm running IIS 10 on Windows 10 Pro, and hosting a WCF RESTful service.
For some reason I'm getting "This site can’t be reached. The connection was reset." ERR_CONNECTION_RESET error.
I'm able to debug and step though my code till the very end successfully so I know the service is executing fine without any errors when the URL is hit.
But for some reason IIS is not displaying the results / json and is showing this error
I have spent over a day on this. Any advice on how to resolve this would be greatly appreciated. Thanks!

Related

WebApi Deployed to IIS: Error: Exceeded maxRedirects. Probably stuck in a redirect loop

I have two Api's that are deployed and running fine in my local IIS. They deploy fine and swagger works but executing any method returns a TypeError: Failed to fetch Error. Then I run the same GET in Postman and it throws Error: Exceeded maxRedirects. Probably stuck in a redirect loop
Has anyone seen this before? We are going through an Azure App Gateway...could that be a problem?
-Ken
The Azure Gateway turned out to be the problem. I commented out the app.UseHttpsRedirection() and the problems went away.

VS2012 WCF / IIS Express 'Failed to register url / Cannot create a file when that file already exists.'

I was doing some work earlier in WCF and I finally got it all working with SSL by following this: http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx . When I rebooted my PC, my services stopped working - the browser would just say 'connection reset'.
I spent a lot of time scratching my head and playing around, and now the service won't launch at all. I get the message in the title when I try to run it.
I'm at a total loss of what to do. I've tried deleting the config folder and it has recreated it, but I just get this error every time and I don't even know what it means.
Interestingly if I make a new project of the same type (WCF Service Application) it runs and works perfectly.
Any suggestions?

The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request

I am working with SharePoint 2010 server. I have deployed a sandboxed solution to the sharepoint server. But while adding the webpart to page it shows the error like below.
"The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request"
I found below article and followed all the work around, but the error is still persisting.
http://blogs.msdn.com/b/sharepointdev/archive/2011/02/08/error-the-sandboxed-code-execution-request-was-refused-because-the-sandboxed-code-host-service-was-too-busy-to-handle-the-request.aspx
Can anyone tell me what am I missing or what I have to do in order to get rid of this exception?
We've had to do this, too:
$uc = [Microsoft.SharePoint.Administration.SPUserCodeService]::Local
$uc.WorkerProcessExecutionTimeout = 5000
$uc.Update()
$tier = $uc.Tiers[""] # default Tier has no Name
$tier.MaximumWorkerProcesses = 2 # number of CPU Cores + 1
$tier.Update()

Silverlight wcf connection error

I'm about a month away developing my silverlight application (this is my first). Everything went rather smoothly until today, when out of the blue I started getting this message:
An error occurred while trying to make a request to URI 'http://localhost:2682/Services/Authentication/LoginService.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
I'm using WCF Services and this issue never appeared until now.
I've added a clientdomain.xml and clientaccesspolicy.xml file to my [projectname].web folder, and re-wrote them about a 1000 different ways.
I've also used Fiddler and it shows me that the error is on both those files, the error is
[Fiddler] The socket connection to localhost failed. ErrorCode: 10061. No connection could be made because the target machine actively refused it 127.0.0.1:2682
I've searched the error "10061" and it has to do with socket definition. But I couldn't find any solution to that.
Don't know if it has anything to do with it, but my "ASP.net Development Server" port is 6939.
Keep in mind that the app has NOT been deployed, so this is only happening locally. I'm using MS VS 2010 and MS SQL Server 2008.
Am I doing anything wrong or is this a silverlight issue??
On a last note, I haven't changed anything on Port, socket or service configuration. Last thing I was doing was editing a XAML file on client side and and the app started throwing me this error.
Need help, can't do anything until this is solved!!!!
Thanks.
i think you are using you app on localhost and a dynamic port is getting assigned and this port is not fixed and every run and that causes the refuse problem. if you want to fix this, create a solid url for example,
http://localhost/apps/Services/Authentication/LoginService.svc
Well, last night, just before I went to bed, I noticed something odd. In my "ServiceReferences.ClientConfig" file, the endpoint ports for each one of my services where diferent from the ones the silverlight machine used, so going on a hunch (and because I was reaching my sanity breakpoint) I decided to eliminate all my Service References and re-add them again.
I worked... go figure. Still don't know why this happened and if anyone could shed some light on the subject, I would appreciate it. It's kinda of annoying having to re-add all my services references. Right now I have only 6 of them, but in the near future they may go over 20, and if this happens again... well, it's going to be a real pain...
Thanks

WCF wsdualhttpbinding strange behaviour at client side that has no clear (Exception details)

to make long story as short as possible, I made a duplex WCF service, using wsdualhttpbinding, tested it on my local machine using Visual Stuido and using IIS7, thigs are working fine (i had to use windows authentication on IIS7 to make it work thu). Any way, I published the duplex service on my company network (LAN network, windows domain, IIS 6) which i used to for many WCF services (basic and ws http bindings and worked fine) and the problem is I can not get the service to work, I tried all possible configurations to the app.config and to the web.config files, still i can not make it work.. The problem is when the client start calling the duplex service It hangs and no error message or whatsoever, and after few minutes it gives me a timeout error.. there is no error at server side ( i have checked the even viewer). There is not error about port 80 or access privileges. Is there anything i am missing? anything i should take care of and i forgot? i have been awake for 20 hours trying to find a solution because i have a time line to follow or my boss will Dispose() Me..
i have tried the following:
1- I set the IsOneWay = true..
2- I run the program as admin.
3- I i set the base address to another port.. same result..
4- I used windows auth, none... same result..
5- i have tried another machine to test the client.. same result.. it hangs with no reponse.
6- I also tried running the client on windows vista, 7 and xp... same result..
7- I have played with all kind of configurations in config files and i made sure its the same on both files (app.config and web.config)..
8- I have added a static constructor in the service side to see if the service was ever reached by the client, i added few lines to add a value in the db.. and nothing was written to db.. so it was never reached..
9- Yes, when i access the service SVC page i see the page and it worked fine.. I could access the metadata as well..
10- restarting the server, restarting IIS server, Recycling AppPool...etc..
I tried all of that and many other solutions and tricks.. same result when the app is on IIS.. the strange thing is, there is no error at server side.. and i only get TimeOut error (if i get it).. While If i tried the service on the IIS installed locally it works fine.. change the config file to point to the company IIS server,,, no luck!
Is there anything i am missing??? could be something simple but i just missed it..