.net Framework опять косячит:(

apxx

не могу провернуть такую конструкцию
 HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://ya.ru");

"Configuration system failed to initialize"
{"Unrecognized configuration section system.serviceModel. (c:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Config\\machine.config line 136)"}
кто знает как это фиксить?
ЗЫ поставил vs2008 там есть весь зоопарк фреймворков.

apxx

перенесите плиз в Development

Alexander08

а че там у тебя в 136 строке.

apxx

 <system.serviceModel> (line 136)  
<extensions>
<behaviorExtensions>
<add name="Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior" type="Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior, Microsoft.VisualStudio.Diagnostics.ServiceModelSink, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add name="persistenceProvider" type="System.ServiceModel.Configuration.PersistenceProviderElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="workflowRuntime" type="System.ServiceModel.Configuration.WorkflowRuntimeElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="enableWebScript" type="System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttp" type="System.ServiceModel.Configuration.WebHttpElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</behaviorExtensions>
<bindingElementExtensions>
<add name="webMessageEncoding" type="System.ServiceModel.Configuration.WebMessageEncodingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="context" type="System.ServiceModel.Configuration.ContextBindingElementExtensionElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingElementExtensions>
<bindingExtensions>
<add name="wsHttpContextBinding" type="System.ServiceModel.Configuration.WSHttpContextBindingCollectionElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="netTcpContextBinding" type="System.ServiceModel.Configuration.NetTcpContextBindingCollectionElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="basicHttpContextBinding" type="System.ServiceModel.Configuration.BasicHttpContextBindingCollectionElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
</extensions>
<commonBehaviors><endpointBehaviors><Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior/></endpointBehaviors><serviceBehaviors><Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior/></serviceBehaviors></commonBehaviors>
<client>
<metadata>
<policyImporters>
<extension type="System.ServiceModel.Channels.ContextBindingElementImporter, system.workflowservices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
</policyImporters>
<wsdlImporters>
<extension type="System.ServiceModel.Channels.ContextBindingElementImporter, system.workflowservices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
</wsdlImporters>
</metadata>
</client>
</system.serviceModel>

Alexander08

хз,у мя вроде все тоже самое. твой пример работает.

Trofimovyoa

ServiceModelReg.exe /i
оно вроде должно правильно прописывать этот раздел, на который ругается.
Если не поможет, рекомендуют сделать репэйр установленной WinFX.
http://www.google.com/search?q=Unrecognized+configuration+section+system.serviceModel&ie=win-1251&btnG=Google
Есть версия, что проблема в чувствительности к регистру (например, ServiceModel vs serviceModel)

apxx

ServiceModelReg.exe нет вообще такого файла

Trofimovyoa




xws_reg.exe has been renamed to ServiceModelReg.exe.
Try looking for it in C:\WINDOWS\WinFX\v3.0\Windows Communication Foundation
раньше он назывался xws_reg.exe

apxx

тоже нет:)
Оставить комментарий
Имя или ник:
Комментарий: