.SVC

SVC File

WCF Service Host File (ASP.NET)
Ask a question
QUICK ANSWER

A SVC file is a tiny plain-text file used by Microsoft WCF (Windows Communication Foundation) to expose a web service endpoint in IIS. It holds one line - an @ServiceHost directive naming the service class. It contains no data. Developers open it in Visual Studio or any text editor; actual service logic lives in compiled DLLs and web.config.

Developer: Microsoft Category: Web Files MIME: text/plain
OPENS ON Windows

On this page

19k+ extensions indexed
Last reviewed Jul 17, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the SVC file format?

Text files with the .svc extension contain a service activation instruction for WCF - Windows Communication Foundation. A single .svc file holds a @ServiceHost directive specific to WCF data processing that is run by Microsoft IIS. Services hosted on machines can be activated this way via incoming messages. .svc files can be opened and edited in any text editor, but Microsoft Visual Studio and similar IDEs are commonly used instead.

The @ServiceHost directive supports several attributes. The core Service attribute holds the name of the CLR (Common Language Runtime) service implementation, responsible for creating an instance on the host dynamically upon initial request. Additional attributes can refer to the Language in which the service is implemented, Debug settings, a CodeBehind source code path, or a custom Factory class. Additionally, .svc files can contain inline service code. Any edits made to files require recompilation upon the next query.

When hosting a service in IIS, endpoint addresses are always relative to the .svc file path. For example, if the base WCF service address is http://localhost/Application/Service.svc and the web.config file contains <endpoint address="point" />, then http://localhost/Application/Service.svc/point refers to that endpoint. Browsing the .svc URL directly shows a service help page with a link to the WSDL contract (?wsdl).

WCF is a legacy technology not included in modern .NET (Core/5+). It superseded the older .asmx format for enterprise service hosting. Projects migrating away from .svc-based services can target ASP.NET Core minimal APIs, gRPC, or the community-maintained CoreWCF library as a compatibility bridge.

Security & safety

RISK: LOW

The .svc file itself is harmless plain text and contains no executable code (the logic lives in compiled DLLs). Security concerns are server-side and about the SERVICE, not the file: an exposed WCF endpoint should use proper bindings/authentication, and leaving the WSDL/metadata publicly browsable can reveal the service contract. As a user, a stray .svc file you find is inert - there's nothing to execute by opening it.

Format details

in a nutshell
FULL NAMEWCF Service Host File (ASP.NET)aka WCF service file, .svc endpoint file
DEVELOPERMicrosoftsince 2006 (Windows Communication Foundation, .NET Framework 3.0)
CATEGORYWeb Files
MIME TYPEtext/plain
TYPEPlain-text service activation file (single @ServiceHost directive)

Programs that open SVC files

Windows3 apps
Visual Studio Freemium Open the containing project/solution; the .svc edits as text and IIS Express runs it. Browse the .svc URL to see the service help page / WSDL.
Internet Information Services (IIS) Built-in Host the WCF application; request the .svc URL to activate the service. Requires the WCF/HTTP Activation Windows feature enabled.
Visual Studio Code / any text editor Free Open the .svc as plain text to read or edit the single ServiceHost directive (it's just text).

Technical details

deep spec
File typePlain-text service activation file - no binary content, no data payload of its own
Text encodingUTF-8
Directive syntaxASP.NET page-directive syntax: `<%@ ServiceHost ... %>`
MIME type`text/plain`
Typical file sizeUnder 1 KB - usually a single directive line
Host environmentMicrosoft IIS via the ASP.NET WCF handler (`svc-Integrated` or `svc-ISAPI` HTTP handler)
Service attributeNames the CLR class that implements the WCF service (e.g., `MyNamespace.MyService`)
Factory attributeOptional; specifies a custom `ServiceHostFactory` class to control how the service host is constructed
Inline code supportService implementation code may be placed directly inside the `.svc` file alongside the directive
Endpoint URL patternThe `.svc` file URL is the service base address; sub-paths extend it (e.g., `/Service.svc/methodName`)
WSDL exposureAppending `?wsdl` to the `.svc` URL returns the auto-generated WSDL contract document for the service
Business logic locationCompiled into a `.dll` assembly in the web application's `bin` directory; `.svc` is the IIS entry point only
Runtime configurationBindings, endpoints, and behaviors are declared in `web.config`, not inside the `.svc` file
File identificationNo magic bytes; identified by the `<%@ ServiceHost` directive at or near the start of the file
Predecessor format`.asmx` (ASMX Web Services) - WCF's `.svc` superseded ASMX for enterprise and cross-platform service hosting
Legacy statusWCF is absent from .NET Core/5+; the community CoreWCF project offers a migration path for existing `.svc`-based services
Released2006 (Windows Communication Foundation, .NET Framework 3.0)
Latest versionTied to WCF on .NET Framework; WCF is not in modern .NET (Core/5+) - see CoreWCF
Specificationlearn.microsoft.com

SVC conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with SVC files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about SVC files.

Frequently asked questions

What is a .svc file?
It's a tiny ASP.NET text file for a WCF web service hosted in IIS. It holds one @ServiceHost directive naming the service class, and the .svc URL becomes the service's endpoint. It contains no data itself.
How do I open a .svc file?
As a developer, open the project in Visual Studio (or the file in any text editor) to see/edit the ServiceHost directive. As a consumer, you don't open the file - you call the .svc URL or fetch its WSDL with ?wsdl.
How do I get the WSDL for a .svc service?
Browse the service URL with ?wsdl appended (e.g. https://host/MyService.svc?wsdl), or use Visual Studio's Add Service Reference / the svcutil tool to generate a client.
Why does my .svc URL return an error?
Common causes: the WCF/HTTP Activation Windows feature isn't enabled in IIS, the Service= class name is wrong, the app isn't built, or web.config bindings are misconfigured. Check the error page and the Event log.
Is WCF (.svc) still supported?
WCF runs on the classic .NET Framework, which Microsoft still supports but no longer evolves. It was not ported to modern .NET; new services use ASP.NET Core/gRPC, and CoreWCF helps migrate existing WCF services.
Does a .svc file contain my data or service code?
No. It only points IIS to the service class. The actual logic is compiled into DLLs and the configuration is in web.config - the .svc is just the endpoint stub.

References

1Microsoft Learn - Windows Communication Foundationlearn.microsoft.com
2Microsoft Learn - How to: Host a WCF Service in IISlearn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.NOMEDIAAndroid No-Media Marker File
7.RPMSGRestricted Permission Message
8.TMPTemporary File
9.MDMarkdown Document
10.BINCD/DVD Disc Image (BIN/CUE)

Related extensions

.CRDOWNLOADChrome Partial Download File
.JNLPJava Network Launch Protocol file
.WEBARCHIVESafari Web Archive
.PARTPartial Download File
.DOWNLOADPartial / Incomplete Download File
.ASPXActive Server Page Extended (ASP.NET Web Form)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z