.SVC

Файл SVC

WCF Service Host File (ASP.NET)
Задать вопрос
БЫСТРЫЙ ОТВЕТ

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.

Разработчик: Microsoft Категория: Интернет-файлы MIME: text/plain
ОТКРЫВАЕТСЯ НА Windows
Связанные: .CRDOWNLOAD · .JNLP · .WEBARCHIVE · .PART

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Jul 17, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла SVC?

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.

Безопасность и защита

РИСК: 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.

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕWCF Service Host File (ASP.NET)также известен как WCF service file, .svc endpoint file
РАЗРАБОТЧИКMicrosoftс 2006 (Windows Communication Foundation, .NET Framework 3.0)
КАТЕГОРИЯИнтернет-файлы
MIME-ТИПtext/plain
ТИПPlain-text service activation file (single @ServiceHost directive)

Программы, открывающие файлы SVC

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) Встроенная 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 Бесплатно Open the .svc as plain text to read or edit the single ServiceHost directive (it's just text).

Технические подробности

глубокая спецификация
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
Выпущен2006 (Windows Communication Foundation, .NET Framework 3.0)
Последняя версияTied to WCF on .NET Framework; WCF is not in modern .NET (Core/5+) - see CoreWCF
Спецификацияlearn.microsoft.com

Конвертации SVC

Вопросы и ответы сообщества

спрошено пользователями
Задать быстрый вопрос
Получите помощь от людей, работающих с файлами SVC. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах SVC.

Часто задаваемые вопросы

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.

Ссылки

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

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.RPMSGRestricted Permission Message
6.BINCD/DVD Disc Image (BIN/CUE)
7.EXEWindows Executable (Portable Executable)
8.M4AMPEG-4 Audio File
9.ICSiCalendar data file
10.XDWDocuWorks Document

Похожие расширения

.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)

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z