2014-05-28 5 views
0

Я пытаюсь разместить службу WCF в службах IIS 7.5, но с помощью диспетчера IIS при попытке просмотреть файл SVC он бросает мне эту ошибку enter image description hereКак разместить службу WCF в IIS 7.5?

снова, когда я пытаюсь запустить файл SVC из Визуальных Сама студия 2012 года прекрасно открывается от меня enter image description here

Где я делаю неправильно? Файл web.config выглядит следующим образом:

<?xml version="1.0"?> 
<configuration> 

<appSettings> 
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /> 
</appSettings> 
<system.web> 
<compilation debug="true" targetFramework="4.5" /> 
<httpRuntime targetFramework="4.5"/> 
</system.web> 
<system.serviceModel> 
<services> 
    <service name="GreetMeWcfServiceLibrary.GreetMeService"> 
    <endpoint address="" binding="basicHttpBinding" contract="GreetMeWcfServiceLibrary.IGreetMeService"> 
     <identity> 
     <dns value="localhost" /> 
     </identity> 
    </endpoint> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
    </service> 
</services> 
<behaviors> 
    <serviceBehaviors> 
    <behavior> 
     <!-- To avoid disclosing metadata information, set the values below to false before deployment --> 
     <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> 
     <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
     <serviceDebug includeExceptionDetailInFaults="false"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<protocolMapping> 
    <add binding="basicHttpsBinding" scheme="https" /> 
</protocolMapping>  
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 
</system.serviceModel> 
<system.webServer> 
<modules runAllManagedModulesForAllRequests="true"/> 
<!-- 
    To browse web app root directory during debugging, set the value below to true. 
    Set to false before deployment to avoid disclosing web app folder information. 
    --> 
<directoryBrowse enabled="true"/> 
</system.webServer> 

</configuration> 

И я пытался определить службу первой помощью приложения библиотеки WCF службы, а затем пытается организовать с помощью службы WCF.

Кроме того, когда я нажимаю правой кнопкой мыши и выбираю конфигурацию WCF файла web.config, он говорит, что нет службы, но я добавил ссылку на эту DLL-библиотеку службы.

enter image description here

Любая помощь очень ценится :(

+0

Посмотреть http://stackoverflow.com/questions/5385714/deploying-website-500-internal-server-error найти фактическая ошибка. Не – CodeCaster

ответ

0

В вашем WCF проекта пытается установить целевой Framework 4 и выполнить публикацию WCF и попробовать еще раз, файл конфигурации будет отличаться и он должен работа. Дайте мне знать,

В вашем webConfig.xml попробовать этот

<?xml version="1.0"?> 
<configuration> 

    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior> 
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpGetEnabled="true"/> 
      <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    </system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 


    <connectionStrings> 
     <remove name="XXXXX"/> 
     <add name="XXXXXX" connectionString="User ID=sa;Password=XXXX;Initial Catalog=XXXX;Data Source=XXXX\SQLEXPRESS"/> 
    </connectionStrings> 

</configuration> 
+0

Не повезло :( же ошибка использования – StrugglingCoder

+0

Что OS в разработке и какую версию VisualStudio? Какая операционная система у вас есть с IIS 7.5? – daniele3004

+0

Windows 7 Professional и Visual Studio 2012 !! – StrugglingCoder

0

I sugg вы просматриваете конфигурацию сервера, чтобы убедиться, что все необходимые компоненты IIS и WCF установлены и настроены правильно. В следующих статьях дается обзор выпуска и связанных с предложениями по устранению неисправностей:
http://www.dotnetscraps.com/dotnetscraps/post/e2809cHTTP-Error-50019-Internal-Server-Errore2809d-in-IIS-7-75.aspx
http://forums.iis.net/t/1166889.aspx

Смежные вопросы