Search code examples
asp.netweb-servicessilverlightvisual-studio-2015iis-express

How to run web service from Microsoft Visual Studio Community 2015


asmx web service used by silverlight application project was created in Visual Web Developer and converted to Microsoft Visual Studio Community 2015 Version 14.0.25421.03 Update 3

For debugging application is run using IIS Express from IDE. ITs running returns error

Unhandled Error in Test Application 
Code: 2104    
Category: InitializeError       
Message: Could not download the Silverlight application. Check web server settings     

Typing http://localhost:1839/ to browser returs error in browser

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:

Module
   IIS Web Core 

Notification
   Unknown 

Handler
   Not yet determined 

Error Code
   0x80070003 

Config Error
   Cannot read configuration file  

Config File
   \\?\C:\Users\andrus\Documents\My Web Sites\Web-Site\web.config 

How to fix this ?

C:\Users\andrus\Documents\My Web Sites\Web-Site\web.config

C:\Users\andrus\Documents\My Web Sites\Web-Site directory does not exist. It looks like IIS Express is not running.

web.csproj file:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{136BE0FD-EE89-4F44-87A9-2C3958CD4D28}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Test.Service</RootNamespace>
<AssemblyName>Test.Service</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<!--<SilverlightApplicationList>{65869BFA-DC52-4F58-B153-C81BB864BE5B}|..\TestSL\TestSL.csproj|ClientBin|False</SilverlightApplicationList>-->
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>4.0</OldToolsVersion>
<!--<UseIISExpress>true</UseIISExpress>-->
<!--<IISExpressSSLPort />-->
<!--<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />-->
<TargetFrameworkProfile />
<!--<UseGlobalApplicationHostFile />-->
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<!--<ExcludeGeneratedDebugSymbol>false</ExcludeGeneratedDebugSymbol>-->
<!--<ExcludeApp_Data>true</ExcludeApp_Data>-->
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<RegisterForComInterop>false</RegisterForComInterop>
<!--<PublishDatabases>false</PublishDatabases>-->
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>http</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<!--<ExcludeGeneratedDebugSymbol>false</ExcludeGeneratedDebugSymbol>-->
<!--<PublishDatabases>false</PublishDatabases>-->
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.85.1.271, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Test\Dependencies\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\Npgsql.2.2.7\lib\net40\Mono.Security.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Npgsql, Version=2.2.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<HintPath>..\packages\Npgsql.2.2.7\lib\net40\Npgsql.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Data.Linq">
<!--<RequiredTargetFramework>3.5</RequiredTargetFramework>-->
</Reference>
<Reference Include="System.Runtime.Serialization">
<!--<RequiredTargetFramework>3.0</RequiredTargetFramework>-->
</Reference>
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Web.Services" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WebMatrix.WebData, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="ClientBin\TestSL.xap" />
<Content Include="login.htm" />
<Content Include="ClientBin\Toolbar\Paste_big.png" />
<Content Include="ClientBin\Toolbar\Print_big.png" />
<Content Include="Silverlight.js" />
<Content Include="StockService.asmx" />
</ItemGroup>
<ItemGroup>
<Compile Include="GetStockStatus.ashx.cs">
<DependentUpon>GetStockStatus.ashx</DependentUpon>
</Compile>
<Compile Include="RefreshStockStatus.ashx.cs">
<DependentUpon>RefreshStockStatus.ashx</DependentUpon>
</Compile>
<Compile Include="Eva.svc.cs">
<DependentUpon>Eva.svc</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Service\CartService.cs" />
<Compile Include="Service\TestMenuItem.cs" />
<Compile Include="Service\MenuBuilder.cs" />
<Compile Include="Service\WholeMenuBuilder.cs" />
<Compile Include="Service\StockService.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Service\TreeNodeData.cs" />
<Compile Include="Service\UserCredentials.cs" />
<Compile Include="Report.ashx.cs">
<DependentUpon>Report.ashx</DependentUpon>
</Compile>
<Compile Include="Service\WSDLDocumentationAttribute.cs" />
<Compile Include="Service\WSDLDocumentationImportExtension.cs" />
</ItemGroup>
<ItemGroup>
<Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Test\dblinq\DbLinq.PostgreSql\DbLinq.PostgreSql.csproj">
<Project>{32824F7E-9260-413C-B174-F3E315936FA7}</Project>
<Name>DbLinq.PostgreSql</Name>
</ProjectReference>
<ProjectReference Include="..\..\Test\dblinq\DbLinq\DbLinq.csproj">
<Project>{97305421-3071-4175-AA3C-9A432CC28121}</Project>
<Name>DbLinq</Name>
</ProjectReference>
<ProjectReference Include="..\..\Test\Test Business\Business.csproj">
<Project>{3A578D21-8E0C-4CB9-B22D-D4616DCE1E45}</Project>
<Name>Business</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="ShowReport.aspx" />
</ItemGroup>
<ItemGroup>
<Content Include="Eva.svc" />
<Content Include="ReportViewer.js" />
<Content Include="XamlReport.aspx" />
</ItemGroup>
<ItemGroup>
<Content Include="favicon.ico" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ExcelTemplate.xml" />
<Content Include="index.htm" />
<Content Include="Report.ashx" />
</ItemGroup>
<ItemGroup>
<Content Include="GetStockStatus.ashx" />
<Content Include="RefreshStockStatus.ashx" />
<Content Include="packages.config" />
<None Include="web.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\Profile1.pubxml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<!--<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>-->
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort>1839</DevelopmentServerPort>
<DevelopmentServerVPath>/Test</DevelopmentServerVPath>
<IISUrl>http://localhost:1839/Test</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>http://localhost</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

Posted also in http://forums.asp.net/p/2098544/


Solution

  • Search for applicationhost.config (Where is the IIS Express configuration / metabase file found?) and check is the path for your application valid.