browser keeps downloading .svc files WCF - wcf

Been doing this for hours now and it drives me nuts.
On windows 7 I installed IIS 7.5 through add windows features, also installed WCF HTTP activation, also did all the command line registrations.
In VS 2013 I have a WCF Services project that runes very fine when I run it in IIS express but I want to test it together with my front-end.
But when I browse to my .svc file in the browser it just keeps getting downloaded, been searching google but get wrong results all the time, hopefully! Someone can help me.
Greets

If your WCF Service is in .Net Framework 4.0/4.5, then check the .Net Framework version in Application Pool.
If it is 2.xxxxxx, change it to 4.xxxxx.

Related

IIS pool stops on first request

I have .net framework 4.8 web site deployed on IIS 10. And It's pool stops on every first request after each start.
Here is the list of programs and features on server:
Programs and features
In Application Windows log I found 10 errors per each request. Everyone error is:
The Module DLL C:\Windows\system32\inetsrv\aspnetcore.dll failed to
load. The data is the error.
And in System log I have warning:
A listener channel for protocol 'http' in worker process '2968' serving application pool '{MyPoolName}' reported a listener channel failure. The data field contains the error number.
With binary data in details tab: In Words 0000: 8007007E
I tried to repair installed version of .net 5. Also tried to install .net framework 4.8, but installer didn't allow to do it because of:
.NET Framework 4.8 or a later update is already installed on this
computer.
I even tried to create site with empty directory. When I create one on my computer it shows "403.14 — Forbidden" as it should. But after doing the same on server empty site pool stops as my site's pool.
Have you ever faced such a problem? I have no idea how to fix it!
I have .net framework 4.8 web site deployed on IIS 10. And my IIS pool stopped on first request. Researching similair issues I found this artcle on the Microsoft Monitoring Agent APM service. This service was disabled, I removed the Microsoft Monitoring Agent APM as it was not being used. My application now successfully launches.
https://kevingreeneitblog.blogspot.com/2017/03/scom-2016-agent-crashing-legacy-iis.html
Thank you for your help. I solve the problem with complete reinstallation of server OS and components. My consider is that the problem was into iis or OS component.

Why does .NET Core build generate an EXE file but not generate a dll file?

I have .net core project, When i build that project it generates .exe file but not .dll, My requirement is to create .dll of project and host it in IIS server. how to generate .dll file,what settings need to be done.
An ASP.Net Core binary is meant to be a self-hosted application, so the .exe embed a web server (the default one being Kestrel) that can accept HTTP requests. One of the challenges behind ASP.Net Core was to make it self-contained and decoupled from IIS. So having an .exe is perfectly expected, you can double click on it and you'll get a web server running.
That being said, in a standard production environment, you are supposed to have a webserver like IIS sitting in front of your ASP.Net Core app and acting as a reverse proxy, forwarding the requests to the app. So having an .exe file will not prevent you from hosting behind IIS.
I learned a lot from this article: https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
If there is a way to create a DLL with ASP.Net Core, I don't know it, but what would be the point?
Switching the output type in your project properties to Class Library from Console Application will generate a DLL instead of an EXE.

Windows Store Application unable to access localhost WCF service and throws EndpoingNotFoundException

I have a solution which basically contains three components:
• WCF Service that is hosted locally having a back-end SQL Server Express DB and this WCF service is hosted from a Windows Service
• A console application
• A Windows Store Application
This is what they are meant to do:
• WCF service his hosted locally and is used by the console app and the store app for communicating with the database
• The console app adds an image for processing to the database by contacting the WCF service
• The store app will at regular time look for unprocessed images in database via the WCF service and will process them
Now, the difficulty is:
• The WCF service is hosted successfully and is working absolutely fine and I can check that by hitting its URL http://localhost:8081/XYZ
• The console app is also able to submit images to the WCF service and add their local paths to the database
• The store app however always throws the EndpointNotFoundException when accessing the service at that same localhost path
What have I tried:
• I have tried almost everything from searching through stackoverflow to googling and haven't found a solution yet
• I was thinking that it might be a port issue and so I turned off the firewall to check this, but it did not work, and the store app kept throwing the EndpointNotFoundException
What have worked:
• The complete set-up has, however, worked perfectly on my machine. It is strange that its not working on my client's Windows 8 machine.
Point to be noted:
• The complete solution has been developed in Visual Studio 2013 and the App is for Windows 8.1
• I am not sure, but it seems my client has a Windows 8 machine and we are installing the app on that. (Possibly, that might be a problem. But I'll check)
If there is any help someone could provide me, I'll be really greatful. Thanks in advance!
This is expected. Windows Store apps cannot connect back to the local system in production. This loopback prohibition is disabled for debugging.
See How to enable loopback and troubleshoot network isolation
If your app is to be side-loaded rather than deployed through the store then see Using network loopback in side-loaded Windows Store apps

Could not load file or assembly Microsoft.Exchange.Webservices.dll on client PC

I know there are more articles of this on the internet i think i found them all but still cant solve my problem for the client PC's.
i have a windows forms project installed on a server that every client PC's useses. I added the reference 2 my project and installed the EwsManagedApi on my own computer for testing and changed the location of where 2 find the references to the folder that EwsManagedApi installs.
When i am trying to use the module that uses the Exchange Web Services i get the error.
I only have the shotcut on my pc and the application is running good. i know the reference path is good i checked this more than 5 times. but when i just copy the dll to my folder where the shortcut is it is working good. what do i have to do to get the dll from the server where the aopplication is installed.
Tanx
You have to install the Microsoft Exchange WebServices API 2.0 in every client
to be sure you have all the necesary assemblies.
Microsoft Exchange Web Services Managed API 2.0
In addition, check out the the server version. Maybe it is 64 bits and the
clients are running 32 bits.

Manually configure WCF to use HTTP on Vista home premium

I'm trying to develop and deploy a WCF service using VS2008 and Vista home premium. I don't have IIS running and understand I don't need to if I manually configure the WCF app ... using netsh.exe I believe.
Can anyone give me clear guidance on how to go from the development project in VS2008 to a useable service?
Many thanks.
A WCF service needs a host to run. As IIS is out of the question you have a couple of possibilities left:
Write a Windows NT service and host it there
Write a managed application which will host your service (less robust)
As far as netsh.exe is concerned I don't see much relevance with WCF.