pretty...
|
@ -0,0 +1,7 @@
|
|||
del ..\deploy\*.* /s/q
|
||||
xcopy bin\x86 ..\deploy /S /I /F /Y <nul:
|
||||
del ..\deploy\*vshost* /s
|
||||
del ..\deploy\release\*.pdb /s
|
||||
del ..\deploy\*.db3 /s
|
||||
rem tree ..\deploy /f>..\deploy.txt
|
||||
copy ..\*.txt ..\deploy\ /Y
|
|
@ -0,0 +1,180 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9AAD02EE-FE79-46BE-87EB-E3D2A376A043}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>CassiniDev4</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Debug\CassiniDev4\CassiniDev4.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Release\CassiniDev4\CassiniDev4.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CassiniServer.cs" />
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo4.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
<Compile Include="Views\BodyView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\BodyView.Designer.cs">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.Designer.cs">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.Designer.cs">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
<EmbeddedResource Include="Views\BodyView.resx">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\FormView.resx">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\LogView.resx">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="CassiniDev4.exe.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{539F0304-F14A-413F-A56A-AFB7724EA1A7}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>CassiniDev-console</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;CONSOLE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CassiniDevServerOP.cs" />
|
||||
<Compile Include="ConsoleProgram.cs" />
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,156 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{539F0304-F14A-413F-A56A-AFB7724EA1A7}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>CassiniDev4-console</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Debug\CassiniDev4.Console\CassiniDev4-console.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Release\CassiniDev4.Console\CassiniDev4-console.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CassiniDevServerOP.cs" />
|
||||
<Compile Include="ConsoleProgram.cs" />
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo4.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="CassiniDev4-console.exe.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9AAD02EE-FE79-46BE-87EB-E3D2A376A043}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>CassiniDev-lib</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CassiniServer.cs" />
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{070AE36D-4CE1-4708-BD0F-2896A6F117FC}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>CassiniDev4-lib</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Debug\CassiniDev4.Lib\CassiniDev4-lib.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Release\CassiniDev4.Lib\CassiniDev4-lib.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CassiniServer.cs" />
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Misc\CommandLineParser.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo4.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="CassiniDev4-lib.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,177 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{F50EB799-6DED-4906-9DB0-B8FBE5C14028}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>WebDev.WebServer</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;GUI</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
<Compile Include="Views\BodyView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\BodyView.Designer.cs">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.Designer.cs">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.Designer.cs">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
<EmbeddedResource Include="Views\BodyView.resx">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\FormView.resx">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\LogView.resx">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="CassiniDev4-lib.dll.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,181 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{06764838-9B08-4254-AFA6-2B790E110DFB}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>WebDev.WebServer20</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;GUI</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo4.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
<Compile Include="Views\BodyView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\BodyView.Designer.cs">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.Designer.cs">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.Designer.cs">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
<EmbeddedResource Include="Views\BodyView.resx">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\FormView.resx">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\LogView.resx">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,190 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{73C76E4C-426C-45C2-9D37-1E46FA29CE66}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>WebDev.WebServer40</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Debug\DevServer\10.0\WebDev.WebServer40.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET40</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Release\DevServer\10.0\WebDev.WebServer40.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Core\Connection.cs" />
|
||||
<Compile Include="Core\Host.cs" />
|
||||
<Compile Include="Core\Messages.cs" />
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\Request.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo4.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
<Compile Include="Views\BodyView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\BodyView.Designer.cs">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.Designer.cs">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\HelpView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\HelpView.Designer.cs">
|
||||
<DependentUpon>HelpView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.Designer.cs">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx" />
|
||||
<EmbeddedResource Include="Views\BodyView.resx">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\FormView.resx">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\HelpView.resx">
|
||||
<DependentUpon>HelpView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\LogView.resx">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="WebDev.WebServer40.exe.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,200 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0D9F0FEA-45F7-4CE4-9868-6FB9BBE3DD4C}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>CassiniDev</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ApplicationIcon>Resources\preferences-web-browser-shortcuts.ico</ApplicationIcon>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<TargetFrameworkSubset>
|
||||
</TargetFrameworkSubset>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Misc\CommandLine.cs" />
|
||||
<Compile Include="Misc\ServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Views\BodyView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\BodyView.Designer.cs">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Views\LogView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.Designer.cs">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Core\Connection.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.Designer.cs">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Core\Host.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Core\Messages.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Core\Request.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\preferences-web-browser-shortcuts.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Views\BodyView.resx">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\LogView.resx">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\FormView.resx">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="BuildDeploy.cmd" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<generatePublisherEvidence enabled="false"/>
|
||||
</runtime>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<generatePublisherEvidence enabled="false"/>
|
||||
</runtime>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0D9F0FEA-45F7-4CE4-9868-6FB9BBE3DD4C}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CassiniDev</RootNamespace>
|
||||
<AssemblyName>CassiniDev</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ApplicationIcon>Resources\earth_network.ico</ApplicationIcon>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\CasssiniDev-DevKey.snk</AssemblyOriginatorKeyFile>
|
||||
<TargetFrameworkSubset>
|
||||
</TargetFrameworkSubset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\lib\System.Data.SQLite.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Views\HelpView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\HelpView.Designer.cs">
|
||||
<DependentUpon>HelpView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Core\NtlmAuth.cs" />
|
||||
<Compile Include="Core\RequestEventArgs.cs" />
|
||||
<Compile Include="Core\Server.cs" />
|
||||
<Compile Include="Misc\CommandLineParser.cs" />
|
||||
<Compile Include="Misc\Common.cs" />
|
||||
<Compile Include="Misc\Interop.cs" />
|
||||
<Compile Include="Views\BodyView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\BodyView.Designer.cs">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Logging\ServerLogBase.cs" />
|
||||
<Compile Include="Logging\SQLiteServerLog.cs" />
|
||||
<Compile Include="Logging\LogInfo.cs" />
|
||||
<Compile Include="Views\LogView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\LogView.Designer.cs">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Logging\NullServerLogDal.cs" />
|
||||
<Compile Include="Misc\NetworkUtils.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Misc\HostsFile.cs" />
|
||||
<Compile Include="Core\Connection.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Views\FormView.Designer.cs">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Core\Host.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Core\Messages.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Core\Request.cs">
|
||||
<SubType>
|
||||
</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Misc\CommandLineArguments.cs" />
|
||||
<Compile Include="Resources\SR.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\earth_network.ico" />
|
||||
<Content Include="Ms-PL.htm">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="ReadMe.htm">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Views\BodyView.resx">
|
||||
<DependentUpon>BodyView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\HelpView.resx">
|
||||
<DependentUpon>HelpView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\LogView.resx">
|
||||
<DependentUpon>LogView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Views\FormView.resx">
|
||||
<DependentUpon>FormView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\CassiniDev.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy "$(TargetDir)$(TargetName).*" "$(ProjectDir)..\deploy\$(ConfigurationName)\" /S /I /F /Y <nul:</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<generatePublisherEvidence enabled="false"/>
|
||||
</runtime>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -0,0 +1,241 @@
|
|||
// /* **********************************************************************************
|
||||
// *
|
||||
// * Copyright (c) Sky Sanders. All rights reserved.
|
||||
// *
|
||||
// * This source code is subject to terms and conditions of the Microsoft Public
|
||||
// * License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// * included in this distribution.
|
||||
// *
|
||||
// * You must not remove this notice, or any other, from this software.
|
||||
// *
|
||||
// * **********************************************************************************/
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Made a go at spinning the server up from this process but after dealing with
|
||||
/// irratic behaviour regarding apartment state, platform concerns, unloaded app domains,
|
||||
/// and all the other issues that you can find that people struggle with I just decided
|
||||
/// to strictly format the console app's output and just spin up an external process.
|
||||
/// Seems robust so far.
|
||||
/// </summary>
|
||||
public class CassiniDevServerOP
|
||||
{
|
||||
//private bool _disposed;
|
||||
|
||||
private string _hostname;
|
||||
private StreamWriter _input;
|
||||
private IPAddress _ipAddress;
|
||||
private Thread _outputThread;
|
||||
private string _rootUrl;
|
||||
private Process _serverProcess;
|
||||
private const int TimeOut = 60000;
|
||||
private const int WaitForPort = 5000;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
{
|
||||
if (_serverProcess != null)
|
||||
{
|
||||
StopServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The root URL of the running web application
|
||||
/// </summary>
|
||||
public string RootUrl
|
||||
{
|
||||
get { return _rootUrl; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combine the RootUrl of the running web application with the relative url specified.
|
||||
/// </summary>
|
||||
/// <param name="relativeUrl"></param>
|
||||
/// <returns></returns>
|
||||
public string NormalizeUrl(string relativeUrl)
|
||||
{
|
||||
return CassiniNetworkUtils.NormalizeUrl(RootUrl, relativeUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will start specified application as "localhost" on loopback and first available port in the range 8000-10000 with vpath "/"
|
||||
/// </summary>
|
||||
/// <param name="applicationPath">Physical path to application.</param>
|
||||
public void StartServer(string applicationPath)
|
||||
{
|
||||
StartServer(applicationPath, CassiniNetworkUtils.GetAvailablePort(8000, 10000, IPAddress.Loopback, true), "/", "localhost");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will start specified application on loopback
|
||||
/// </summary>
|
||||
/// <param name="applicationPath">Physical path to application.</param>
|
||||
/// <param name="port">Port to listen on.</param>
|
||||
/// <param name="virtualPath">Optional. defaults to "/"</param>
|
||||
/// <param name="hostName">Optional. Is used to construct RootUrl. Defaults to "localhost"</param>
|
||||
public void StartServer(string applicationPath, int port, string virtualPath, string hostName)
|
||||
{
|
||||
// WebHost.Server will not run on any other IP
|
||||
IPAddress ipAddress = IPAddress.Loopback;
|
||||
|
||||
if (!CassiniNetworkUtils.IsPortAvailable(ipAddress, port))
|
||||
{
|
||||
throw new Exception(string.Format("Port {0} is in use.", port));
|
||||
}
|
||||
|
||||
applicationPath = Path.GetFullPath(applicationPath);
|
||||
|
||||
virtualPath = String.Format("/{0}/", (virtualPath ?? string.Empty).Trim('/')).Replace("//", "/");
|
||||
hostName = string.IsNullOrEmpty(hostName) ? "localhost" : hostName;
|
||||
|
||||
StartServer(applicationPath, ipAddress, port, virtualPath, hostName);
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="applicationPath">Physical path to application.</param>
|
||||
/// <param name="ipAddress">IP to listen on.</param>
|
||||
/// <param name="port">Port to listen on.</param>
|
||||
/// <param name="virtualPath">Optional. default value '/'</param>
|
||||
/// <param name="hostName">Optional. Used to construct RootUrl. Defaults to 'localhost'</param>
|
||||
public virtual void StartServer(string applicationPath, IPAddress ipAddress, int port, string virtualPath, string hostName)
|
||||
{
|
||||
|
||||
_hostname = hostName;
|
||||
_ipAddress = ipAddress;
|
||||
|
||||
// massage and validate arguments
|
||||
if (string.IsNullOrEmpty(virtualPath))
|
||||
{
|
||||
virtualPath = "/";
|
||||
}
|
||||
if (!virtualPath.StartsWith("/"))
|
||||
{
|
||||
virtualPath = "/" + virtualPath;
|
||||
}
|
||||
if (_serverProcess != null)
|
||||
{
|
||||
throw new InvalidOperationException("Server is running");
|
||||
}
|
||||
|
||||
|
||||
string commandLine = (new CommandLineArguments
|
||||
{
|
||||
Port = port,
|
||||
ApplicationPath = string.Format("\"{0}\"", Path.GetFullPath(applicationPath).Trim('\"').TrimEnd('\\')),
|
||||
HostName = hostName,
|
||||
IPAddress = ipAddress.ToString(),
|
||||
VirtualPath = string.Format("\"{0}\"", virtualPath),
|
||||
TimeOut = TimeOut,
|
||||
WaitForPort = WaitForPort,
|
||||
IPMode = IPMode.Specific,
|
||||
PortMode = PortMode.Specific
|
||||
}).ToString();
|
||||
|
||||
|
||||
_serverProcess = new Process
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
UseShellExecute = false,
|
||||
ErrorDialog = false,
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardInput = true,
|
||||
#if NET40 //TODO: find out the real flag
|
||||
FileName = "CassiniDev4-console.exe",
|
||||
#else
|
||||
FileName = "CassiniDev-console.exe",
|
||||
#endif
|
||||
|
||||
Arguments = commandLine,
|
||||
WorkingDirectory = Environment.CurrentDirectory
|
||||
}
|
||||
};
|
||||
|
||||
// we are going to monitor each line of the output until we get a start or error signal
|
||||
// and then just ignore the rest
|
||||
|
||||
string line = null;
|
||||
|
||||
_serverProcess.Start();
|
||||
|
||||
_outputThread = new Thread(() =>
|
||||
{
|
||||
string l = _serverProcess.StandardOutput.ReadLine();
|
||||
while (l != null)
|
||||
{
|
||||
if (l.StartsWith("started:") || l.StartsWith("error:"))
|
||||
{
|
||||
line = l;
|
||||
}
|
||||
l = _serverProcess.StandardOutput.ReadLine();
|
||||
}
|
||||
});
|
||||
_outputThread.Start();
|
||||
|
||||
// use StandardInput to send the newline to stop the server when required
|
||||
_input = _serverProcess.StandardInput;
|
||||
|
||||
// block until we get a signal
|
||||
while (line == null)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
|
||||
if (!line.StartsWith("started:"))
|
||||
{
|
||||
throw new Exception(string.Format("Could not start server: {0}", line));
|
||||
}
|
||||
|
||||
// line is the root url
|
||||
_rootUrl = line.Substring(line.IndexOf(':') + 1);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>Stops the server, if running.</para>
|
||||
/// </summary>
|
||||
public virtual void StopServer()
|
||||
{
|
||||
StopServer(100);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Stops the server, if running.</para>
|
||||
/// </summary>
|
||||
protected virtual void StopServer(int delay)
|
||||
{
|
||||
Thread.Sleep(delay);
|
||||
if (_serverProcess != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
_input.WriteLine();
|
||||
_serverProcess.WaitForExit(10000);
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
_serverProcess.Dispose();
|
||||
_serverProcess = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
// /* **********************************************************************************
|
||||
// *
|
||||
// * Copyright (c) Sky Sanders. All rights reserved.
|
||||
// *
|
||||
// * This source code is subject to terms and conditions of the Microsoft Public
|
||||
// * License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// * included in this distribution.
|
||||
// *
|
||||
// * You must not remove this notice, or any other, from this software.
|
||||
// *
|
||||
// * **********************************************************************************/
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public class CassiniDevServer
|
||||
{
|
||||
|
||||
private Server _server;
|
||||
|
||||
#region Implementation of IDisposable
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
if (_server != null)
|
||||
{
|
||||
StopServer();
|
||||
_server.Dispose();
|
||||
_server = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The root URL of the running web application
|
||||
/// </summary>
|
||||
public string RootUrl
|
||||
{
|
||||
get { return string.Format(CultureInfo.InvariantCulture, "http://{0}:{1}{2}", _server.HostName, _server.Port, _server.VirtualPath); }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Combine the RootUrl of the running web application with the relative url
|
||||
/// specified.
|
||||
/// </summary>
|
||||
/// <param name="relativeUrl"></param>
|
||||
/// <returns></returns>
|
||||
public string NormalizeUrl(string relativeUrl)
|
||||
{
|
||||
return CassiniNetworkUtils.NormalizeUrl(RootUrl, relativeUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will start specified application as "localhost" on loopback and first available port in the range 8000-10000 with vpath "/"
|
||||
/// </summary>
|
||||
/// <param name="applicationPath">Physical path to application.</param>
|
||||
public void StartServer(string applicationPath)
|
||||
{
|
||||
StartServer(applicationPath, CassiniNetworkUtils.GetAvailablePort(8000, 10000, IPAddress.Loopback, true), "/", "localhost");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will start specified application on loopback
|
||||
/// </summary>
|
||||
/// <param name="applicationPath">Physical path to application.</param>
|
||||
/// <param name="port">Port to listen on.</param>
|
||||
/// <param name="virtualPath">Optional. defaults to "/"</param>
|
||||
/// <param name="hostName">Optional. Is used to construct RootUrl. Defaults to "localhost"</param>
|
||||
public void StartServer(string applicationPath, int port, string virtualPath, string hostName)
|
||||
{
|
||||
// WebHost.Server will not run on any other IP
|
||||
IPAddress ipAddress = IPAddress.Loopback;
|
||||
|
||||
if (!CassiniNetworkUtils.IsPortAvailable(ipAddress, port))
|
||||
{
|
||||
throw new Exception(string.Format("Port {0} is in use.", port));
|
||||
}
|
||||
|
||||
applicationPath = Path.GetFullPath(applicationPath);
|
||||
|
||||
virtualPath = String.Format("/{0}/", (virtualPath ?? string.Empty).Trim('/')).Replace("//", "/");
|
||||
hostName = string.IsNullOrEmpty(hostName) ? "localhost" : hostName;
|
||||
|
||||
StartServer(applicationPath, ipAddress, port, virtualPath, hostName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="applicationPath">Physical path to application.</param>
|
||||
/// <param name="ipAddress">IP to listen on.</param>
|
||||
/// <param name="port">Port to listen on.</param>
|
||||
/// <param name="virtualPath">Optional. default value '/'</param>
|
||||
/// <param name="hostname">Optional. Used to construct RootUrl. Defaults to 'localhost'</param>
|
||||
public void StartServer(string applicationPath, IPAddress ipAddress, int port, string virtualPath, string hostname)
|
||||
{
|
||||
if (_server != null)
|
||||
{
|
||||
throw new InvalidOperationException("Server already started");
|
||||
}
|
||||
_server = new Server(port, virtualPath, applicationPath, ipAddress,hostname, 60000);
|
||||
|
||||
try
|
||||
{
|
||||
_server.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw new InvalidOperationException("Error starting server instance.", ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Stops the server.</para>
|
||||
/// </summary>
|
||||
public void StopServer()
|
||||
{
|
||||
if (_server != null)
|
||||
{
|
||||
_server.ShutDown();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace CassiniDev.Configuration
|
||||
{
|
||||
public class CassiniDevConfigurationSection : ConfigurationSection
|
||||
{
|
||||
[ConfigurationProperty("profiles")]
|
||||
public CassiniDevProfileElementCollection Profiles
|
||||
{
|
||||
get
|
||||
{
|
||||
return (CassiniDevProfileElementCollection)this["profiles"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationCollection(typeof(CassiniDevProfileElement), AddItemName = "profile", CollectionType = ConfigurationElementCollectionType.BasicMap)]
|
||||
public class CassiniDevProfileElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new CassiniDevProfileElement();
|
||||
}
|
||||
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((CassiniDevProfileElement)element).Port;
|
||||
}
|
||||
}
|
||||
public class CassiniDevProfileElement : ConfigurationElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Port is used as profile selector
|
||||
/// </summary>
|
||||
[ConfigurationProperty("port", DefaultValue = "*", IsKey = true, IsRequired = true)]
|
||||
public string Port
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["port"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["port"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("path")]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["path"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["path"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[ConfigurationProperty("hostName")]
|
||||
public string HostName
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["hostName"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["hostName"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("ip")]
|
||||
public string IpAddress
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["ip"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["ip"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("ipMode", DefaultValue = CassiniDev.IPMode.Loopback)]
|
||||
public IPMode IpMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (IPMode)this["ipMode"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["ipMode"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("v6", DefaultValue = false)]
|
||||
public bool IpV6
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)this["v6"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["v6"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
// /* **********************************************************************************
|
||||
// *
|
||||
// * Copyright (c) Sky Sanders. All rights reserved.
|
||||
// *
|
||||
// * This source code is subject to terms and conditions of the Microsoft Public
|
||||
// * License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// * included in this distribution.
|
||||
// *
|
||||
// * You must not remove this notice, or any other, from this software.
|
||||
// *
|
||||
// * **********************************************************************************/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Configuration.Install;
|
||||
using System.Net;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
[STAThread]
|
||||
private static void Main(string[] cmdLine)
|
||||
{
|
||||
CommandLineArguments args = new CommandLineArguments();
|
||||
|
||||
|
||||
if (!CommandLineParser.ParseArgumentsWithUsage(cmdLine, args))
|
||||
{
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (args.RunMode)
|
||||
{
|
||||
case RunMode.Server:
|
||||
IPAddress ip=IPAddress.Loopback;
|
||||
try
|
||||
{
|
||||
args.Validate();
|
||||
|
||||
ip = CommandLineArguments.ParseIP(args.IPMode, args.IPv6, args.IPAddress);
|
||||
int port = args.PortMode == PortMode.FirstAvailable ?
|
||||
CassiniNetworkUtils.GetAvailablePort(args.PortRangeStart, args.PortRangeEnd, ip, true) :
|
||||
args.Port;
|
||||
|
||||
if(args.AddHost)
|
||||
{
|
||||
HostsFile.AddHostEntry(ip.ToString(), args.HostName);
|
||||
}
|
||||
|
||||
using (var server =
|
||||
new Server(port, args.VirtualPath, args.ApplicationPath,
|
||||
ip, args.HostName, args.TimeOut))
|
||||
{
|
||||
server.Start();
|
||||
Console.WriteLine("started: {0}\r\nPress Enter key to exit....", server.RootUrl);
|
||||
Console.ReadLine();
|
||||
server.ShutDown();
|
||||
}
|
||||
}
|
||||
catch (CassiniException ex)
|
||||
{
|
||||
Console.WriteLine("error:{0} {1}",
|
||||
ex.Field == ErrorField.None
|
||||
? ex.GetType().Name
|
||||
: ex.Field.ToString(), ex.Message);
|
||||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
Console.WriteLine("error:{0}", ex2.Message);
|
||||
Console.WriteLine(CommandLineParser.ArgumentsUsage(typeof(CommandLineArguments)));
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (args.AddHost)
|
||||
{
|
||||
HostsFile.RemoveHostEntry(ip.ToString(), args.HostName);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case RunMode.Hostsfile:
|
||||
SetHostsFile(args);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetHostsFile(CommandLineArguments sargs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (sargs.AddHost)
|
||||
{
|
||||
HostsFile.AddHostEntry(sargs.IPAddress, sargs.HostName);
|
||||
}
|
||||
else
|
||||
{
|
||||
HostsFile.RemoveHostEntry(sargs.IPAddress, sargs.HostName);
|
||||
}
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Environment.Exit(-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ServiceUtil
|
||||
{
|
||||
static void Install(bool undo, string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine(undo ? "uninstalling" : "installing");
|
||||
using (AssemblyInstaller inst = new AssemblyInstaller(typeof(Program).Assembly, args))
|
||||
{
|
||||
IDictionary state = new Hashtable();
|
||||
inst.UseNewContext = true;
|
||||
try
|
||||
{
|
||||
if (undo)
|
||||
{
|
||||
inst.Uninstall(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
inst.Install(state);
|
||||
inst.Commit(state);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
inst.Rollback(state);
|
||||
}
|
||||
catch { }
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.Error.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,410 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using CassiniDev.ServerLog;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public class Connection : MarshalByRefObject
|
||||
{
|
||||
private const int HttpForbidden = 403;
|
||||
|
||||
private const int HttpOK = 200;
|
||||
|
||||
private readonly MemoryStream _responseContent;
|
||||
|
||||
private readonly Server _server;
|
||||
private LogInfo _requestLog;
|
||||
private LogInfo _responseLog;
|
||||
|
||||
private Socket _socket;
|
||||
|
||||
internal Connection(Server server, Socket socket)
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
_responseContent = new MemoryStream();
|
||||
_server = server;
|
||||
_socket = socket;
|
||||
InitializeLogInfo();
|
||||
}
|
||||
|
||||
public bool Connected
|
||||
{
|
||||
get { return _socket.Connected; }
|
||||
}
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
|
||||
public string LocalIP
|
||||
{
|
||||
get
|
||||
{
|
||||
IPEndPoint ep = (IPEndPoint) _socket.LocalEndPoint;
|
||||
return (ep != null && ep.Address != null) ? ep.Address.ToString() : "127.0.0.1";
|
||||
}
|
||||
}
|
||||
|
||||
public string RemoteIP
|
||||
{
|
||||
get
|
||||
{
|
||||
IPEndPoint ep = (IPEndPoint) _socket.RemoteEndPoint;
|
||||
return (ep != null && ep.Address != null) ? ep.Address.ToString() : "127.0.0.1";
|
||||
}
|
||||
}
|
||||
|
||||
public LogInfo RequestLog
|
||||
{
|
||||
get { return _requestLog; }
|
||||
}
|
||||
|
||||
public LogInfo ResponseLog
|
||||
{
|
||||
get { return _responseLog; }
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
FinalizeLogInfo();
|
||||
|
||||
try
|
||||
{
|
||||
_socket.Shutdown(SocketShutdown.Both);
|
||||
_socket.Close();
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
_socket = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public override object InitializeLifetimeService()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void LogRequest(string pathTranslated, string url)
|
||||
{
|
||||
_requestLog.PathTranslated = pathTranslated;
|
||||
|
||||
_requestLog.Url = url;
|
||||
}
|
||||
|
||||
public void LogRequestBody(byte[] content)
|
||||
{
|
||||
_requestLog.Body = content;
|
||||
}
|
||||
|
||||
public void LogRequestHeaders(string headers)
|
||||
{
|
||||
_requestLog.Headers = headers;
|
||||
}
|
||||
|
||||
public byte[] ReadRequestBytes(int maxBytes)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (WaitForRequestBytes() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int numBytes = _socket.Available;
|
||||
|
||||
if (numBytes > maxBytes)
|
||||
{
|
||||
numBytes = maxBytes;
|
||||
}
|
||||
|
||||
int numReceived = 0;
|
||||
|
||||
byte[] buffer = new byte[numBytes];
|
||||
|
||||
if (numBytes > 0)
|
||||
{
|
||||
numReceived = _socket.Receive(buffer, 0, numBytes, SocketFlags.None);
|
||||
}
|
||||
|
||||
if (numReceived < numBytes)
|
||||
{
|
||||
byte[] tempBuffer = new byte[numReceived];
|
||||
|
||||
if (numReceived > 0)
|
||||
{
|
||||
Buffer.BlockCopy(buffer, 0, tempBuffer, 0, numReceived);
|
||||
}
|
||||
|
||||
buffer = tempBuffer;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public int WaitForRequestBytes()
|
||||
{
|
||||
int availBytes = 0;
|
||||
|
||||
try
|
||||
{
|
||||
if (_socket.Available == 0)
|
||||
{
|
||||
_socket.Poll(100000, SelectMode.SelectRead);
|
||||
|
||||
if (_socket.Available == 0 && _socket.Connected)
|
||||
{
|
||||
_socket.Poll(30000000, SelectMode.SelectRead);
|
||||
}
|
||||
}
|
||||
|
||||
availBytes = _socket.Available;
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
}
|
||||
|
||||
return availBytes;
|
||||
}
|
||||
|
||||
public void Write100Continue()
|
||||
{
|
||||
WriteEntireResponseFromString(100, null, null, true);
|
||||
}
|
||||
|
||||
public void WriteBody(byte[] data, int offset, int length)
|
||||
{
|
||||
try
|
||||
{
|
||||
_responseContent.Write(data, 0, data.Length);
|
||||
_socket.Send(data, offset, length, SocketFlags.None);
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteEntireResponseFromFile(String fileName, bool keepAlive)
|
||||
{
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
WriteErrorAndClose(404);
|
||||
return;
|
||||
}
|
||||
|
||||
// Deny the request if the contentType cannot be recognized.
|
||||
|
||||
string contentType = Common.GetContentType(fileName);
|
||||
|
||||
//TODO: i am pretty sure this is unnecessary
|
||||
if (contentType == null)
|
||||
{
|
||||
WriteErrorAndClose(HttpForbidden);
|
||||
return;
|
||||
}
|
||||
|
||||
string contentTypeHeader = "Content-Type: " + contentType + "\r\n";
|
||||
|
||||
bool completed = false;
|
||||
FileStream fs = null;
|
||||
|
||||
try
|
||||
{
|
||||
fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
int len = (int) fs.Length;
|
||||
byte[] fileBytes = new byte[len];
|
||||
int bytesRead = fs.Read(fileBytes, 0, len);
|
||||
|
||||
String headers = MakeResponseHeaders(HttpOK, contentTypeHeader, bytesRead, keepAlive);
|
||||
_responseLog.Headers = headers;
|
||||
_responseLog.StatusCode = HttpOK;
|
||||
_socket.Send(Encoding.UTF8.GetBytes(headers));
|
||||
|
||||
_socket.Send(fileBytes, 0, bytesRead, SocketFlags.None);
|
||||
|
||||
completed = true;
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!keepAlive || !completed)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
if (fs != null)
|
||||
{
|
||||
fs.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteEntireResponseFromString(int statusCode, String extraHeaders, String body, bool keepAlive)
|
||||
{
|
||||
try
|
||||
{
|
||||
int bodyLength = (body != null) ? Encoding.UTF8.GetByteCount(body) : 0;
|
||||
string headers = MakeResponseHeaders(statusCode, extraHeaders, bodyLength, keepAlive);
|
||||
|
||||
_responseLog.Headers = headers;
|
||||
_responseLog.StatusCode = statusCode;
|
||||
_socket.Send(Encoding.UTF8.GetBytes(headers + body));
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!keepAlive)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteErrorAndClose(int statusCode, string message)
|
||||
{
|
||||
WriteEntireResponseFromString(statusCode, null, GetErrorResponseBody(statusCode, message), false);
|
||||
}
|
||||
|
||||
public void WriteErrorAndClose(int statusCode)
|
||||
{
|
||||
WriteErrorAndClose(statusCode, null);
|
||||
}
|
||||
|
||||
public void WriteErrorWithExtraHeadersAndKeepAlive(int statusCode, string extraHeaders)
|
||||
{
|
||||
WriteEntireResponseFromString(statusCode, extraHeaders, GetErrorResponseBody(statusCode, null), true);
|
||||
}
|
||||
|
||||
public void WriteHeaders(int statusCode, String extraHeaders)
|
||||
{
|
||||
string headers = MakeResponseHeaders(statusCode, extraHeaders, -1, false);
|
||||
|
||||
_responseLog.Headers = headers;
|
||||
_responseLog.StatusCode = statusCode;
|
||||
|
||||
try
|
||||
{
|
||||
_socket.Send(Encoding.UTF8.GetBytes(headers));
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void FinalizeLogInfo()
|
||||
{
|
||||
try
|
||||
{
|
||||
_responseLog.Body = _responseContent.ToArray();
|
||||
_responseContent.Dispose();
|
||||
_responseLog.Created = DateTime.Now;
|
||||
_responseLog.Url = _requestLog.Url;
|
||||
_responseLog.PathTranslated = _requestLog.PathTranslated;
|
||||
_responseLog.Identity = _requestLog.Identity;
|
||||
_responseLog.PhysicalPath = _requestLog.PhysicalPath;
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
// log error to text
|
||||
}
|
||||
}
|
||||
|
||||
private string GetErrorResponseBody(int statusCode, string message)
|
||||
{
|
||||
string body = Messages.FormatErrorMessageBody(statusCode, _server.VirtualPath);
|
||||
|
||||
if (!string.IsNullOrEmpty(message))
|
||||
{
|
||||
body += "\r\n<!--\r\n" + message + "\r\n-->";
|
||||
}
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
private void InitializeLogInfo()
|
||||
{
|
||||
_requestLog = new LogInfo
|
||||
{
|
||||
Created = DateTime.Now,
|
||||
ConversationId = Id,
|
||||
RowType = 1,
|
||||
Identity = _server.GetProcessUser(),
|
||||
PhysicalPath = _server.PhysicalPath
|
||||
};
|
||||
|
||||
_responseLog = new LogInfo
|
||||
{
|
||||
ConversationId = Id,
|
||||
RowType = 2
|
||||
};
|
||||
}
|
||||
|
||||
private static string MakeResponseHeaders(int statusCode, string moreHeaders, int contentLength, bool keepAlive)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append("HTTP/1.1 " + statusCode + " " + HttpWorkerRequest.GetStatusDescription(statusCode) + "\r\n");
|
||||
sb.Append("Server: Cassini/" + Messages.VersionString + "\r\n");
|
||||
sb.Append("Date: " + DateTime.Now.ToUniversalTime().ToString("R", DateTimeFormatInfo.InvariantInfo) + "\r\n");
|
||||
|
||||
if (contentLength >= 0)
|
||||
{
|
||||
sb.Append("Content-Length: " + contentLength + "\r\n");
|
||||
}
|
||||
|
||||
if (moreHeaders != null)
|
||||
{
|
||||
sb.Append(moreHeaders);
|
||||
}
|
||||
|
||||
if (!keepAlive)
|
||||
{
|
||||
sb.Append("Connection: Close\r\n");
|
||||
}
|
||||
|
||||
sb.Append("\r\n");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,296 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Security.Permissions;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
/// <summary>
|
||||
/// 01/01/10 sky: added HttpRuntime.Close to IRegisteredObject.Stop to eliminate
|
||||
/// System.AppDomainUnloadedException when running tests in NUnit GuiRunner.
|
||||
/// reference: http://stackoverflow.com/questions/561402/cassini-webserver-webdev-nunit-and-appdomainunloadedexception
|
||||
/// need to test thoroughly but seems to work just fine with no ill effects
|
||||
/// 01.03.10 sky: removed the HttpRuntime.Close because, even though it tests fine, I am not entirely certain it is in the right place
|
||||
/// and since I am no longer recommending that the server be used as a library in testing (run a console instance in a new process).
|
||||
///
|
||||
/// </summary>
|
||||
internal class Host : MarshalByRefObject, IRegisteredObject
|
||||
{
|
||||
private bool _disableDirectoryListing;
|
||||
|
||||
private string _installPath;
|
||||
|
||||
private string _lowerCasedClientScriptPathWithTrailingSlash;
|
||||
|
||||
private string _lowerCasedVirtualPath;
|
||||
|
||||
private string _lowerCasedVirtualPathWithTrailingSlash;
|
||||
|
||||
private volatile int _pendingCallsCount;
|
||||
|
||||
private string _physicalClientScriptPath;
|
||||
|
||||
private string _physicalPath;
|
||||
|
||||
private int _port;
|
||||
|
||||
private bool _requireAuthentication;
|
||||
|
||||
private Server _server;
|
||||
|
||||
private string _virtualPath;
|
||||
|
||||
public Host()
|
||||
{
|
||||
HostingEnvironment.RegisterObject(this);
|
||||
}
|
||||
|
||||
public bool DisableDirectoryListing
|
||||
{
|
||||
get { return _disableDirectoryListing; }
|
||||
}
|
||||
|
||||
public string InstallPath
|
||||
{
|
||||
get { return _installPath; }
|
||||
}
|
||||
|
||||
public string NormalizedClientScriptPath
|
||||
{
|
||||
get { return _lowerCasedClientScriptPathWithTrailingSlash; }
|
||||
}
|
||||
|
||||
public string NormalizedVirtualPath
|
||||
{
|
||||
get { return _lowerCasedVirtualPathWithTrailingSlash; }
|
||||
}
|
||||
|
||||
public string PhysicalClientScriptPath
|
||||
{
|
||||
get { return _physicalClientScriptPath; }
|
||||
}
|
||||
|
||||
public string PhysicalPath
|
||||
{
|
||||
get { return _physicalPath; }
|
||||
}
|
||||
|
||||
public int Port
|
||||
{
|
||||
get { return _port; }
|
||||
}
|
||||
|
||||
public bool RequireAuthentication
|
||||
{
|
||||
get { return _requireAuthentication; }
|
||||
}
|
||||
|
||||
public string VirtualPath
|
||||
{
|
||||
get { return _virtualPath; }
|
||||
}
|
||||
|
||||
#region IRegisteredObject Members
|
||||
|
||||
void IRegisteredObject.Stop(bool immediate)
|
||||
{
|
||||
// Unhook the Host so Server will process the requests in the new appdomain.
|
||||
|
||||
if (_server != null)
|
||||
{
|
||||
_server.HostStopped();
|
||||
}
|
||||
|
||||
// Make sure all the pending calls complete before this Object is unregistered.
|
||||
WaitForPendingCallsToFinish();
|
||||
|
||||
HostingEnvironment.UnregisterObject(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void Configure(Server server, int port, string virtualPath, string physicalPath,
|
||||
bool requireAuthentication)
|
||||
{
|
||||
Configure(server, port, virtualPath, physicalPath, requireAuthentication, false);
|
||||
}
|
||||
|
||||
public void Configure(Server server, int port, string virtualPath, string physicalPath)
|
||||
{
|
||||
Configure(server, port, virtualPath, physicalPath, false, false);
|
||||
}
|
||||
|
||||
public void Configure(Server server, int port, string virtualPath, string physicalPath,
|
||||
bool requireAuthentication, bool disableDirectoryListing)
|
||||
{
|
||||
_server = server;
|
||||
|
||||
_port = port;
|
||||
_installPath = null;
|
||||
_virtualPath = virtualPath;
|
||||
_requireAuthentication = requireAuthentication;
|
||||
_disableDirectoryListing = disableDirectoryListing;
|
||||
_lowerCasedVirtualPath = CultureInfo.InvariantCulture.TextInfo.ToLower(_virtualPath);
|
||||
_lowerCasedVirtualPathWithTrailingSlash = virtualPath.EndsWith("/", StringComparison.Ordinal)
|
||||
? virtualPath
|
||||
: virtualPath + "/";
|
||||
_lowerCasedVirtualPathWithTrailingSlash =
|
||||
CultureInfo.InvariantCulture.TextInfo.ToLower(_lowerCasedVirtualPathWithTrailingSlash);
|
||||
_physicalPath = physicalPath;
|
||||
_physicalClientScriptPath = HttpRuntime.AspClientScriptPhysicalPath + "\\";
|
||||
_lowerCasedClientScriptPathWithTrailingSlash =
|
||||
CultureInfo.InvariantCulture.TextInfo.ToLower(HttpRuntime.AspClientScriptVirtualPath + "/");
|
||||
}
|
||||
|
||||
public SecurityIdentifier GetProcessSid()
|
||||
{
|
||||
using (WindowsIdentity identity = new WindowsIdentity(_server.GetProcessToken()))
|
||||
{
|
||||
return identity.User;
|
||||
}
|
||||
}
|
||||
|
||||
public IntPtr GetProcessToken()
|
||||
{
|
||||
new SecurityPermission(PermissionState.Unrestricted).Assert();
|
||||
return _server.GetProcessToken();
|
||||
}
|
||||
|
||||
public string GetProcessUser()
|
||||
{
|
||||
return _server.GetProcessUser();
|
||||
}
|
||||
|
||||
public override object InitializeLifetimeService()
|
||||
{
|
||||
// never expire the license
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool IsVirtualPathAppPath(string path)
|
||||
{
|
||||
if (path == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
path = CultureInfo.InvariantCulture.TextInfo.ToLower(path);
|
||||
return (path == _lowerCasedVirtualPath || path == _lowerCasedVirtualPathWithTrailingSlash);
|
||||
}
|
||||
|
||||
public bool IsVirtualPathInApp(string path, out bool isClientScriptPath)
|
||||
{
|
||||
isClientScriptPath = false;
|
||||
|
||||
if (path == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_virtualPath == "/" && path.StartsWith("/", StringComparison.Ordinal))
|
||||
{
|
||||
if (path.StartsWith(_lowerCasedClientScriptPathWithTrailingSlash, StringComparison.Ordinal))
|
||||
{
|
||||
isClientScriptPath = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
path = CultureInfo.InvariantCulture.TextInfo.ToLower(path);
|
||||
|
||||
if (path.StartsWith(_lowerCasedVirtualPathWithTrailingSlash, StringComparison.Ordinal))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (path == _lowerCasedVirtualPath)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (path.StartsWith(_lowerCasedClientScriptPathWithTrailingSlash, StringComparison.Ordinal))
|
||||
{
|
||||
isClientScriptPath = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsVirtualPathInApp(String path)
|
||||
{
|
||||
bool isClientScriptPath;
|
||||
return IsVirtualPathInApp(path, out isClientScriptPath);
|
||||
}
|
||||
|
||||
public void ProcessRequest(Connection conn)
|
||||
{
|
||||
// Add a pending call to make sure our thread doesn't get killed
|
||||
AddPendingCall();
|
||||
|
||||
try
|
||||
{
|
||||
new Request(_server, this, conn).Process();
|
||||
}
|
||||
finally
|
||||
{
|
||||
RemovePendingCall();
|
||||
}
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.Assert, Unrestricted = true)]
|
||||
public void Shutdown()
|
||||
{
|
||||
HostingEnvironment.InitiateShutdown();
|
||||
}
|
||||
|
||||
private void AddPendingCall()
|
||||
{
|
||||
//TODO: investigate this issue - ref var not volitile
|
||||
#pragma warning disable 0420
|
||||
Interlocked.Increment(ref _pendingCallsCount);
|
||||
#pragma warning restore 0420
|
||||
}
|
||||
|
||||
private void RemovePendingCall()
|
||||
{
|
||||
//TODO: investigate this issue - ref var not volitile
|
||||
#pragma warning disable 0420
|
||||
Interlocked.Decrement(ref _pendingCallsCount);
|
||||
#pragma warning restore 0420
|
||||
}
|
||||
|
||||
private void WaitForPendingCallsToFinish()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
if (_pendingCallsCount <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Thread.Sleep(250);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
/// <summary>
|
||||
/// TODO: get this into resources
|
||||
/// </summary>
|
||||
internal static class Messages
|
||||
{
|
||||
private const string _dirListingDirFormat =
|
||||
@"{0,38:dddd, MMMM dd, yyyy hh:mm tt} <dir> <A href=""{1}/"">{2}</A>
|
||||
";
|
||||
|
||||
private const string _dirListingFileFormat =
|
||||
@"{0,38:dddd, MMMM dd, yyyy hh:mm tt} {1,12:n0} <A href=""{2}"">{3}</A>
|
||||
";
|
||||
|
||||
private const string _dirListingFormat1 =
|
||||
@"<html>
|
||||
<head>
|
||||
<title>Directory Listing -- {0}</title>
|
||||
";
|
||||
|
||||
private const string _dirListingFormat2 =
|
||||
@" </head>
|
||||
<body bgcolor=""white"">
|
||||
|
||||
<h2> <i>Directory Listing -- {0}</i> </h2></span>
|
||||
|
||||
<hr width=100% size=1 color=silver>
|
||||
|
||||
<PRE>
|
||||
";
|
||||
|
||||
private const string _dirListingParentFormat =
|
||||
@"<A href=""{0}"">[To Parent Directory]</A>
|
||||
|
||||
";
|
||||
|
||||
private const string _httpErrorFormat1 =
|
||||
@"<html>
|
||||
<head>
|
||||
<title>{0}</title>
|
||||
";
|
||||
|
||||
private const string _httpStyle =
|
||||
@" <style>
|
||||
body {font-family:""Verdana"";font-weight:normal;font-size: 8pt;color:black;}
|
||||
p {font-family:""Verdana"";font-weight:normal;color:black;margin-top: -5px}
|
||||
b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}
|
||||
h1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }
|
||||
h2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }
|
||||
pre {font-family:""Lucida Console"";font-size: 8pt}
|
||||
.marker {font-weight: bold; color: black;text-decoration: none;}
|
||||
.version {color: gray;}
|
||||
.error {margin-bottom: 10px;}
|
||||
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
|
||||
</style>
|
||||
";
|
||||
|
||||
private static readonly string _dirListingTail =
|
||||
@"</PRE>
|
||||
<hr width=100% size=1 color=silver>
|
||||
|
||||
<b>Version Information:</b> Cassini Web Server " +
|
||||
VersionString + @"
|
||||
|
||||
</font>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
";
|
||||
|
||||
private static readonly string _httpErrorFormat2 =
|
||||
@" </head>
|
||||
<body bgcolor=""white"">
|
||||
|
||||
<span><h1>Server Error in '{0}' Application.<hr width=100% size=1 color=silver></h1>
|
||||
|
||||
<h2> <i>HTTP Error {1} - {2}.</i> </h2></span>
|
||||
|
||||
<hr width=100% size=1 color=silver>
|
||||
|
||||
<b>Version Information:</b> Cassini Web Server " +
|
||||
VersionString + @"
|
||||
|
||||
</font>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
";
|
||||
|
||||
public static string VersionString = typeof (Server).Assembly.GetName().Version.ToString();
|
||||
|
||||
public static string FormatDirectoryListing(string dirPath, string parentPath, FileSystemInfo[] elements)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append(string.Format(_dirListingFormat1, dirPath));
|
||||
sb.Append(_httpStyle);
|
||||
sb.Append(string.Format(_dirListingFormat2, dirPath));
|
||||
|
||||
if (parentPath != null)
|
||||
{
|
||||
if (!parentPath.EndsWith("/"))
|
||||
{
|
||||
parentPath += "/";
|
||||
}
|
||||
|
||||
sb.Append(string.Format(_dirListingParentFormat, parentPath));
|
||||
}
|
||||
|
||||
if (elements != null)
|
||||
{
|
||||
for (int i = 0; i < elements.Length; i++)
|
||||
{
|
||||
if (elements[i] is FileInfo)
|
||||
{
|
||||
FileInfo fi = (FileInfo) elements[i];
|
||||
sb.Append(string.Format(_dirListingFileFormat,
|
||||
fi.LastWriteTime, fi.Length, fi.Name, fi.Name));
|
||||
}
|
||||
else if (elements[i] is DirectoryInfo)
|
||||
{
|
||||
DirectoryInfo di = (DirectoryInfo) elements[i];
|
||||
sb.Append(string.Format(_dirListingDirFormat,
|
||||
di.LastWriteTime, di.Name, di.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sb.Append(_dirListingTail);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static string FormatErrorMessageBody(int statusCode, string appName)
|
||||
{
|
||||
string desc = HttpWorkerRequest.GetStatusDescription(statusCode);
|
||||
|
||||
return string.Format(_httpErrorFormat1, desc)
|
||||
+ _httpStyle
|
||||
+ string.Format(_httpErrorFormat2, appName, statusCode, desc);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,179 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Security;
|
||||
using System.Security.Principal;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
internal sealed class NtlmAuth : IDisposable
|
||||
{
|
||||
private readonly bool _credentialsHandleAcquired;
|
||||
|
||||
private string _blob;
|
||||
|
||||
private bool _completed;
|
||||
|
||||
private Interop.SecHandle _credentialsHandle;
|
||||
|
||||
private Interop.SecBuffer _inputBuffer;
|
||||
private Interop.SecBufferDesc _inputBufferDesc;
|
||||
|
||||
private Interop.SecBuffer _outputBuffer;
|
||||
|
||||
private Interop.SecBufferDesc _outputBufferDesc;
|
||||
|
||||
private Interop.SecHandle _securityContext;
|
||||
|
||||
private bool _securityContextAcquired;
|
||||
|
||||
private uint _securityContextAttributes;
|
||||
|
||||
private SecurityIdentifier _sid;
|
||||
|
||||
private long _timestamp;
|
||||
|
||||
public NtlmAuth()
|
||||
{
|
||||
if (
|
||||
Interop.AcquireCredentialsHandle(null, "NTLM", 1, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero,
|
||||
ref _credentialsHandle, ref _timestamp) != 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
_credentialsHandleAcquired = true;
|
||||
}
|
||||
|
||||
public string Blob
|
||||
{
|
||||
get { return _blob; }
|
||||
}
|
||||
|
||||
public bool Completed
|
||||
{
|
||||
get { return _completed; }
|
||||
}
|
||||
|
||||
public SecurityIdentifier SID
|
||||
{
|
||||
get { return _sid; }
|
||||
}
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
FreeUnmanagedResources();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public unsafe bool Authenticate(string blobString)
|
||||
{
|
||||
_blob = null;
|
||||
byte[] buffer = Convert.FromBase64String(blobString);
|
||||
byte[] inArray = new byte[0x4000];
|
||||
fixed (void* ptrRef = &_securityContext)
|
||||
{
|
||||
fixed (void* ptrRef2 = &_inputBuffer)
|
||||
{
|
||||
fixed (void* ptrRef3 = &_outputBuffer)
|
||||
{
|
||||
fixed (void* ptrRef4 = buffer)
|
||||
{
|
||||
fixed (void* ptrRef5 = inArray)
|
||||
{
|
||||
IntPtr zero = IntPtr.Zero;
|
||||
if (_securityContextAcquired)
|
||||
{
|
||||
zero = (IntPtr) ptrRef;
|
||||
}
|
||||
_inputBufferDesc.ulVersion = 0;
|
||||
_inputBufferDesc.cBuffers = 1;
|
||||
_inputBufferDesc.pBuffers = (IntPtr) ptrRef2;
|
||||
_inputBuffer.cbBuffer = (uint) buffer.Length;
|
||||
_inputBuffer.BufferType = 2;
|
||||
_inputBuffer.pvBuffer = (IntPtr) ptrRef4;
|
||||
_outputBufferDesc.ulVersion = 0;
|
||||
_outputBufferDesc.cBuffers = 1;
|
||||
_outputBufferDesc.pBuffers = (IntPtr) ptrRef3;
|
||||
_outputBuffer.cbBuffer = (uint) inArray.Length;
|
||||
_outputBuffer.BufferType = 2;
|
||||
_outputBuffer.pvBuffer = (IntPtr) ptrRef5;
|
||||
int num = Interop.AcceptSecurityContext(ref _credentialsHandle, zero,
|
||||
ref _inputBufferDesc, 20,
|
||||
0, ref _securityContext, ref _outputBufferDesc,
|
||||
ref _securityContextAttributes, ref _timestamp);
|
||||
if (num == 0x90312)
|
||||
{
|
||||
_securityContextAcquired = true;
|
||||
_blob = Convert.ToBase64String(inArray, 0, (int) _outputBuffer.cbBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
IntPtr phToken = IntPtr.Zero;
|
||||
if (Interop.QuerySecurityContextToken(ref _securityContext, ref phToken) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
try
|
||||
{
|
||||
using (WindowsIdentity identity = new WindowsIdentity(phToken))
|
||||
{
|
||||
_sid = identity.User;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Interop.CloseHandle(phToken);
|
||||
}
|
||||
_completed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
~NtlmAuth()
|
||||
{
|
||||
FreeUnmanagedResources();
|
||||
}
|
||||
|
||||
private void FreeUnmanagedResources()
|
||||
{
|
||||
if (_securityContextAcquired)
|
||||
{
|
||||
Interop.DeleteSecurityContext(ref _securityContext);
|
||||
}
|
||||
if (_credentialsHandleAcquired)
|
||||
{
|
||||
Interop.FreeCredentialsHandle(ref _credentialsHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using CassiniDev.ServerLog;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public class RequestEventArgs : EventArgs
|
||||
{
|
||||
private readonly Guid _id;
|
||||
|
||||
private readonly LogInfo _requestLog;
|
||||
|
||||
private readonly LogInfo _responseLog;
|
||||
|
||||
public RequestEventArgs(Guid id, LogInfo requestLog, LogInfo responseLog)
|
||||
{
|
||||
_requestLog = requestLog;
|
||||
_responseLog = responseLog;
|
||||
_id = id;
|
||||
}
|
||||
|
||||
public Guid Id
|
||||
{
|
||||
get { return _id; }
|
||||
}
|
||||
|
||||
public LogInfo RequestLog
|
||||
{
|
||||
get { return _requestLog; }
|
||||
}
|
||||
|
||||
public LogInfo ResponseLog
|
||||
{
|
||||
get { return _responseLog; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,523 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Security.Permissions;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using CassiniDev.ServerLog;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
[PermissionSet(SecurityAction.LinkDemand, Name = "Everything"),
|
||||
PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
|
||||
public class Server : MarshalByRefObject, IDisposable
|
||||
{
|
||||
private readonly ApplicationManager _appManager;
|
||||
|
||||
private readonly bool _disableDirectoryListing;
|
||||
|
||||
private readonly string _hostName;
|
||||
|
||||
private readonly IPAddress _ipAddress;
|
||||
|
||||
private readonly object _lockObject;
|
||||
|
||||
private readonly string _physicalPath;
|
||||
|
||||
private readonly int _port;
|
||||
private readonly bool _requireAuthentication;
|
||||
private readonly int _timeoutInterval;
|
||||
private readonly string _virtualPath;
|
||||
private bool _disposed;
|
||||
|
||||
private Host _host;
|
||||
|
||||
private IntPtr _processToken;
|
||||
|
||||
private string _processUser;
|
||||
|
||||
private int _requestCount;
|
||||
|
||||
private bool _shutdownInProgress;
|
||||
|
||||
private Socket _socket;
|
||||
|
||||
private Timer _timer;
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath)
|
||||
: this(port, virtualPath, physicalPath, false, false)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(int port, string physicalPath)
|
||||
: this(port, "/", physicalPath, IPAddress.Loopback)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(string physicalPath)
|
||||
: this(CassiniNetworkUtils.GetAvailablePort(32768, 65535, IPAddress.Loopback, false), physicalPath)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath, IPAddress ipAddress, string hostName,
|
||||
int timeout, bool requireAuthentication)
|
||||
: this(port, virtualPath, physicalPath, ipAddress, hostName, timeout, requireAuthentication, false)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath, bool requireAuthentication)
|
||||
: this(port, virtualPath, physicalPath, requireAuthentication, false)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath, IPAddress ipAddress, string hostName)
|
||||
: this(port, virtualPath, physicalPath, ipAddress, hostName, 0, false, false)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath, IPAddress ipAddress, string hostName,
|
||||
int timeout, bool requireAuthentication, bool disableDirectoryListing)
|
||||
: this(port, virtualPath, physicalPath, requireAuthentication, disableDirectoryListing)
|
||||
{
|
||||
_ipAddress = ipAddress;
|
||||
_hostName = hostName;
|
||||
_timeoutInterval = timeout;
|
||||
}
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath, IPAddress ipAddress)
|
||||
: this(port, virtualPath, physicalPath, ipAddress, null, 0, false, false)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath, bool requireAuthentication,
|
||||
bool disableDirectoryListing)
|
||||
{
|
||||
_ipAddress = IPAddress.Loopback;
|
||||
_requireAuthentication = requireAuthentication;
|
||||
_disableDirectoryListing = disableDirectoryListing;
|
||||
_lockObject = new object();
|
||||
_port = port;
|
||||
_virtualPath = virtualPath;
|
||||
_physicalPath = Path.GetFullPath(physicalPath);
|
||||
_physicalPath = _physicalPath.EndsWith("\\", StringComparison.Ordinal)
|
||||
? _physicalPath
|
||||
: _physicalPath + "\\";
|
||||
_appManager = ApplicationManager.GetApplicationManager();
|
||||
ObtainProcessToken();
|
||||
}
|
||||
|
||||
public Server(string physicalPath, bool requireAuthentication)
|
||||
: this(
|
||||
CassiniNetworkUtils.GetAvailablePort(32768, 65535, IPAddress.Loopback, false), "/", physicalPath,
|
||||
requireAuthentication)
|
||||
{
|
||||
}
|
||||
|
||||
public Server(int port, string virtualPath, string physicalPath, IPAddress ipAddress, string hostName,
|
||||
int timeout)
|
||||
: this(port, virtualPath, physicalPath, ipAddress, hostName, timeout, false, false)
|
||||
{
|
||||
}
|
||||
|
||||
public bool DisableDirectoryListing
|
||||
{
|
||||
get { return _disableDirectoryListing; }
|
||||
}
|
||||
|
||||
public bool RequireAuthentication
|
||||
{
|
||||
get { return _requireAuthentication; }
|
||||
}
|
||||
|
||||
public int TimeoutInterval
|
||||
{
|
||||
get { return _timeoutInterval; }
|
||||
}
|
||||
|
||||
public string HostName
|
||||
{
|
||||
get { return _hostName; }
|
||||
}
|
||||
|
||||
public IPAddress IPAddress
|
||||
{
|
||||
get { return _ipAddress; }
|
||||
}
|
||||
|
||||
public string PhysicalPath
|
||||
{
|
||||
get { return _physicalPath; }
|
||||
}
|
||||
|
||||
public int Port
|
||||
{
|
||||
get { return _port; }
|
||||
}
|
||||
|
||||
public string RootUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
string hostname = _hostName;
|
||||
if (string.IsNullOrEmpty(_hostName))
|
||||
{
|
||||
if (_ipAddress.Equals(IPAddress.Loopback) || _ipAddress.Equals(IPAddress.IPv6Loopback) ||
|
||||
_ipAddress.Equals(IPAddress.Any) || _ipAddress.Equals(IPAddress.IPv6Any))
|
||||
{
|
||||
hostname = "localhost";
|
||||
}
|
||||
else
|
||||
{
|
||||
hostname = _ipAddress.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
return _port != 80
|
||||
?
|
||||
String.Format("http://{0}:{1}{2}", hostname, _port, _virtualPath)
|
||||
:
|
||||
//FIX: #12017 - TODO:TEST
|
||||
string.Format("http://{0}{1}", hostname, _virtualPath);
|
||||
}
|
||||
}
|
||||
|
||||
public string VirtualPath
|
||||
{
|
||||
get { return _virtualPath; }
|
||||
}
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
ShutDown();
|
||||
}
|
||||
_disposed = true;
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public event EventHandler<RequestEventArgs> RequestComplete;
|
||||
|
||||
public event EventHandler TimedOut;
|
||||
|
||||
public IntPtr GetProcessToken()
|
||||
{
|
||||
return _processToken;
|
||||
}
|
||||
|
||||
public string GetProcessUser()
|
||||
{
|
||||
return _processUser;
|
||||
}
|
||||
|
||||
public void HostStopped()
|
||||
{
|
||||
_host = null;
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
|
||||
public override object InitializeLifetimeService()
|
||||
{
|
||||
// never expire the license
|
||||
return null;
|
||||
}
|
||||
|
||||
// called at the end of request processing
|
||||
// to disconnect the remoting proxy for Connection object
|
||||
// and allow GC to pick it up
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="conn"></param>
|
||||
public void OnRequestEnd(Connection conn)
|
||||
{
|
||||
try
|
||||
{
|
||||
OnRequestComplete(conn.Id, conn.RequestLog.Clone(), conn.ResponseLog.Clone());
|
||||
}
|
||||
catch
|
||||
{
|
||||
// swallow - we don't want consumer killing the server
|
||||
}
|
||||
RemotingServices.Disconnect(conn);
|
||||
DecrementRequestCount();
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
_socket = CreateSocketBindAndListen(AddressFamily.InterNetwork, _ipAddress, _port);
|
||||
|
||||
//start the timer
|
||||
DecrementRequestCount();
|
||||
|
||||
ThreadPool.QueueUserWorkItem(delegate
|
||||
{
|
||||
while (!_shutdownInProgress)
|
||||
{
|
||||
try
|
||||
{
|
||||
Socket acceptedSocket = _socket.Accept();
|
||||
|
||||
ThreadPool.QueueUserWorkItem(delegate
|
||||
{
|
||||
if (!_shutdownInProgress)
|
||||
{
|
||||
Connection conn = new Connection(this, acceptedSocket);
|
||||
|
||||
if (conn.WaitForRequestBytes() == 0)
|
||||
{
|
||||
conn.WriteErrorAndClose(400);
|
||||
return;
|
||||
}
|
||||
|
||||
Host host = GetHost();
|
||||
|
||||
if (host == null)
|
||||
{
|
||||
conn.WriteErrorAndClose(500);
|
||||
return;
|
||||
}
|
||||
|
||||
IncrementRequestCount();
|
||||
host.ProcessRequest(conn);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
~Server()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
|
||||
private static Socket CreateSocketBindAndListen(AddressFamily family, IPAddress address, int port)
|
||||
{
|
||||
Socket socket = new Socket(family, SocketType.Stream, ProtocolType.Tcp);
|
||||
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
|
||||
socket.Bind(new IPEndPoint(address, port));
|
||||
socket.Listen((int) SocketOptionName.MaxConnections);
|
||||
return socket;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="virtualPath"></param>
|
||||
/// <param name="physicalPath"></param>
|
||||
/// <param name="hostType"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>This is Dmitry's hack to enable running outside of GAC</remarks>
|
||||
private object CreateWorkerAppDomainWithHost(string virtualPath, string physicalPath, Type hostType)
|
||||
{
|
||||
// this creates worker app domain in a way that host doesn't need to be in GAC or bin
|
||||
// using BuildManagerHost via private reflection
|
||||
string uniqueAppString = string.Concat(virtualPath, physicalPath).ToLowerInvariant();
|
||||
string appId = (uniqueAppString.GetHashCode()).ToString("x", CultureInfo.InvariantCulture);
|
||||
|
||||
// create BuildManagerHost in the worker app domain
|
||||
//ApplicationManager appManager = ApplicationManager.GetApplicationManager();
|
||||
Type buildManagerHostType = typeof (HttpRuntime).Assembly.GetType("System.Web.Compilation.BuildManagerHost");
|
||||
IRegisteredObject buildManagerHost = _appManager.CreateObject(appId, buildManagerHostType, virtualPath,
|
||||
physicalPath, false);
|
||||
|
||||
// call BuildManagerHost.RegisterAssembly to make Host type loadable in the worker app domain
|
||||
buildManagerHostType.InvokeMember("RegisterAssembly",
|
||||
BindingFlags.Instance | BindingFlags.InvokeMethod | BindingFlags.NonPublic,
|
||||
null,
|
||||
buildManagerHost,
|
||||
new object[] {hostType.Assembly.FullName, hostType.Assembly.Location});
|
||||
|
||||
// create Host in the worker app domain
|
||||
return _appManager.CreateObject(appId, hostType, virtualPath, physicalPath, false);
|
||||
}
|
||||
|
||||
private void DecrementRequestCount()
|
||||
{
|
||||
_requestCount--;
|
||||
|
||||
if (_requestCount < 1)
|
||||
{
|
||||
_requestCount = 0;
|
||||
|
||||
if (_timeoutInterval > 0)
|
||||
{
|
||||
_timer = new Timer(TimeOut, null, _timeoutInterval, Timeout.Infinite);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Host GetHost()
|
||||
{
|
||||
if (_shutdownInProgress)
|
||||
return null;
|
||||
Host host = _host;
|
||||
if (host == null)
|
||||
{
|
||||
#if NET40
|
||||
object obj2 = new object();
|
||||
bool flag = false;
|
||||
try
|
||||
{
|
||||
Monitor.Enter(obj2 = _lockObject, ref flag);
|
||||
host = _host;
|
||||
if (host == null)
|
||||
{
|
||||
host = (Host)CreateWorkerAppDomainWithHost(_virtualPath, _physicalPath, typeof(Host));
|
||||
host.Configure(this, _port, _virtualPath, _physicalPath, _requireAuthentication, _disableDirectoryListing);
|
||||
_host = host;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
Monitor.Exit(obj2);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
lock (_lockObject)
|
||||
{
|
||||
host = _host;
|
||||
if (host == null)
|
||||
{
|
||||
host = (Host) CreateWorkerAppDomainWithHost(_virtualPath, _physicalPath, typeof (Host));
|
||||
host.Configure(this, _port, _virtualPath, _physicalPath, _requireAuthentication,
|
||||
_disableDirectoryListing);
|
||||
_host = host;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
return host;
|
||||
}
|
||||
|
||||
private void IncrementRequestCount()
|
||||
{
|
||||
_requestCount++;
|
||||
_timer = null;
|
||||
}
|
||||
|
||||
|
||||
private void ObtainProcessToken()
|
||||
{
|
||||
if (Interop.ImpersonateSelf(2))
|
||||
{
|
||||
Interop.OpenThreadToken(Interop.GetCurrentThread(), 0xf01ff, true, ref _processToken);
|
||||
Interop.RevertToSelf();
|
||||
// ReSharper disable PossibleNullReferenceException
|
||||
_processUser = WindowsIdentity.GetCurrent().Name;
|
||||
// ReSharper restore PossibleNullReferenceException
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRequestComplete(Guid id, LogInfo requestLog, LogInfo responseLog)
|
||||
{
|
||||
EventHandler<RequestEventArgs> complete = RequestComplete;
|
||||
|
||||
if (complete != null)
|
||||
{
|
||||
complete(this, new RequestEventArgs(id, requestLog, responseLog));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ShutDown()
|
||||
{
|
||||
_shutdownInProgress = true;
|
||||
|
||||
try
|
||||
{
|
||||
if (_socket != null)
|
||||
{
|
||||
_socket.Close();
|
||||
}
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
_socket = null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (_host != null)
|
||||
{
|
||||
_host.Shutdown();
|
||||
}
|
||||
|
||||
while (_host != null)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
_host = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void TimeOut(object ignored)
|
||||
{
|
||||
TimeOut();
|
||||
}
|
||||
|
||||
public void TimeOut()
|
||||
{
|
||||
ShutDown();
|
||||
OnTimeOut();
|
||||
}
|
||||
|
||||
private void OnTimeOut()
|
||||
{
|
||||
EventHandler handler = TimedOut;
|
||||
if (handler != null) handler(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev.ServerLog
|
||||
{
|
||||
/// <summary>
|
||||
/// TODO: get rid of status code and url in the database and simply parse the headers
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class LogInfo : ICloneable
|
||||
{
|
||||
public byte[] Body { get; set; }
|
||||
|
||||
public Guid ConversationId { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
public string Exception { get; set; }
|
||||
|
||||
public string Headers { get; set; }
|
||||
|
||||
public string Identity { get; set; }
|
||||
|
||||
public string PathTranslated { get; set; }
|
||||
|
||||
public string PhysicalPath { get; set; }
|
||||
|
||||
public long RowId { get; set; }
|
||||
|
||||
public long RowType { get; set; }
|
||||
|
||||
public long? StatusCode { get; set; }
|
||||
|
||||
public string Url { get; set; }
|
||||
|
||||
#region ICloneable Members
|
||||
|
||||
object ICloneable.Clone()
|
||||
{
|
||||
return MemberwiseClone();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public LogInfo Clone()
|
||||
{
|
||||
LogInfo result = (LogInfo) ((ICloneable) this).Clone();
|
||||
if (Body != null)
|
||||
{
|
||||
result.Body = new byte[Body.Length];
|
||||
Body.CopyTo(result.Body, 0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev.UIComponents
|
||||
{
|
||||
public sealed class CommandLine
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly string[] _arguments;
|
||||
|
||||
private readonly bool _showHelp;
|
||||
private IDictionary _options;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public CommandLine(string[] args)
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
char ch = args[i][0];
|
||||
if ((ch != '/') && (ch != '-'))
|
||||
{
|
||||
list.Add(args[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
int index = args[i].IndexOf(':');
|
||||
if (index == -1)
|
||||
{
|
||||
string strA = args[i].Substring(1);
|
||||
if ((string.Compare(strA, "help", StringComparison.OrdinalIgnoreCase) == 0) || strA.Equals("?"))
|
||||
{
|
||||
_showHelp = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Options[strA] = string.Empty;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Options[args[i].Substring(1, index - 1)] = args[i].Substring(index + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
_arguments = (string[]) list.ToArray(typeof (string));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public string[] Arguments
|
||||
{
|
||||
get { return _arguments; }
|
||||
}
|
||||
|
||||
public IDictionary Options
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_options == null)
|
||||
{
|
||||
_options = new HybridDictionary(true);
|
||||
}
|
||||
return _options;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowHelp
|
||||
{
|
||||
get { return _showHelp; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,443 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
/// <summary>
|
||||
/// Command line arguments
|
||||
///
|
||||
/// fixed 5/24/10 - quoted embedded spaces in ToString
|
||||
/// </summary>
|
||||
public class CommandLineArguments
|
||||
{
|
||||
#region Properties
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "ah", DefaultValue = false,
|
||||
HelpText = "If true add entry to Windows hosts file. Requires write permissions to hosts file.")] public
|
||||
bool AddHost;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "a", LongName = "path",
|
||||
HelpText = "Physical location of content.")] public string
|
||||
ApplicationPath;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, LongName = "log", DefaultValue = false, HelpText = "Enable logging.")] public
|
||||
bool EnableLogging;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "h", LongName = "host",
|
||||
HelpText = "Host name used for app root url. Optional unless AddHost is true.")] public string HostName;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "i", LongName = "ip",
|
||||
HelpText = "IP address to listen to. Ignored if IPMode != Specific")] public string IPAddress;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "im", DefaultValue = IPMode.Loopback, HelpText = "",
|
||||
LongName = "ipMode")] public
|
||||
IPMode IPMode;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "v6", DefaultValue = false,
|
||||
HelpText = "If IPMode 'Any' or 'LoopBack' are specified use the V6 address", LongName = "ipV6")] public bool
|
||||
IPv6;
|
||||
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, LongName = "nodirlist", DefaultValue = false,
|
||||
HelpText = "Disable diretory listing")] public bool Nodirlist;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, LongName = "ntlm", DefaultValue = false, HelpText = "Run as current identity"
|
||||
)] public bool Ntlm;
|
||||
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "p", LongName = "port",
|
||||
HelpText = "Port to listen to. Ignored if PortMode=FirstAvailable.", DefaultValue = 0)] public int Port;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "pm", HelpText = "", LongName = "portMode",
|
||||
DefaultValue = PortMode.FirstAvailable)] public PortMode PortMode;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "pre", DefaultValue = 65535, LongName = "highPort",
|
||||
HelpText = "End of port range. Ignored if PortMode != FirstAvailable")] public int PortRangeEnd = 9000;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "prs", DefaultValue = 32768, LongName = "lowPort",
|
||||
HelpText = "Start of port range. Ignored if PortMode != FirstAvailable")] public int PortRangeStart =
|
||||
8080;
|
||||
|
||||
[DefaultArgument(ArgumentType.AtMostOnce, DefaultValue = RunMode.Server, HelpText = "[Server|Hostsfile]")] public RunMode RunMode;
|
||||
[Argument(ArgumentType.AtMostOnce, LongName = "silent", DefaultValue = false, HelpText = "Fail silently")] public bool Silent;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "t", DefaultValue = 0, LongName = "timeout",
|
||||
HelpText = "Length of time, in ms, to wait for a request before stopping the server. 0 = no timeout.")] public int TimeOut;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "v", LongName = "vpath", DefaultValue = "/",
|
||||
HelpText = "Optional. default value '/'"
|
||||
)] public string VirtualPath = "/";
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "vs", DefaultValue = false,
|
||||
HelpText = "If true run in Visual Studio Development Server mode - readonly UI with single option to quit.."
|
||||
)] public
|
||||
bool VisualStudio;
|
||||
|
||||
[Argument(ArgumentType.AtMostOnce, ShortName = "w", DefaultValue = 0, LongName = "wait",
|
||||
HelpText =
|
||||
"Length of time, in ms, to wait for a specific port before throwing an exception or exiting. 0 = don't wait."
|
||||
)] public int WaitForPort;
|
||||
|
||||
#endregion
|
||||
|
||||
public string[] ToArgs()
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
if (RunMode != RunMode.Server)
|
||||
{
|
||||
result.Add(string.Format("{0}", RunMode));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ApplicationPath))
|
||||
{
|
||||
result.Add(string.Format("/a:{0}", ApplicationPath.Contains("") ? String.Format("\"{0}\"", ApplicationPath) : ApplicationPath));
|
||||
}
|
||||
result.Add(string.Format("/v:{0}", VirtualPath.Contains("") ? String.Format("\"{0}\"", VirtualPath) : VirtualPath));
|
||||
|
||||
if (!string.IsNullOrEmpty(HostName))
|
||||
{
|
||||
result.Add(string.Format("/h:{0}", HostName.Contains("") ? String.Format("\"{0}\"", HostName) : HostName));
|
||||
}
|
||||
if (AddHost)
|
||||
{
|
||||
result.Add("/ah");
|
||||
}
|
||||
|
||||
if (IPMode != IPMode.Loopback)
|
||||
{
|
||||
result.Add(string.Format("/im:{0}", IPMode));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(IPAddress))
|
||||
{
|
||||
result.Add(string.Format("/i:{0}", IPAddress));
|
||||
}
|
||||
|
||||
if (IPv6)
|
||||
{
|
||||
result.Add("/v6");
|
||||
}
|
||||
|
||||
if (VisualStudio)
|
||||
{
|
||||
result.Add("/vs");
|
||||
}
|
||||
|
||||
if (PortMode != PortMode.FirstAvailable)
|
||||
{
|
||||
result.Add(string.Format("/pm:{0}", PortMode));
|
||||
}
|
||||
|
||||
if (Port != 0)
|
||||
{
|
||||
result.Add(string.Format("/p:{0}", Port));
|
||||
}
|
||||
|
||||
if (PortRangeStart != 32768)
|
||||
{
|
||||
result.Add(string.Format("/prs:{0}", PortRangeStart));
|
||||
}
|
||||
if (PortRangeEnd != 65535)
|
||||
{
|
||||
result.Add(string.Format("/pre:{0}", PortRangeEnd));
|
||||
}
|
||||
if (TimeOut > 0)
|
||||
{
|
||||
result.Add(string.Format("/t:{0}", TimeOut));
|
||||
}
|
||||
if (WaitForPort > 0)
|
||||
{
|
||||
result.Add(string.Format("/w:{0}", WaitForPort));
|
||||
}
|
||||
|
||||
if (Ntlm)
|
||||
{
|
||||
result.Add("/ntlm");
|
||||
}
|
||||
if (Silent)
|
||||
{
|
||||
result.Add("/silent");
|
||||
}
|
||||
if (Nodirlist)
|
||||
{
|
||||
result.Add("/nodirlist");
|
||||
}
|
||||
if (EnableLogging)
|
||||
{
|
||||
result.Add("/log");
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Join(" ", ToArgs());
|
||||
//StringBuilder sb = new StringBuilder();
|
||||
//if (RunMode != RunMode.Server)
|
||||
//{
|
||||
// sb.AppendFormat("{0}", RunMode);
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(ApplicationPath))
|
||||
//{
|
||||
// sb.AppendFormat(" /a:{0}", ApplicationPath.Contains(" ") ? String.Format("\"{0}\"", ApplicationPath) : ApplicationPath);
|
||||
//}
|
||||
//sb.AppendFormat(" /v:{0}", VirtualPath.Contains(" ") ? String.Format("\"{0}\"", VirtualPath) : VirtualPath);
|
||||
|
||||
//if (!string.IsNullOrEmpty(HostName))
|
||||
//{
|
||||
// sb.AppendFormat(" /h:{0}", HostName.Contains(" ") ? String.Format("\"{0}\"", HostName) : HostName);
|
||||
//}
|
||||
//if (AddHost)
|
||||
//{
|
||||
// sb.Append(" /ah");
|
||||
//}
|
||||
|
||||
//if (IPMode != IPMode.Loopback)
|
||||
//{
|
||||
// sb.AppendFormat(" /im:{0}", IPMode);
|
||||
//}
|
||||
|
||||
//if (!string.IsNullOrEmpty(IPAddress))
|
||||
//{
|
||||
// sb.AppendFormat(" /i:{0}", IPAddress);
|
||||
//}
|
||||
|
||||
//if (IPv6)
|
||||
//{
|
||||
// sb.Append(" /v6");
|
||||
//}
|
||||
|
||||
//if (VisualStudio)
|
||||
//{
|
||||
// sb.Append(" /vs");
|
||||
//}
|
||||
|
||||
//if (PortMode != PortMode.FirstAvailable)
|
||||
//{
|
||||
// sb.AppendFormat(" /pm:{0}", PortMode);
|
||||
//}
|
||||
|
||||
//if (Port != 0)
|
||||
//{
|
||||
// sb.AppendFormat(" /p:{0}", Port);
|
||||
//}
|
||||
|
||||
//if (PortRangeStart != 32768)
|
||||
//{
|
||||
// sb.AppendFormat(" /prs:{0}", PortRangeStart);
|
||||
//}
|
||||
//if (PortRangeEnd != 65535)
|
||||
//{
|
||||
// sb.AppendFormat(" /pre:{0}", PortRangeEnd);
|
||||
//}
|
||||
//if (TimeOut > 0)
|
||||
//{
|
||||
// sb.AppendFormat(" /t:{0}", TimeOut);
|
||||
//}
|
||||
//if (WaitForPort > 0)
|
||||
//{
|
||||
// sb.AppendFormat(" /w:{0}", WaitForPort);
|
||||
//}
|
||||
|
||||
//if (Ntlm)
|
||||
//{
|
||||
// sb.Append(" /ntlm");
|
||||
//}
|
||||
//if (Silent)
|
||||
//{
|
||||
// sb.Append(" /silent");
|
||||
//}
|
||||
//if (Nodirlist)
|
||||
//{
|
||||
// sb.Append(" /nodirlist");
|
||||
//}
|
||||
//if (EnableLogging)
|
||||
//{
|
||||
// sb.Append(" /log");
|
||||
//}
|
||||
//return sb.ToString().Trim();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
internal void Validate()
|
||||
{
|
||||
if (string.IsNullOrEmpty(ApplicationPath))
|
||||
{
|
||||
throw new CassiniException(SR.ErrApplicationPathIsNull, ErrorField.ApplicationPath);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ApplicationPath = Path.GetFullPath(ApplicationPath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (!Directory.Exists(ApplicationPath))
|
||||
{
|
||||
throw new CassiniException(SR.WebdevDirNotExist, ErrorField.ApplicationPath);
|
||||
}
|
||||
|
||||
ApplicationPath = ApplicationPath.Trim('\"').TrimEnd('\\');
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(VirtualPath))
|
||||
{
|
||||
VirtualPath = VirtualPath.Trim('\"');
|
||||
VirtualPath = VirtualPath.Trim('/');
|
||||
VirtualPath = "/" + VirtualPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
VirtualPath = "/";
|
||||
}
|
||||
|
||||
|
||||
if (!VirtualPath.StartsWith("/"))
|
||||
{
|
||||
VirtualPath = "/" + VirtualPath;
|
||||
}
|
||||
|
||||
|
||||
if (AddHost && string.IsNullOrEmpty(HostName))
|
||||
{
|
||||
throw new CassiniException(SR.ErrInvalidHostname, ErrorField.HostName);
|
||||
}
|
||||
|
||||
|
||||
IPAddress = ParseIP(IPMode, IPv6, IPAddress).ToString();
|
||||
|
||||
|
||||
if (VisualStudio) // then STOP HERE.
|
||||
{
|
||||
// It is fortunate that in order to provide api parity with WebDev
|
||||
// we do not need to port scan. Visual Studio balks and refuses to
|
||||
// attach if we monkey around and open ports.
|
||||
Port = Port == 0 ? 80 : Port;
|
||||
PortMode = PortMode.Specific;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch (PortMode)
|
||||
{
|
||||
case PortMode.FirstAvailable:
|
||||
|
||||
if (PortRangeStart < 1)
|
||||
{
|
||||
throw new CassiniException(SR.ErrInvalidPortRangeValue, ErrorField.PortRangeStart);
|
||||
}
|
||||
|
||||
if (PortRangeEnd < 1)
|
||||
{
|
||||
throw new CassiniException(SR.ErrInvalidPortRangeValue, ErrorField.PortRangeEnd);
|
||||
}
|
||||
|
||||
if (PortRangeStart > PortRangeEnd)
|
||||
{
|
||||
throw new CassiniException(SR.ErrPortRangeEndMustBeEqualOrGreaterThanPortRangeSta,
|
||||
ErrorField.PortRange);
|
||||
}
|
||||
Port = CassiniNetworkUtils.GetAvailablePort(PortRangeStart, PortRangeEnd,
|
||||
System.Net.IPAddress.Parse(IPAddress), true);
|
||||
|
||||
if (Port == 0)
|
||||
{
|
||||
throw new CassiniException(SR.ErrNoAvailablePortFound, ErrorField.PortRange);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case PortMode.Specific:
|
||||
|
||||
if ((Port < 1) || (Port > 0xffff))
|
||||
{
|
||||
throw new CassiniException(SR.ErrPortOutOfRange, ErrorField.Port);
|
||||
}
|
||||
|
||||
|
||||
// start waiting....
|
||||
//TODO: design this hack away.... why am I waiting in a validation method?
|
||||
int now = Environment.TickCount;
|
||||
|
||||
// wait until either 1) the specified port is available or 2) the specified amount of time has passed
|
||||
while (Environment.TickCount < now + WaitForPort &&
|
||||
CassiniNetworkUtils.GetAvailablePort(Port, Port, System.Net.IPAddress.Parse(IPAddress), true) !=
|
||||
Port)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
||||
// is the port available?
|
||||
if (CassiniNetworkUtils.GetAvailablePort(Port, Port, System.Net.IPAddress.Parse(IPAddress), true) !=
|
||||
Port)
|
||||
{
|
||||
throw new CassiniException(SR.ErrPortIsInUse, ErrorField.Port);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
default:
|
||||
|
||||
throw new CassiniException(SR.ErrInvalidPortMode, ErrorField.None);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts CommandLineArgument values to an IP address if possible.
|
||||
/// Throws Exception if not.
|
||||
/// </summary>
|
||||
/// <param name="ipmode"></param>
|
||||
/// <param name="v6"></param>
|
||||
/// <param name="ipString"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="CassiniException">If IPMode is invalid</exception>
|
||||
/// <exception cref="CassiniException">If IPMode is 'Specific' and ipString is invalid</exception>
|
||||
public static IPAddress ParseIP(IPMode ipmode, bool v6, string ipString)
|
||||
{
|
||||
IPAddress ip;
|
||||
switch (ipmode)
|
||||
{
|
||||
case IPMode.Loopback:
|
||||
|
||||
ip = v6 ? System.Net.IPAddress.IPv6Loopback : System.Net.IPAddress.Loopback;
|
||||
break;
|
||||
case IPMode.Any:
|
||||
ip = v6 ? System.Net.IPAddress.IPv6Any : System.Net.IPAddress.Any;
|
||||
break;
|
||||
case IPMode.Specific:
|
||||
|
||||
if (!System.Net.IPAddress.TryParse(ipString, out ip))
|
||||
{
|
||||
throw new CassiniException(SR.ErrInvalidIPAddress, ErrorField.IPAddress);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new CassiniException(SR.ErrInvalidIPMode, ErrorField.None);
|
||||
}
|
||||
return ip;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public static class HostsFile
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ipAddress"></param>
|
||||
/// <param name="hostname"></param>
|
||||
/// <returns></returns>
|
||||
public static int AddHostEntry(string ipAddress, string hostname)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetHostsEntry(true, ipAddress, hostname);
|
||||
return 0;
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
}
|
||||
string executablePath = Assembly.GetExecutingAssembly().Location;
|
||||
return StartElevated(executablePath, string.Format("Hostsfile /ah+ /h:{0} /i:{1}", hostname, ipAddress));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ipAddress"></param>
|
||||
/// <param name="hostname"></param>
|
||||
/// <returns></returns>
|
||||
public static int RemoveHostEntry(string ipAddress, string hostname)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetHostsEntry(false, ipAddress, hostname);
|
||||
return 0;
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
}
|
||||
string executablePath = Assembly.GetExecutingAssembly().Location;
|
||||
return StartElevated(executablePath, string.Format("Hostsfile /ah- /h:{0} /i:{1}", hostname, ipAddress));
|
||||
}
|
||||
|
||||
private static void SetHostsEntry(bool addHost, string ipAddress, string hostname)
|
||||
{
|
||||
// limitation: while windows allows mulitple entries for a single host, we currently allow only one
|
||||
string windir = Environment.GetEnvironmentVariable("SystemRoot") ?? @"c:\windows";
|
||||
string hostsFilePath = Path.Combine(windir, @"system32\drivers\etc\hosts");
|
||||
|
||||
string hostsFileContent = File.ReadAllText(hostsFilePath);
|
||||
|
||||
hostsFileContent = Regex.Replace(hostsFileContent,
|
||||
string.Format(@"\r\n^\s*[\d\w\.:]+\s{0}\s#\sadded\sby\scassini$",
|
||||
hostname), "", RegexOptions.Multiline);
|
||||
|
||||
if (addHost)
|
||||
{
|
||||
hostsFileContent += string.Format("\r\n{0} {1} # added by cassini", ipAddress, hostname);
|
||||
}
|
||||
|
||||
File.WriteAllText(hostsFilePath, hostsFileContent);
|
||||
}
|
||||
|
||||
private static int StartElevated(string filename, string args)
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo
|
||||
{
|
||||
UseShellExecute = true,
|
||||
WorkingDirectory = Environment.CurrentDirectory,
|
||||
FileName = filename,
|
||||
Arguments = args,
|
||||
Verb = "runas"
|
||||
};
|
||||
try
|
||||
{
|
||||
Process p = Process.Start(startInfo);
|
||||
if (p != null)
|
||||
{
|
||||
p.WaitForExit();
|
||||
return p.ExitCode;
|
||||
}
|
||||
return -2;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
internal static class Interop
|
||||
{
|
||||
#region Structs
|
||||
|
||||
[DllImport("SECUR32.DLL", CharSet = CharSet.Unicode)]
|
||||
public static extern int AcceptSecurityContext(ref SecHandle phCredential, IntPtr phContext,
|
||||
ref SecBufferDesc pInput, uint fContextReq, uint TargetDataRep,
|
||||
ref SecHandle phNewContext, ref SecBufferDesc pOutput,
|
||||
ref uint pfContextAttr, ref long ptsTimeStamp);
|
||||
|
||||
[DllImport("SECUR32.DLL", CharSet = CharSet.Unicode)]
|
||||
public static extern int AcquireCredentialsHandle(string pszPrincipal, string pszPackage, uint fCredentialUse,
|
||||
IntPtr pvLogonID, IntPtr pAuthData, IntPtr pGetKeyFn,
|
||||
IntPtr pvGetKeyArgument, ref SecHandle phCredential,
|
||||
ref long ptsExpiry);
|
||||
|
||||
[DllImport("KERNEL32.DLL", CharSet = CharSet.Unicode)]
|
||||
public static extern int CloseHandle(IntPtr phToken);
|
||||
|
||||
[DllImport("SECUR32.DLL", CharSet = CharSet.Unicode)]
|
||||
public static extern int DeleteSecurityContext(ref SecHandle phContext);
|
||||
|
||||
/// <summary>
|
||||
/// FIX: #12506
|
||||
/// </summary>
|
||||
[DllImport("urlmon.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = false)]
|
||||
public static extern int FindMimeFromData(IntPtr pBC, [MarshalAs(UnmanagedType.LPWStr)] string pwzUrl,
|
||||
[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I1,
|
||||
SizeParamIndex = 3)] byte[] pBuffer, int cbSize,
|
||||
[MarshalAs(UnmanagedType.LPWStr)] string pwzMimeProposed,
|
||||
int dwMimeFlags, out IntPtr ppwzMimeOut, int dwReserved);
|
||||
|
||||
[DllImport("SECUR32.DLL", CharSet = CharSet.Unicode)]
|
||||
public static extern int FreeCredentialsHandle(ref SecHandle phCredential);
|
||||
|
||||
[DllImport("kernel32.dll", EntryPoint = "GetConsoleScreenBufferInfo", SetLastError = true,
|
||||
CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern int GetConsoleScreenBufferInfo(int hConsoleOutput,
|
||||
ref CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
|
||||
|
||||
[DllImport("KERNEL32.DLL", SetLastError = true)]
|
||||
public static extern IntPtr GetCurrentThread();
|
||||
|
||||
[DllImport("kernel32.dll", EntryPoint = "GetStdHandle", SetLastError = true, CharSet = CharSet.Auto,
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern int GetStdHandle(int nStdHandle);
|
||||
|
||||
[DllImport("ADVAPI32.DLL", SetLastError = true)]
|
||||
public static extern bool ImpersonateSelf(int level);
|
||||
|
||||
[DllImport("ADVAPI32.DLL", SetLastError = true)]
|
||||
public static extern int OpenThreadToken(IntPtr thread, int access, bool openAsSelf, ref IntPtr hToken);
|
||||
|
||||
[DllImport("SECUR32.DLL", CharSet = CharSet.Unicode)]
|
||||
public static extern int QuerySecurityContextToken(ref SecHandle phContext, ref IntPtr phToken);
|
||||
|
||||
[DllImport("ADVAPI32.DLL", SetLastError = true)]
|
||||
public static extern int RevertToSelf();
|
||||
|
||||
#region Nested type: CONSOLE_SCREEN_BUFFER_INFO
|
||||
|
||||
public struct CONSOLE_SCREEN_BUFFER_INFO
|
||||
{
|
||||
internal COORD dwCursorPosition;
|
||||
internal COORD dwMaximumWindowSize;
|
||||
internal COORD dwSize;
|
||||
internal SMALL_RECT srWindow;
|
||||
internal Int16 wAttributes;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: COORD
|
||||
|
||||
public struct COORD
|
||||
{
|
||||
internal Int16 x;
|
||||
internal Int16 y;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: SecBuffer
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct SecBuffer
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
public uint cbBuffer;
|
||||
public uint BufferType;
|
||||
public IntPtr pvBuffer;
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: SecBufferDesc
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct SecBufferDesc
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
public uint ulVersion;
|
||||
public uint cBuffers;
|
||||
public IntPtr pBuffers;
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: SecHandle
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct SecHandle
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
public IntPtr dwLower;
|
||||
public IntPtr dwUpper;
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: SMALL_RECT
|
||||
|
||||
public struct SMALL_RECT
|
||||
{
|
||||
internal Int16 Bottom;
|
||||
internal Int16 Left;
|
||||
internal Int16 Right;
|
||||
internal Int16 Top;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,221 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) 2010 Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.txt file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public static class CassiniNetworkUtils
|
||||
{
|
||||
public static IPAddress[] GetLocalAddresses()
|
||||
{
|
||||
string strHostName = Dns.GetHostName();
|
||||
IPHostEntry ipEntry = Dns.GetHostEntry(strHostName);
|
||||
return ipEntry.AddressList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns first available port on the specified IP address.
|
||||
/// The port scan excludes ports that are open on ANY loopback adapter.
|
||||
///
|
||||
/// If the address upon which a port is requested is an 'ANY' address all
|
||||
/// ports that are open on ANY IP are excluded.
|
||||
/// </summary>
|
||||
/// <param name="rangeStart"></param>
|
||||
/// <param name="rangeEnd"></param>
|
||||
/// <param name="ip">The IP address upon which to search for available port.</param>
|
||||
/// <param name="includeIdlePorts">If true includes ports in TIME_WAIT state in results.
|
||||
/// TIME_WAIT state is typically cool down period for recently released ports.</param>
|
||||
/// <returns></returns>
|
||||
public static int GetAvailablePort(int rangeStart, int rangeEnd, IPAddress ip, bool includeIdlePorts)
|
||||
{
|
||||
IPGlobalProperties ipProps = IPGlobalProperties.GetIPGlobalProperties();
|
||||
|
||||
// if the ip we want a port on is an 'any' or loopback port we need to exclude all ports that are active on any IP
|
||||
Func<IPAddress, bool> isIpAnyOrLoopBack = i => IPAddress.Any.Equals(i) ||
|
||||
IPAddress.IPv6Any.Equals(i) ||
|
||||
IPAddress.Loopback.Equals(i) ||
|
||||
IPAddress.IPv6Loopback.
|
||||
Equals(i);
|
||||
// get all active ports on specified IP.
|
||||
List<ushort> excludedPorts = new List<ushort>();
|
||||
|
||||
// if a port is open on an 'any' or 'loopback' interface then include it in the excludedPorts
|
||||
excludedPorts.AddRange(from n in ipProps.GetActiveTcpConnections()
|
||||
where
|
||||
n.LocalEndPoint.Port >= rangeStart &&
|
||||
n.LocalEndPoint.Port <= rangeEnd && (
|
||||
isIpAnyOrLoopBack(ip) ||
|
||||
n.LocalEndPoint.Address.Equals(ip) ||
|
||||
isIpAnyOrLoopBack(n.LocalEndPoint.Address)) &&
|
||||
(!includeIdlePorts || n.State != TcpState.TimeWait)
|
||||
select (ushort) n.LocalEndPoint.Port);
|
||||
|
||||
excludedPorts.AddRange(from n in ipProps.GetActiveTcpListeners()
|
||||
where n.Port >= rangeStart && n.Port <= rangeEnd && (
|
||||
isIpAnyOrLoopBack(ip) ||
|
||||
n.Address.Equals(ip) ||
|
||||
isIpAnyOrLoopBack(n.Address))
|
||||
select (ushort) n.Port);
|
||||
|
||||
excludedPorts.AddRange(from n in ipProps.GetActiveUdpListeners()
|
||||
where n.Port >= rangeStart && n.Port <= rangeEnd && (
|
||||
isIpAnyOrLoopBack(ip) ||
|
||||
n.Address.Equals(ip) ||
|
||||
isIpAnyOrLoopBack(n.Address))
|
||||
select (ushort) n.Port);
|
||||
|
||||
excludedPorts.Sort();
|
||||
|
||||
for (int port = rangeStart; port <= rangeEnd; port++)
|
||||
{
|
||||
if (!excludedPorts.Contains((ushort) port))
|
||||
{
|
||||
return port;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// Returns the first IPV4 address available for this host.
|
||||
/// This is typically an external IP
|
||||
///</summary>
|
||||
///<returns></returns>
|
||||
public static IPAddress GetExternalIPV4()
|
||||
{
|
||||
return GetIPAdresses().ToList()
|
||||
.FirstOrDefault(i => i.ToString().IndexOf(":") == -1);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///</summary>
|
||||
///<returns></returns>
|
||||
public static string GetHostName()
|
||||
{
|
||||
return Dns.GetHostName();
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// Gets all IP addresses for this host
|
||||
///</summary>
|
||||
public static IPAddress[] GetIPAdresses()
|
||||
{
|
||||
return Dns.GetHostEntry(GetHostName()).AddressList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gently polls specified IP:Port to determine if it is available.
|
||||
/// </summary>
|
||||
/// <param name="ipAddress"></param>
|
||||
/// <param name="port"></param>
|
||||
public static bool IsPortAvailable(IPAddress ipAddress, int port)
|
||||
{
|
||||
bool portAvailable = false;
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
portAvailable = GetAvailablePort(port, port, ipAddress, true) == port;
|
||||
if (portAvailable)
|
||||
{
|
||||
break;
|
||||
}
|
||||
// be a little patient and wait for the port if necessary,
|
||||
// the previous occupant may have just vacated
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
return portAvailable;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combine the RootUrl of the running web application with the relative url
|
||||
/// specified.
|
||||
/// </summary>
|
||||
/// <param name="rootUrl"></param>
|
||||
/// <param name="relativeUrl"></param>
|
||||
/// <returns></returns>
|
||||
public static string NormalizeUrl(string rootUrl, string relativeUrl)
|
||||
{
|
||||
relativeUrl = relativeUrl.TrimStart(new[] {'/'});
|
||||
|
||||
if (!rootUrl.EndsWith("/"))
|
||||
{
|
||||
rootUrl += "/";
|
||||
}
|
||||
return new Uri(rootUrl + relativeUrl).ToString();
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///</summary>
|
||||
///<param name="ipString"></param>
|
||||
///<returns></returns>
|
||||
public static IPAddress ParseIPString(string ipString)
|
||||
{
|
||||
if (string.IsNullOrEmpty(ipString))
|
||||
{
|
||||
ipString = "loopback";
|
||||
}
|
||||
ipString = ipString.Trim().ToLower();
|
||||
switch (ipString)
|
||||
{
|
||||
case "any":
|
||||
return IPAddress.Any;
|
||||
case "loopback":
|
||||
return IPAddress.Loopback;
|
||||
case "ipv6any":
|
||||
return IPAddress.IPv6Any;
|
||||
case "ipv6loopback":
|
||||
return IPAddress.IPv6Loopback;
|
||||
default:
|
||||
IPAddress result;
|
||||
IPAddress.TryParse(ipString, out result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Hostnames are composed of series of labels concatenated with dots, as are all domain names[1].
|
||||
/// For example, "en.wikipedia.org" is a hostname. Each label must be between 1 and 63 characters long,
|
||||
/// and the entire hostname has a maximum of 255 characters.</para>
|
||||
/// <para>
|
||||
/// The Internet standards (Request for Comments) for protocols mandate that component hostname
|
||||
/// labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits
|
||||
/// '0' through '9', and the hyphen. The original specification of hostnames in RFC 952, mandated that
|
||||
/// labels could not start with a digit or with a hyphen, and must not end with a hyphen. However, a
|
||||
/// subsequent specification (RFC 1123) permitted hostname labels to start with digits. No other symbols,
|
||||
/// punctuation characters, or blank spaces are permitted.</para>
|
||||
/// </summary>
|
||||
/// <param name="hostname"></param>
|
||||
/// <returns></returns>
|
||||
/// http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names
|
||||
public static bool ValidateHostName(string hostname)
|
||||
{
|
||||
Regex hostnameRx =
|
||||
new Regex(
|
||||
@"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$");
|
||||
return hostnameRx.IsMatch(hostname);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration.Install;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
using System.Configuration;
|
||||
namespace CassiniDev
|
||||
{
|
||||
|
||||
|
||||
[RunInstaller(true)]
|
||||
public sealed class MyServiceInstallerProcess : ServiceProcessInstaller
|
||||
{
|
||||
public MyServiceInstallerProcess()
|
||||
{
|
||||
this.Account = ServiceAccount.NetworkService;
|
||||
|
||||
}
|
||||
}
|
||||
[RunInstaller(true)]
|
||||
public sealed class MyServiceInstaller : ServiceInstaller
|
||||
{
|
||||
public MyServiceInstaller()
|
||||
{
|
||||
|
||||
|
||||
this.Description = "CassiniDev";
|
||||
this.DisplayName = "CassiniDev";
|
||||
this.ServiceName = "CassiniDev";
|
||||
this.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,386 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) Sky Sanders. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Configuration.Install;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using CassiniDev.UIComponents;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public sealed class Program
|
||||
{
|
||||
|
||||
|
||||
[STAThread, LoaderOptimization(LoaderOptimization.MultiDomainHost)]
|
||||
public static int Main(string[] cmdLine)
|
||||
{
|
||||
Server server = null;
|
||||
|
||||
if (cmdLine != null && cmdLine.Length > 0)
|
||||
{
|
||||
bool isVS = Assembly.GetExecutingAssembly()
|
||||
.GetName().Name.StartsWith("WEBDEV.WEBSERVER", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
CommandLineArguments args = new CommandLineArguments();
|
||||
|
||||
if (!CommandLineParser.ParseArgumentsWithUsage(cmdLine, args))
|
||||
{
|
||||
if (isVS)
|
||||
{
|
||||
// will display vs usage and return a code that VS understands
|
||||
return ValidateForVS(cmdLine);
|
||||
}
|
||||
|
||||
string usage = CommandLineParser.ArgumentsUsage(typeof(CommandLineArguments), 120);
|
||||
ShowMessage(usage, MessageBoxIcon.Asterisk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (args.RunMode == RunMode.Hostsfile)
|
||||
{
|
||||
SetHostsFile(args);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// now we validate for us.
|
||||
int returnValue = -1;
|
||||
string message = null;
|
||||
|
||||
try
|
||||
{
|
||||
args.VisualStudio = isVS;
|
||||
args.Validate();
|
||||
}
|
||||
catch (CassiniException ex)
|
||||
{
|
||||
switch (ex.Message)
|
||||
{
|
||||
case SR.ErrNoAvailablePortFound:
|
||||
case SR.ErrApplicationPathIsNull:
|
||||
message = ex.Message;
|
||||
break;
|
||||
case SR.ErrInvalidIPMode:
|
||||
message = SR.GetString(ex.Message, args.IPMode);
|
||||
break;
|
||||
case SR.ErrInvalidPortMode:
|
||||
message = SR.GetString(ex.Message, args.PortMode);
|
||||
break;
|
||||
case SR.ErrPortIsInUse:
|
||||
message = SR.GetString(ex.Message, args.Port);
|
||||
break;
|
||||
case SR.ErrPortRangeEndMustBeEqualOrGreaterThanPortRangeSta:
|
||||
message = SR.GetString(ex.Message, args.PortRangeStart, args.PortRangeEnd);
|
||||
break;
|
||||
case SR.ErrInvalidPortRangeValue:
|
||||
message = SR.GetString(ex.Message,
|
||||
ex.Field == ErrorField.PortRangeStart
|
||||
? "start " + args.PortRangeStart
|
||||
: "end " + args.PortRangeEnd);
|
||||
break;
|
||||
case SR.ErrInvalidHostname:
|
||||
message = SR.GetString(ex.Message, args.HostName);
|
||||
break;
|
||||
case SR.WebdevDirNotExist:
|
||||
message = SR.GetString(ex.Message, args.ApplicationPath);
|
||||
returnValue = -2;
|
||||
break;
|
||||
case SR.ErrPortOutOfRange:
|
||||
message = SR.GetString(ex.Message, args.Port);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!args.Silent)
|
||||
{
|
||||
ShowMessage(message, MessageBoxIcon.Asterisk);
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
if (!args.Silent)
|
||||
{
|
||||
ShowMessage(SR.GetString(SR.ErrFailedToStartCassiniDevServerOnPortError, args.Port,
|
||||
exception.Message, exception.HelpLink), MessageBoxIcon.Error);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
server = new Server(args.Port, args.VirtualPath, args.ApplicationPath, args.Ntlm, args.Nodirlist);
|
||||
|
||||
|
||||
if (args.AddHost)
|
||||
{
|
||||
HostsFile.AddHostEntry(server.IPAddress.ToString(), server.HostName);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
server.Start();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
if (!args.Silent)
|
||||
{
|
||||
ShowMessage(SR.GetString(SR.ErrFailedToStartCassiniDevServerOnPortError, args.Port,
|
||||
exception.Message, exception.HelpLink), MessageBoxIcon.Error);
|
||||
}
|
||||
return -4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using (FormView form = new FormView(server))
|
||||
{
|
||||
Application.Run(form);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static void ShowMessage(string msg, MessageBoxIcon icon)
|
||||
{
|
||||
if (Thread.CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft)
|
||||
{
|
||||
MessageBox.Show(msg, SR.GetString(SR.WebdevName), MessageBoxButtons.OK, icon,
|
||||
MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(msg, SR.GetString(SR.WebdevName), MessageBoxButtons.OK, icon);
|
||||
}
|
||||
}
|
||||
|
||||
private static void ShowMessage(string msg)
|
||||
{
|
||||
if (Thread.CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft)
|
||||
{
|
||||
MessageBox.Show(msg, SR.GetString(SR.WebdevName), MessageBoxButtons.OK, MessageBoxIcon.Hand,
|
||||
MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(msg, SR.GetString(SR.WebdevName), MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TODO: update usage will all arguments and present on a legible substrate.
|
||||
/// </summary>
|
||||
private static void ShowUsage()
|
||||
{
|
||||
ShowMessage(SR.GetString(SR.WebdevUsagestr1) + SR.GetString(SR.WebdevUsagestr2) +
|
||||
SR.GetString(SR.WebdevUsagestr3) +
|
||||
SR.GetString(SR.WebdevUsagestr4) + SR.GetString(SR.WebdevUsagestr5) +
|
||||
SR.GetString(SR.WebdevUsagestr6) +
|
||||
SR.GetString(SR.WebdevUsagestr7), MessageBoxIcon.Asterisk);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Keeping the VS validation to return codes that it likes.
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
private static int ValidateForVS(string[] args)
|
||||
{
|
||||
CommandLine line = new CommandLine(args);
|
||||
|
||||
bool flag = line.Options["silent"] != null;
|
||||
|
||||
if (!flag && line.ShowHelp)
|
||||
{
|
||||
ShowUsage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
string virtualPath = (string)line.Options["vpath"];
|
||||
|
||||
if (virtualPath != null)
|
||||
{
|
||||
virtualPath = virtualPath.Trim();
|
||||
}
|
||||
|
||||
// we are being a bit generous here as CommandLineArguments can handle these sitchiashuns
|
||||
if (string.IsNullOrEmpty(virtualPath))
|
||||
{
|
||||
virtualPath = "/";
|
||||
}
|
||||
|
||||
else if (!virtualPath.StartsWith("/", StringComparison.Ordinal))
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
ShowUsage();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
string path = (string)line.Options["path"];
|
||||
|
||||
if (path != null)
|
||||
{
|
||||
path = path.Trim();
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
ShowUsage();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
path = Path.GetFullPath(path);
|
||||
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
ShowMessage(SR.GetString(SR.WebdevDirNotExist, new object[] { path }));
|
||||
}
|
||||
return -2;
|
||||
}
|
||||
|
||||
int port = 0;
|
||||
|
||||
string s = (string)line.Options["port"];
|
||||
|
||||
if (s != null)
|
||||
{
|
||||
s = s.Trim();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(s))
|
||||
{
|
||||
try
|
||||
{
|
||||
port = int.Parse(s, CultureInfo.InvariantCulture);
|
||||
if ((port < 1) || (port > 0xffff))
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
ShowUsage();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
ShowMessage(SR.GetString(SR.WebdevInvalidPort, new object[] { s }));
|
||||
}
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
ShowUsage();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
private static void SetHostsFile(CommandLineArguments sargs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (sargs.AddHost)
|
||||
{
|
||||
HostsFile.AddHostEntry(sargs.IPAddress, sargs.HostName);
|
||||
}
|
||||
else
|
||||
{
|
||||
HostsFile.RemoveHostEntry(sargs.IPAddress, sargs.HostName);
|
||||
}
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Environment.Exit(-2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
internal sealed class ServiceUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// http://stackoverflow.com/questions/1449994/inno-setup-for-windows-service
|
||||
/// http://groups.google.co.uk/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/4d45e9ea5471cba4/4519371a77ed4a74
|
||||
/// </summary>
|
||||
/// <param name="undo"></param>
|
||||
/// <param name="args"></param>
|
||||
public static void Install(bool undo, string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine(undo ? "uninstalling" : "installing");
|
||||
using (AssemblyInstaller inst = new AssemblyInstaller(typeof(Program).Assembly, args))
|
||||
{
|
||||
IDictionary state = new Hashtable();
|
||||
inst.UseNewContext = true;
|
||||
try
|
||||
{
|
||||
if (undo)
|
||||
{
|
||||
inst.Uninstall(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
inst.Install(state);
|
||||
inst.Commit(state);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
inst.Rollback(state);
|
||||
}
|
||||
catch { }
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.Error.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AssemblyTitle("CassiniDev")]
|
||||
[assembly: AssemblyDescription("Cassini For Developers")]
|
||||
[assembly: AssemblyCompany("Salient Solutions")]
|
||||
[assembly: AssemblyProduct("CassiniDev")]
|
||||
[assembly: AssemblyCopyright("\x00a9 Sky Sanders/\x00a9 Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: NeutralResourcesLanguage("en-US")]
|
||||
[assembly: AssemblyVersion("3.5.1.8")]
|
||||
[assembly: AssemblyFileVersion("3.5.1.8")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum)]
|
||||
[assembly: CLSCompliant(true)]
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AssemblyTitle("CassiniDev")]
|
||||
[assembly: AssemblyDescription("Cassini For Developers")]
|
||||
[assembly: AssemblyCompany("Salient Solutions")]
|
||||
[assembly: AssemblyProduct("CassiniDev")]
|
||||
[assembly: AssemblyCopyright("\x00a9 Sky Sanders/\x00a9 Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: NeutralResourcesLanguage("en-US")]
|
||||
[assembly: AssemblyVersion("4.0.1.8")]
|
||||
[assembly: AssemblyFileVersion("4.0.1.8")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum)]
|
||||
[assembly: CLSCompliant(true)]
|
|
@ -0,0 +1,254 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="WebdevDirListing" xml:space="preserve">
|
||||
<value>Directory Listing -- {0}</value>
|
||||
</data>
|
||||
<data name="WebdevVwdName" xml:space="preserve">
|
||||
<value>CassiniDev Server</value>
|
||||
</data>
|
||||
<data name="WebdevServerError" xml:space="preserve">
|
||||
<value>Server Error in '{0}' Application.</value>
|
||||
</data>
|
||||
<data name="WebdevVersionInfo" xml:space="preserve">
|
||||
<value>Version Information</value>
|
||||
</data>
|
||||
<data name="WebdevHttpError" xml:space="preserve">
|
||||
<value>HTTP Error {0} - {1}.</value>
|
||||
</data>
|
||||
<data name="WebdevDirNotExist" xml:space="preserve">
|
||||
<value>The directory '{0}' does not exist.</value>
|
||||
</data>
|
||||
<data name="WebdevErrorListeningPort" xml:space="preserve">
|
||||
<value>CassiniDev Server failed to start listening on port {0}.
|
||||
Error message:
|
||||
{1}</value>
|
||||
</data>
|
||||
<data name="WebdevInvalidPort" xml:space="preserve">
|
||||
<value>Invalid port'{0}'</value>
|
||||
</data>
|
||||
<data name="WebdevName" xml:space="preserve">
|
||||
<value>CassiniDev Server</value>
|
||||
</data>
|
||||
<data name="WebdevNameWithPort" xml:space="preserve">
|
||||
<value>CassiniDev Server - Port {0}</value>
|
||||
</data>
|
||||
<data name="WebdevOpenInBrowser" xml:space="preserve">
|
||||
<value>Open in Web Browser</value>
|
||||
</data>
|
||||
<data name="WebdevRunAspNetLocally" xml:space="preserve">
|
||||
<value>Run ASP.NET applications locally.</value>
|
||||
</data>
|
||||
<data name="WebdevShowDetail" xml:space="preserve">
|
||||
<value>Show Details</value>
|
||||
</data>
|
||||
<data name="WebdevStop" xml:space="preserve">
|
||||
<value>Stop</value>
|
||||
</data>
|
||||
<data name="WebdevUsagestr1" xml:space="preserve">
|
||||
<value>CassiniDev Server Usage:
|
||||
</value>
|
||||
</data>
|
||||
<data name="WebdevUsagestr2" xml:space="preserve">
|
||||
<value>WebDev.WebServer /port:<port number> /path:<physical path> [/vpath:<virtual path>]
|
||||
|
||||
</value>
|
||||
</data>
|
||||
<data name="WebdevUsagestr3" xml:space="preserve">
|
||||
<value> port number:
|
||||
[Optional] An unused port number between 1 and 65535.
|
||||
The default is 80 (usable if you do not also have IIS listening on the same port).
|
||||
|
||||
</value>
|
||||
</data>
|
||||
<data name="WebdevUsagestr4" xml:space="preserve">
|
||||
<value> physical path:
|
||||
A valid directory name where the Web application is rooted.
|
||||
|
||||
</value>
|
||||
</data>
|
||||
<data name="WebdevUsagestr5" xml:space="preserve">
|
||||
<value> virtual path:
|
||||
[Optional] The virtual path or application root in the form of '/<app name>'.
|
||||
The default is simply '/'.
|
||||
|
||||
</value>
|
||||
</data>
|
||||
<data name="WebdevUsagestr6" xml:space="preserve">
|
||||
<value>Example:
|
||||
WebDev.WebServer /port:8080 /path:"c:\inetpub\wwwroot\MyApp" /vpath:"/MyApp"
|
||||
|
||||
</value>
|
||||
</data>
|
||||
<data name="WebdevUsagestr7" xml:space="preserve">
|
||||
<value>You can then access the Web application using a URL of the form:
|
||||
http://localhost:8080/MyApp</value>
|
||||
</data>
|
||||
<data name="WebdevLogViewerNameWithPort" xml:space="preserve">
|
||||
<value>CassiniDev Server - Port {0} - Log Viewer</value>
|
||||
</data>
|
||||
<data name="WebdevInMemoryLogging" xml:space="preserve">
|
||||
<value>In memory logging is enabled.
|
||||
|
||||
Events are only captured when the Log window is visible
|
||||
and all data will be lost when this window is closed.
|
||||
|
||||
Install the latest System.Data.SQLite package to enable
|
||||
log persistence.</value>
|
||||
</data>
|
||||
<data name="WebdevAspNetVersion" xml:space="preserve">
|
||||
<value>ASP.Net Version: {0}</value>
|
||||
</data>
|
||||
<data name="WebdevStart" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="ErrApplicationPathIsNull" xml:space="preserve">
|
||||
<value>ApplicationPath is null</value>
|
||||
</data>
|
||||
<data name="ErrFailedToStartCassiniDevServerOnPortError" xml:space="preserve">
|
||||
<value>Failed to start CassiniDev Server on Port:{0} Error:{1} {2}</value>
|
||||
</data>
|
||||
<data name="ErrInvalidHostname" xml:space="preserve">
|
||||
<value>Invalid Hostname {0}</value>
|
||||
</data>
|
||||
<data name="ErrInvalidIPAddress" xml:space="preserve">
|
||||
<value>Invalid IP Address {0}</value>
|
||||
</data>
|
||||
<data name="ErrInvalidIPMode" xml:space="preserve">
|
||||
<value>Invalid IPMode {0}</value>
|
||||
</data>
|
||||
<data name="ErrInvalidPortMode" xml:space="preserve">
|
||||
<value>Invalid PortMode</value>
|
||||
</data>
|
||||
<data name="ErrInvalidPortRangeValue" xml:space="preserve">
|
||||
<value>Invalid port range value {0}</value>
|
||||
</data>
|
||||
<data name="ErrNoAvailablePortFound" xml:space="preserve">
|
||||
<value>No available port found.</value>
|
||||
</data>
|
||||
<data name="ErrPortIsInUse" xml:space="preserve">
|
||||
<value>Port is in use {0}</value>
|
||||
</data>
|
||||
<data name="ErrPortOutOfRange" xml:space="preserve">
|
||||
<value>Port out of range: {0}</value>
|
||||
</data>
|
||||
<data name="ErrPortRangeEndMustBeEqualOrGreaterThanPortRangeSta" xml:space="preserve">
|
||||
<value>Port range end must be equal or greater than port range start {0} {1}</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,164 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) Sky Sanders. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Threading;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
internal sealed class SR
|
||||
{
|
||||
|
||||
internal const string ErrInvalidIPMode="SR.ErrInvalidIPMode";
|
||||
internal const string ErrInvalidIPAddress = "ErrInvalidIPAddress";
|
||||
internal const string ErrInvalidPortMode = "ErrInvalidPortMode";
|
||||
internal const string ErrPortIsInUse = "ErrPortIsInUse";
|
||||
internal const string ErrNoAvailablePortFound = "ErrNoAvailablePortFound";
|
||||
internal const string ErrPortRangeEndMustBeEqualOrGreaterThanPortRangeSta =
|
||||
"ErrPortRangeEndMustBeEqualOrGreaterThanPortRangeSta";
|
||||
internal const string ErrInvalidPortRangeValue = "ErrInvalidPortRangeValue";
|
||||
internal const string ErrInvalidHostname = "ErrInvalidHostname";
|
||||
|
||||
internal const string ErrFailedToStartCassiniDevServerOnPortError =
|
||||
"ErrFailedToStartCassiniDevServerOnPortError";
|
||||
internal const string ErrApplicationPathIsNull = "ErrApplicationPathIsNull";
|
||||
internal const string ErrPortOutOfRange = "ErrPortOutOfRange";
|
||||
|
||||
internal const string WebdevAspNetVersion = "WebdevAspNetVersion";
|
||||
|
||||
internal const string WebdevDirListing = "WebdevDirListing";
|
||||
|
||||
internal const string WebdevDirNotExist = "WebdevDirNotExist";
|
||||
|
||||
internal const string WebdevErrorListeningPort = "WebdevErrorListeningPort";
|
||||
|
||||
internal const string WebdevHttpError = "WebdevHttpError";
|
||||
|
||||
internal const string WebdevInMemoryLogging = "WebdevInMemoryLogging";
|
||||
|
||||
internal const string WebdevInvalidPort = "WebdevInvalidPort";
|
||||
|
||||
internal const string WebdevLogViewerNameWithPort = "WebdevLogViewerNameWithPort";
|
||||
|
||||
internal const string WebdevName = "WebdevName";
|
||||
|
||||
internal const string WebdevNameWithPort = "WebdevNameWithPort";
|
||||
|
||||
internal const string WebdevOpenInBrowser = "WebdevOpenInBrowser";
|
||||
|
||||
internal const string WebdevRunAspNetLocally = "WebdevRunAspNetLocally";
|
||||
|
||||
internal const string WebdevServerError = "WebdevServerError";
|
||||
|
||||
internal const string WebdevShowDetail = "WebdevShowDetail";
|
||||
|
||||
internal const string WebdevStop = "WebdevStop";
|
||||
|
||||
internal const string WebdevUsagestr1 = "WebdevUsagestr1";
|
||||
|
||||
internal const string WebdevUsagestr2 = "WebdevUsagestr2";
|
||||
|
||||
internal const string WebdevUsagestr3 = "WebdevUsagestr3";
|
||||
|
||||
internal const string WebdevUsagestr4 = "WebdevUsagestr4";
|
||||
|
||||
internal const string WebdevUsagestr5 = "WebdevUsagestr5";
|
||||
|
||||
internal const string WebdevUsagestr6 = "WebdevUsagestr6";
|
||||
|
||||
internal const string WebdevUsagestr7 = "WebdevUsagestr7";
|
||||
|
||||
internal const string WebdevVersionInfo = "WebdevVersionInfo";
|
||||
|
||||
internal const string WebdevVwdName = "WebdevVwdName";
|
||||
|
||||
private static SR _loader;
|
||||
|
||||
private readonly ResourceManager _resources;
|
||||
public const string WebdevStart = "WebdevStart";
|
||||
|
||||
internal SR()
|
||||
{
|
||||
Type t = GetType();
|
||||
Assembly thisAssembly = t.Assembly;
|
||||
string stringResourcesName = t.Namespace + ".Resources.CassiniDev";
|
||||
_resources = new ResourceManager(stringResourcesName, thisAssembly);
|
||||
}
|
||||
|
||||
private static CultureInfo Culture
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public static ResourceManager Resources
|
||||
{
|
||||
get { return GetLoader()._resources; }
|
||||
}
|
||||
|
||||
public static string GetString(string name)
|
||||
{
|
||||
SR loader = GetLoader();
|
||||
if (loader == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return loader._resources.GetString(name, Culture);
|
||||
}
|
||||
|
||||
public static string GetString(string name, params object[] args)
|
||||
{
|
||||
SR loader = GetLoader();
|
||||
if (loader == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string format = loader._resources.GetString(name, Culture);
|
||||
if ((args == null) || (args.Length <= 0))
|
||||
{
|
||||
return format;
|
||||
}
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
string str2 = args[i] as string;
|
||||
if ((str2 != null) && (str2.Length > 0x400))
|
||||
{
|
||||
args[i] = str2.Substring(0, 0x3fd) + "...";
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(format))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return string.Format(CultureInfo.CurrentCulture, format, args);
|
||||
}
|
||||
|
||||
private static SR GetLoader()
|
||||
{
|
||||
if (_loader == null)
|
||||
{
|
||||
SR sr = new SR();
|
||||
Interlocked.CompareExchange(ref _loader, sr, null);
|
||||
}
|
||||
return _loader;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 3.7 KiB |
|
@ -0,0 +1,187 @@
|
|||
namespace CassiniDev.ServerLog
|
||||
{
|
||||
partial class BodyView
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.TextViewTab = new System.Windows.Forms.TabPage();
|
||||
this.TextViewTextBox = new System.Windows.Forms.RichTextBox();
|
||||
this.HexViewTab = new System.Windows.Forms.TabPage();
|
||||
this.HexViewTextBox = new System.Windows.Forms.RichTextBox();
|
||||
this.ImageViewTab = new System.Windows.Forms.TabPage();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.TextViewTab.SuspendLayout();
|
||||
this.HexViewTab.SuspendLayout();
|
||||
this.ImageViewTab.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(4, 4);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(271, 123);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.TextViewTab);
|
||||
this.tabControl1.Controls.Add(this.HexViewTab);
|
||||
this.tabControl1.Controls.Add(this.ImageViewTab);
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(287, 157);
|
||||
this.tabControl1.TabIndex = 2;
|
||||
//
|
||||
// TextViewTab
|
||||
//
|
||||
this.TextViewTab.Controls.Add(this.TextViewTextBox);
|
||||
this.TextViewTab.Location = new System.Drawing.Point(4, 22);
|
||||
this.TextViewTab.Name = "TextViewTab";
|
||||
this.TextViewTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.TextViewTab.Size = new System.Drawing.Size(279, 131);
|
||||
this.TextViewTab.TabIndex = 1;
|
||||
this.TextViewTab.Text = "TextView";
|
||||
this.TextViewTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// TextViewTextBox
|
||||
//
|
||||
this.TextViewTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.TextViewTextBox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.TextViewTextBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.TextViewTextBox.Name = "TextViewTextBox";
|
||||
this.TextViewTextBox.ReadOnly = true;
|
||||
this.TextViewTextBox.Size = new System.Drawing.Size(273, 125);
|
||||
this.TextViewTextBox.TabIndex = 0;
|
||||
this.TextViewTextBox.Text = "";
|
||||
this.toolTip1.SetToolTip(this.TextViewTextBox, "CTRL+ Mouse Wheel to Zoom");
|
||||
this.TextViewTextBox.WordWrap = false;
|
||||
//
|
||||
// HexViewTab
|
||||
//
|
||||
this.HexViewTab.Controls.Add(this.HexViewTextBox);
|
||||
this.HexViewTab.Location = new System.Drawing.Point(4, 22);
|
||||
this.HexViewTab.Name = "HexViewTab";
|
||||
this.HexViewTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.HexViewTab.Size = new System.Drawing.Size(279, 131);
|
||||
this.HexViewTab.TabIndex = 0;
|
||||
this.HexViewTab.Text = "HexView";
|
||||
this.HexViewTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// HexViewTextBox
|
||||
//
|
||||
this.HexViewTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.HexViewTextBox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.HexViewTextBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.HexViewTextBox.Name = "HexViewTextBox";
|
||||
this.HexViewTextBox.ReadOnly = true;
|
||||
this.HexViewTextBox.Size = new System.Drawing.Size(273, 125);
|
||||
this.HexViewTextBox.TabIndex = 1;
|
||||
this.HexViewTextBox.Text = "";
|
||||
this.toolTip1.SetToolTip(this.HexViewTextBox, "CTRL+ Mouse Wheel to Zoom");
|
||||
this.HexViewTextBox.WordWrap = false;
|
||||
//
|
||||
// ImageViewTab
|
||||
//
|
||||
this.ImageViewTab.AutoScroll = true;
|
||||
this.ImageViewTab.Controls.Add(this.pictureBox1);
|
||||
this.ImageViewTab.Location = new System.Drawing.Point(4, 22);
|
||||
this.ImageViewTab.Name = "ImageViewTab";
|
||||
this.ImageViewTab.Padding = new System.Windows.Forms.Padding(4);
|
||||
this.ImageViewTab.Size = new System.Drawing.Size(279, 131);
|
||||
this.ImageViewTab.TabIndex = 2;
|
||||
this.ImageViewTab.Text = "ImageView";
|
||||
this.ImageViewTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.richTextBox1);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Size = new System.Drawing.Size(279, 131);
|
||||
this.tabPage1.TabIndex = 3;
|
||||
this.tabPage1.Text = "TODO";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// richTextBox1
|
||||
//
|
||||
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.richTextBox1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.richTextBox1.Name = "richTextBox1";
|
||||
this.richTextBox1.ReadOnly = true;
|
||||
this.richTextBox1.Size = new System.Drawing.Size(279, 131);
|
||||
this.richTextBox1.TabIndex = 2;
|
||||
this.richTextBox1.Text = "Expose extension API, probably via MEF, to enable incremental implemention of add" +
|
||||
"itional views, e.g. a PDF view, a XAML view";
|
||||
this.toolTip1.SetToolTip(this.richTextBox1, "CTRL+ Mouse Wheel to Zoom");
|
||||
//
|
||||
// BodyView
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Name = "BodyView";
|
||||
this.Size = new System.Drawing.Size(287, 157);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.TextViewTab.ResumeLayout(false);
|
||||
this.HexViewTab.ResumeLayout(false);
|
||||
this.ImageViewTab.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage HexViewTab;
|
||||
private System.Windows.Forms.RichTextBox HexViewTextBox;
|
||||
private System.Windows.Forms.TabPage TextViewTab;
|
||||
private System.Windows.Forms.RichTextBox TextViewTextBox;
|
||||
private System.Windows.Forms.TabPage ImageViewTab;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev.ServerLog
|
||||
{
|
||||
[DefaultBindingProperty("Value")]
|
||||
public partial class BodyView : UserControl
|
||||
{
|
||||
private byte[] _value;
|
||||
|
||||
public BodyView()
|
||||
{
|
||||
InitializeComponent();
|
||||
pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
}
|
||||
|
||||
public Byte[] Value
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
ClearDisplay();
|
||||
if (_value != null)
|
||||
{
|
||||
HexViewTextBox.Text = _value.ConvertToHexView(8);
|
||||
TextViewTextBox.Text = Encoding.UTF8.GetString(_value);
|
||||
try
|
||||
{
|
||||
using (MemoryStream s = new MemoryStream(_value))
|
||||
{
|
||||
pictureBox1.Image = Image.FromStream(s);
|
||||
}
|
||||
pictureBox1.Visible = true;
|
||||
}
|
||||
// ReSharper disable EmptyGeneralCatchClause
|
||||
catch
|
||||
// ReSharper restore EmptyGeneralCatchClause
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearDisplay()
|
||||
{
|
||||
if (pictureBox1.Image != null)
|
||||
{
|
||||
pictureBox1.Image.Dispose();
|
||||
pictureBox1.Image = null;
|
||||
}
|
||||
HexViewTextBox.Text = "";
|
||||
TextViewTextBox.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -0,0 +1,686 @@
|
|||
namespace CassiniDev
|
||||
{
|
||||
partial class FormView
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormView));
|
||||
this.RootUrlLinkLabel = new System.Windows.Forms.LinkLabel();
|
||||
this.ApplicationPathTextBox = new System.Windows.Forms.TextBox();
|
||||
this.VirtualPathTextBox = new System.Windows.Forms.TextBox();
|
||||
this.HostNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.LabelPhysicalPath = new System.Windows.Forms.Label();
|
||||
this.AddHostEntryCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.LabelVPath = new System.Windows.Forms.Label();
|
||||
this.ButtonBrowsePhysicalPath = new System.Windows.Forms.Button();
|
||||
this.LabelHostName = new System.Windows.Forms.Label();
|
||||
this.GroupBoxPort = new System.Windows.Forms.GroupBox();
|
||||
this.PortRangeEndTextBox = new System.Windows.Forms.NumericUpDown();
|
||||
this.PortRangeStartTextBox = new System.Windows.Forms.NumericUpDown();
|
||||
this.PortTextBox = new System.Windows.Forms.NumericUpDown();
|
||||
this.LabelPortRangeSeperator = new System.Windows.Forms.Label();
|
||||
this.PortModeFirstAvailableRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.PortModeSpecificRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.GroupBoxIPAddress = new System.Windows.Forms.GroupBox();
|
||||
this.IPSpecificTextBox = new System.Windows.Forms.ComboBox();
|
||||
this.IPV6CheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.RadioButtonIPSpecific = new System.Windows.Forms.RadioButton();
|
||||
this.IPModeAnyRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.IPModeLoopBackRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.ButtonStart = new System.Windows.Forms.Button();
|
||||
this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components);
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.LabelIdleTimeOut = new System.Windows.Forms.Label();
|
||||
this.TrayIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.showToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.browseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.ShowLogMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.ShowLogButton = new System.Windows.Forms.Button();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.nTLMAuthenticationRequiredToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.directoryBrowsingEnabledToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.TimeOutNumeric = new System.Windows.Forms.NumericUpDown();
|
||||
this.GroupBoxPort.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PortRangeEndTextBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PortRangeStartTextBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PortTextBox)).BeginInit();
|
||||
this.GroupBoxIPAddress.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.TimeOutNumeric)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// RootUrlLinkLabel
|
||||
//
|
||||
this.RootUrlLinkLabel.AutoSize = true;
|
||||
this.RootUrlLinkLabel.Location = new System.Drawing.Point(9, 300);
|
||||
this.RootUrlLinkLabel.Name = "RootUrlLinkLabel";
|
||||
this.RootUrlLinkLabel.Size = new System.Drawing.Size(189, 13);
|
||||
this.RootUrlLinkLabel.TabIndex = 24;
|
||||
this.RootUrlLinkLabel.TabStop = true;
|
||||
this.RootUrlLinkLabel.Text = "XXXXXXXXXXXXXXXXXXXXXXXXXX";
|
||||
this.RootUrlLinkLabel.Visible = false;
|
||||
this.RootUrlLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LaunchBrowser);
|
||||
//
|
||||
// ApplicationPathTextBox
|
||||
//
|
||||
this.ApplicationPathTextBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
|
||||
this.ApplicationPathTextBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystemDirectories;
|
||||
this.ApplicationPathTextBox.Location = new System.Drawing.Point(12, 53);
|
||||
this.ApplicationPathTextBox.Name = "ApplicationPathTextBox";
|
||||
this.ApplicationPathTextBox.Size = new System.Drawing.Size(285, 20);
|
||||
this.ApplicationPathTextBox.TabIndex = 0;
|
||||
this.toolTip1.SetToolTip(this.ApplicationPathTextBox, "The physical directory of the web application or site to serve.");
|
||||
//
|
||||
// VirtualPathTextBox
|
||||
//
|
||||
this.VirtualPathTextBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
|
||||
this.VirtualPathTextBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.RecentlyUsedList;
|
||||
this.VirtualPathTextBox.Location = new System.Drawing.Point(12, 92);
|
||||
this.VirtualPathTextBox.Name = "VirtualPathTextBox";
|
||||
this.VirtualPathTextBox.Size = new System.Drawing.Size(317, 20);
|
||||
this.VirtualPathTextBox.TabIndex = 2;
|
||||
this.VirtualPathTextBox.Text = "/";
|
||||
this.toolTip1.SetToolTip(this.VirtualPathTextBox, "The virtual path upon which to root the application.");
|
||||
//
|
||||
// HostNameTextBox
|
||||
//
|
||||
this.HostNameTextBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
|
||||
this.HostNameTextBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.RecentlyUsedList;
|
||||
this.HostNameTextBox.Location = new System.Drawing.Point(12, 131);
|
||||
this.HostNameTextBox.Name = "HostNameTextBox";
|
||||
this.HostNameTextBox.Size = new System.Drawing.Size(213, 20);
|
||||
this.HostNameTextBox.TabIndex = 3;
|
||||
this.toolTip1.SetToolTip(this.HostNameTextBox, resources.GetString("HostNameTextBox.ToolTip"));
|
||||
this.HostNameTextBox.TextChanged += new System.EventHandler(this.HostNameChanged);
|
||||
//
|
||||
// LabelPhysicalPath
|
||||
//
|
||||
this.LabelPhysicalPath.AutoSize = true;
|
||||
this.LabelPhysicalPath.Location = new System.Drawing.Point(12, 36);
|
||||
this.LabelPhysicalPath.Name = "LabelPhysicalPath";
|
||||
this.LabelPhysicalPath.Size = new System.Drawing.Size(71, 13);
|
||||
this.LabelPhysicalPath.TabIndex = 1;
|
||||
this.LabelPhysicalPath.Text = "Physical Path";
|
||||
this.toolTip1.SetToolTip(this.LabelPhysicalPath, "The physical directory of the web application or site to serve.");
|
||||
//
|
||||
// AddHostEntryCheckBox
|
||||
//
|
||||
this.AddHostEntryCheckBox.AutoSize = true;
|
||||
this.AddHostEntryCheckBox.Enabled = false;
|
||||
this.AddHostEntryCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.AddHostEntryCheckBox.Location = new System.Drawing.Point(231, 133);
|
||||
this.AddHostEntryCheckBox.Name = "AddHostEntryCheckBox";
|
||||
this.AddHostEntryCheckBox.Size = new System.Drawing.Size(105, 18);
|
||||
this.AddHostEntryCheckBox.TabIndex = 4;
|
||||
this.AddHostEntryCheckBox.Text = "Add hosts entry";
|
||||
this.toolTip1.SetToolTip(this.AddHostEntryCheckBox, resources.GetString("AddHostEntryCheckBox.ToolTip"));
|
||||
this.AddHostEntryCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// LabelVPath
|
||||
//
|
||||
this.LabelVPath.AutoSize = true;
|
||||
this.LabelVPath.Location = new System.Drawing.Point(12, 75);
|
||||
this.LabelVPath.Name = "LabelVPath";
|
||||
this.LabelVPath.Size = new System.Drawing.Size(61, 13);
|
||||
this.LabelVPath.TabIndex = 3;
|
||||
this.LabelVPath.Text = "Virtual Path";
|
||||
this.toolTip1.SetToolTip(this.LabelVPath, "The virtual path upon which to root the application.");
|
||||
//
|
||||
// ButtonBrowsePhysicalPath
|
||||
//
|
||||
this.ButtonBrowsePhysicalPath.Location = new System.Drawing.Point(303, 50);
|
||||
this.ButtonBrowsePhysicalPath.Name = "ButtonBrowsePhysicalPath";
|
||||
this.ButtonBrowsePhysicalPath.Size = new System.Drawing.Size(27, 23);
|
||||
this.ButtonBrowsePhysicalPath.TabIndex = 1;
|
||||
this.ButtonBrowsePhysicalPath.Text = "...";
|
||||
this.toolTip1.SetToolTip(this.ButtonBrowsePhysicalPath, "Browse");
|
||||
this.ButtonBrowsePhysicalPath.UseVisualStyleBackColor = true;
|
||||
this.ButtonBrowsePhysicalPath.Click += new System.EventHandler(this.BrowsePath);
|
||||
//
|
||||
// LabelHostName
|
||||
//
|
||||
this.LabelHostName.AutoSize = true;
|
||||
this.LabelHostName.Location = new System.Drawing.Point(12, 115);
|
||||
this.LabelHostName.Name = "LabelHostName";
|
||||
this.LabelHostName.Size = new System.Drawing.Size(106, 13);
|
||||
this.LabelHostName.TabIndex = 5;
|
||||
this.LabelHostName.Text = "Host Name (optional)";
|
||||
this.toolTip1.SetToolTip(this.LabelHostName, resources.GetString("LabelHostName.ToolTip"));
|
||||
//
|
||||
// GroupBoxPort
|
||||
//
|
||||
this.GroupBoxPort.Controls.Add(this.PortRangeEndTextBox);
|
||||
this.GroupBoxPort.Controls.Add(this.PortRangeStartTextBox);
|
||||
this.GroupBoxPort.Controls.Add(this.PortTextBox);
|
||||
this.GroupBoxPort.Controls.Add(this.LabelPortRangeSeperator);
|
||||
this.GroupBoxPort.Controls.Add(this.PortModeFirstAvailableRadioButton);
|
||||
this.GroupBoxPort.Controls.Add(this.PortModeSpecificRadioButton);
|
||||
this.GroupBoxPort.Location = new System.Drawing.Point(12, 213);
|
||||
this.GroupBoxPort.Name = "GroupBoxPort";
|
||||
this.GroupBoxPort.Size = new System.Drawing.Size(324, 47);
|
||||
this.GroupBoxPort.TabIndex = 9;
|
||||
this.GroupBoxPort.TabStop = false;
|
||||
this.GroupBoxPort.Text = "Port";
|
||||
//
|
||||
// PortRangeEndTextBox
|
||||
//
|
||||
this.PortRangeEndTextBox.Location = new System.Drawing.Point(261, 12);
|
||||
this.PortRangeEndTextBox.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.PortRangeEndTextBox.Minimum = new decimal(new int[] {
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.PortRangeEndTextBox.Name = "PortRangeEndTextBox";
|
||||
this.PortRangeEndTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.PortRangeEndTextBox.TabIndex = 19;
|
||||
this.PortRangeEndTextBox.Value = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// PortRangeStartTextBox
|
||||
//
|
||||
this.PortRangeStartTextBox.Location = new System.Drawing.Point(182, 12);
|
||||
this.PortRangeStartTextBox.Maximum = new decimal(new int[] {
|
||||
65534,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.PortRangeStartTextBox.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.PortRangeStartTextBox.Name = "PortRangeStartTextBox";
|
||||
this.PortRangeStartTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.PortRangeStartTextBox.TabIndex = 18;
|
||||
this.PortRangeStartTextBox.Value = new decimal(new int[] {
|
||||
32768,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// PortTextBox
|
||||
//
|
||||
this.PortTextBox.Location = new System.Drawing.Point(65, 12);
|
||||
this.PortTextBox.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.PortTextBox.Name = "PortTextBox";
|
||||
this.PortTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.PortTextBox.TabIndex = 17;
|
||||
//
|
||||
// LabelPortRangeSeperator
|
||||
//
|
||||
this.LabelPortRangeSeperator.AutoSize = true;
|
||||
this.LabelPortRangeSeperator.Location = new System.Drawing.Point(239, 16);
|
||||
this.LabelPortRangeSeperator.Name = "LabelPortRangeSeperator";
|
||||
this.LabelPortRangeSeperator.Size = new System.Drawing.Size(22, 13);
|
||||
this.LabelPortRangeSeperator.TabIndex = 16;
|
||||
this.LabelPortRangeSeperator.Text = "<->";
|
||||
this.toolTip1.SetToolTip(this.LabelPortRangeSeperator, "Host on the first available port found in specified range.");
|
||||
//
|
||||
// PortModeFirstAvailableRadioButton
|
||||
//
|
||||
this.PortModeFirstAvailableRadioButton.AutoSize = true;
|
||||
this.PortModeFirstAvailableRadioButton.Checked = true;
|
||||
this.PortModeFirstAvailableRadioButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.PortModeFirstAvailableRadioButton.Location = new System.Drawing.Point(128, 13);
|
||||
this.PortModeFirstAvailableRadioButton.Name = "PortModeFirstAvailableRadioButton";
|
||||
this.PortModeFirstAvailableRadioButton.Size = new System.Drawing.Size(63, 18);
|
||||
this.PortModeFirstAvailableRadioButton.TabIndex = 6;
|
||||
this.PortModeFirstAvailableRadioButton.TabStop = true;
|
||||
this.PortModeFirstAvailableRadioButton.Text = "Range";
|
||||
this.toolTip1.SetToolTip(this.PortModeFirstAvailableRadioButton, "Host on the first available port found in specified range.");
|
||||
this.PortModeFirstAvailableRadioButton.UseVisualStyleBackColor = true;
|
||||
this.PortModeFirstAvailableRadioButton.CheckedChanged += new System.EventHandler(this.RadioButtonPortFind_CheckedChanged);
|
||||
//
|
||||
// PortModeSpecificRadioButton
|
||||
//
|
||||
this.PortModeSpecificRadioButton.AutoSize = true;
|
||||
this.PortModeSpecificRadioButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.PortModeSpecificRadioButton.Location = new System.Drawing.Point(6, 13);
|
||||
this.PortModeSpecificRadioButton.Name = "PortModeSpecificRadioButton";
|
||||
this.PortModeSpecificRadioButton.Size = new System.Drawing.Size(69, 18);
|
||||
this.PortModeSpecificRadioButton.TabIndex = 6;
|
||||
this.PortModeSpecificRadioButton.TabStop = true;
|
||||
this.PortModeSpecificRadioButton.Text = "Specific";
|
||||
this.toolTip1.SetToolTip(this.PortModeSpecificRadioButton, "Host on specific port. \r\nIf port is already in use a warning will be issued and s" +
|
||||
"erver will not start.");
|
||||
this.PortModeSpecificRadioButton.UseVisualStyleBackColor = true;
|
||||
this.PortModeSpecificRadioButton.CheckedChanged += new System.EventHandler(this.RadioButtonPortSpecific_CheckedChanged);
|
||||
//
|
||||
// GroupBoxIPAddress
|
||||
//
|
||||
this.GroupBoxIPAddress.Controls.Add(this.IPSpecificTextBox);
|
||||
this.GroupBoxIPAddress.Controls.Add(this.IPV6CheckBox);
|
||||
this.GroupBoxIPAddress.Controls.Add(this.RadioButtonIPSpecific);
|
||||
this.GroupBoxIPAddress.Controls.Add(this.IPModeAnyRadioButton);
|
||||
this.GroupBoxIPAddress.Controls.Add(this.IPModeLoopBackRadioButton);
|
||||
this.GroupBoxIPAddress.Location = new System.Drawing.Point(12, 154);
|
||||
this.GroupBoxIPAddress.Name = "GroupBoxIPAddress";
|
||||
this.GroupBoxIPAddress.Size = new System.Drawing.Size(324, 58);
|
||||
this.GroupBoxIPAddress.TabIndex = 8;
|
||||
this.GroupBoxIPAddress.TabStop = false;
|
||||
this.GroupBoxIPAddress.Text = "IP Address";
|
||||
//
|
||||
// IPSpecificTextBox
|
||||
//
|
||||
this.IPSpecificTextBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.IPSpecificTextBox.FormattingEnabled = true;
|
||||
this.IPSpecificTextBox.Location = new System.Drawing.Point(216, 14);
|
||||
this.IPSpecificTextBox.Name = "IPSpecificTextBox";
|
||||
this.IPSpecificTextBox.Size = new System.Drawing.Size(101, 21);
|
||||
this.IPSpecificTextBox.TabIndex = 9;
|
||||
//
|
||||
// IPV6CheckBox
|
||||
//
|
||||
this.IPV6CheckBox.AutoSize = true;
|
||||
this.IPV6CheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.IPV6CheckBox.Location = new System.Drawing.Point(39, 35);
|
||||
this.IPV6CheckBox.Name = "IPV6CheckBox";
|
||||
this.IPV6CheckBox.Size = new System.Drawing.Size(77, 18);
|
||||
this.IPV6CheckBox.TabIndex = 8;
|
||||
this.IPV6CheckBox.Text = "Use IPV6";
|
||||
this.toolTip1.SetToolTip(this.IPV6CheckBox, "Use the IPV6 version of selected IP");
|
||||
this.IPV6CheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// RadioButtonIPSpecific
|
||||
//
|
||||
this.RadioButtonIPSpecific.AutoSize = true;
|
||||
this.RadioButtonIPSpecific.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.RadioButtonIPSpecific.Location = new System.Drawing.Point(150, 15);
|
||||
this.RadioButtonIPSpecific.Name = "RadioButtonIPSpecific";
|
||||
this.RadioButtonIPSpecific.Size = new System.Drawing.Size(69, 18);
|
||||
this.RadioButtonIPSpecific.TabIndex = 5;
|
||||
this.RadioButtonIPSpecific.Text = "Specific";
|
||||
this.toolTip1.SetToolTip(this.RadioButtonIPSpecific, "Host on specified IP address.\r\nWCF Services may not be served using this setting." +
|
||||
" Use Loopback.");
|
||||
this.RadioButtonIPSpecific.UseVisualStyleBackColor = true;
|
||||
this.RadioButtonIPSpecific.CheckedChanged += new System.EventHandler(this.RadioButtonIPSpecific_CheckedChanged);
|
||||
//
|
||||
// IPModeAnyRadioButton
|
||||
//
|
||||
this.IPModeAnyRadioButton.AutoSize = true;
|
||||
this.IPModeAnyRadioButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.IPModeAnyRadioButton.Location = new System.Drawing.Point(88, 15);
|
||||
this.IPModeAnyRadioButton.Name = "IPModeAnyRadioButton";
|
||||
this.IPModeAnyRadioButton.Size = new System.Drawing.Size(49, 18);
|
||||
this.IPModeAnyRadioButton.TabIndex = 5;
|
||||
this.IPModeAnyRadioButton.Text = "Any";
|
||||
this.toolTip1.SetToolTip(this.IPModeAnyRadioButton, "Host on all IP addresses at the specified port.\r\nWCF Services may not be served u" +
|
||||
"sing this setting. Use Loopback.");
|
||||
this.IPModeAnyRadioButton.UseVisualStyleBackColor = true;
|
||||
this.IPModeAnyRadioButton.CheckedChanged += new System.EventHandler(this.RadioButtonIPAny_CheckedChanged);
|
||||
//
|
||||
// IPModeLoopBackRadioButton
|
||||
//
|
||||
this.IPModeLoopBackRadioButton.AutoSize = true;
|
||||
this.IPModeLoopBackRadioButton.Checked = true;
|
||||
this.IPModeLoopBackRadioButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.IPModeLoopBackRadioButton.Location = new System.Drawing.Point(6, 15);
|
||||
this.IPModeLoopBackRadioButton.Name = "IPModeLoopBackRadioButton";
|
||||
this.IPModeLoopBackRadioButton.Size = new System.Drawing.Size(79, 18);
|
||||
this.IPModeLoopBackRadioButton.TabIndex = 5;
|
||||
this.IPModeLoopBackRadioButton.TabStop = true;
|
||||
this.IPModeLoopBackRadioButton.Text = "Loopback";
|
||||
this.toolTip1.SetToolTip(this.IPModeLoopBackRadioButton, "Use the default loopback adapter. \r\nIf any sort of WCF service is to be served, t" +
|
||||
"his is the only viable option.");
|
||||
this.IPModeLoopBackRadioButton.UseVisualStyleBackColor = true;
|
||||
this.IPModeLoopBackRadioButton.CheckedChanged += new System.EventHandler(this.RadioButtonIPLoopBack_CheckedChanged);
|
||||
//
|
||||
// ButtonStart
|
||||
//
|
||||
this.ButtonStart.Location = new System.Drawing.Point(261, 335);
|
||||
this.ButtonStart.Name = "ButtonStart";
|
||||
this.ButtonStart.Size = new System.Drawing.Size(75, 23);
|
||||
this.ButtonStart.TabIndex = 22;
|
||||
this.ButtonStart.Text = "Start";
|
||||
this.toolTip1.SetToolTip(this.ButtonStart, "Start hosting application using specified criteria");
|
||||
this.ButtonStart.UseVisualStyleBackColor = true;
|
||||
this.ButtonStart.Click += new System.EventHandler(this.StartStop);
|
||||
//
|
||||
// errorProvider1
|
||||
//
|
||||
this.errorProvider1.ContainerControl = this;
|
||||
//
|
||||
// LabelIdleTimeOut
|
||||
//
|
||||
this.LabelIdleTimeOut.AutoSize = true;
|
||||
this.LabelIdleTimeOut.Location = new System.Drawing.Point(15, 270);
|
||||
this.LabelIdleTimeOut.Name = "LabelIdleTimeOut";
|
||||
this.LabelIdleTimeOut.Size = new System.Drawing.Size(73, 13);
|
||||
this.LabelIdleTimeOut.TabIndex = 26;
|
||||
this.LabelIdleTimeOut.Text = "Idle Time Out:";
|
||||
this.toolTip1.SetToolTip(this.LabelIdleTimeOut, "The amount of time, in milliseconds, to remain idle, i.e. no requests, before sto" +
|
||||
"pping the server.");
|
||||
//
|
||||
// TrayIcon
|
||||
//
|
||||
this.TrayIcon.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.TrayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("TrayIcon.Icon")));
|
||||
this.TrayIcon.Text = "notifyIcon1";
|
||||
this.TrayIcon.BalloonTipClicked += new System.EventHandler(this.ShowMainForm);
|
||||
this.TrayIcon.DoubleClick += new System.EventHandler(this.ShowMainForm);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.showToolStripMenuItem,
|
||||
this.browseToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.ShowLogMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.closeToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(117, 126);
|
||||
//
|
||||
// showToolStripMenuItem
|
||||
//
|
||||
this.showToolStripMenuItem.Name = "showToolStripMenuItem";
|
||||
this.showToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
|
||||
this.showToolStripMenuItem.Text = "&Show";
|
||||
this.showToolStripMenuItem.Click += new System.EventHandler(this.ShowMainForm);
|
||||
//
|
||||
// browseToolStripMenuItem
|
||||
//
|
||||
this.browseToolStripMenuItem.Name = "browseToolStripMenuItem";
|
||||
this.browseToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
|
||||
this.browseToolStripMenuItem.Text = "&Browse";
|
||||
this.browseToolStripMenuItem.Click += new System.EventHandler(this.LaunchBrowser);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(113, 6);
|
||||
//
|
||||
// ShowLogMenuItem
|
||||
//
|
||||
this.ShowLogMenuItem.Enabled = false;
|
||||
this.ShowLogMenuItem.Name = "ShowLogMenuItem";
|
||||
this.ShowLogMenuItem.Size = new System.Drawing.Size(116, 22);
|
||||
this.ShowLogMenuItem.Text = "&View Log";
|
||||
this.ShowLogMenuItem.Click += new System.EventHandler(this.ShowLog);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(113, 6);
|
||||
//
|
||||
// closeToolStripMenuItem
|
||||
//
|
||||
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
|
||||
this.closeToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
|
||||
this.closeToolStripMenuItem.Text = "&Exit";
|
||||
this.closeToolStripMenuItem.Click += new System.EventHandler(this.ExitApp);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
|
||||
this.helpToolStripMenuItem.Text = "&Help";
|
||||
this.helpToolStripMenuItem.Click += new System.EventHandler(this.ShowHelp);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabel1});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 370);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
|
||||
this.statusStrip1.Size = new System.Drawing.Size(343, 22);
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
this.statusStrip1.TabIndex = 27;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(118, 17);
|
||||
this.toolStripStatusLabel1.Text = "ASP.Net Version XXXXX";
|
||||
//
|
||||
// ShowLogButton
|
||||
//
|
||||
this.ShowLogButton.Location = new System.Drawing.Point(176, 335);
|
||||
this.ShowLogButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ShowLogButton.Name = "ShowLogButton";
|
||||
this.ShowLogButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.ShowLogButton.TabIndex = 28;
|
||||
this.ShowLogButton.Text = "Show &Log";
|
||||
this.ShowLogButton.Click += new System.EventHandler(this.ShowLog);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.optionsToolStripMenuItem,
|
||||
this.helpToolStripMenuItem1});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(343, 24);
|
||||
this.menuStrip1.TabIndex = 29;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.hideToolStripMenuItem,
|
||||
this.toolStripSeparator4,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// hideToolStripMenuItem
|
||||
//
|
||||
this.hideToolStripMenuItem.Name = "hideToolStripMenuItem";
|
||||
this.hideToolStripMenuItem.Size = new System.Drawing.Size(95, 22);
|
||||
this.hideToolStripMenuItem.Text = "&Hide";
|
||||
this.hideToolStripMenuItem.Click += new System.EventHandler(this.HideMainForm);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(92, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(95, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.ExitApp);
|
||||
//
|
||||
// optionsToolStripMenuItem
|
||||
//
|
||||
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.nTLMAuthenticationRequiredToolStripMenuItem,
|
||||
this.directoryBrowsingEnabledToolStripMenuItem});
|
||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
|
||||
this.optionsToolStripMenuItem.Text = "&Options";
|
||||
//
|
||||
// nTLMAuthenticationRequiredToolStripMenuItem
|
||||
//
|
||||
this.nTLMAuthenticationRequiredToolStripMenuItem.CheckOnClick = true;
|
||||
this.nTLMAuthenticationRequiredToolStripMenuItem.Name = "nTLMAuthenticationRequiredToolStripMenuItem";
|
||||
this.nTLMAuthenticationRequiredToolStripMenuItem.Size = new System.Drawing.Size(219, 22);
|
||||
this.nTLMAuthenticationRequiredToolStripMenuItem.Text = "NTLM Authentication Required";
|
||||
this.nTLMAuthenticationRequiredToolStripMenuItem.ToolTipText = "When checked, require windows authentication via NTLM.";
|
||||
//
|
||||
// directoryBrowsingEnabledToolStripMenuItem
|
||||
//
|
||||
this.directoryBrowsingEnabledToolStripMenuItem.Checked = true;
|
||||
this.directoryBrowsingEnabledToolStripMenuItem.CheckOnClick = true;
|
||||
this.directoryBrowsingEnabledToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.directoryBrowsingEnabledToolStripMenuItem.Name = "directoryBrowsingEnabledToolStripMenuItem";
|
||||
this.directoryBrowsingEnabledToolStripMenuItem.Size = new System.Drawing.Size(219, 22);
|
||||
this.directoryBrowsingEnabledToolStripMenuItem.Text = "Directory Browsing Enabled";
|
||||
this.directoryBrowsingEnabledToolStripMenuItem.ToolTipText = "When checked, if no default document is found display a directory listing.";
|
||||
//
|
||||
// helpToolStripMenuItem1
|
||||
//
|
||||
this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
|
||||
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(40, 20);
|
||||
this.helpToolStripMenuItem1.Text = "&Help";
|
||||
this.helpToolStripMenuItem1.Click += new System.EventHandler(this.ShowHelp);
|
||||
//
|
||||
// TimeOutNumeric
|
||||
//
|
||||
this.TimeOutNumeric.Increment = new decimal(new int[] {
|
||||
1000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.TimeOutNumeric.Location = new System.Drawing.Point(95, 266);
|
||||
this.TimeOutNumeric.Maximum = new decimal(new int[] {
|
||||
2000000000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.TimeOutNumeric.Name = "TimeOutNumeric";
|
||||
this.TimeOutNumeric.Size = new System.Drawing.Size(66, 20);
|
||||
this.TimeOutNumeric.TabIndex = 30;
|
||||
//
|
||||
// FormView
|
||||
//
|
||||
this.AcceptButton = this.ButtonStart;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.ClientSize = new System.Drawing.Size(343, 392);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Controls.Add(this.TimeOutNumeric);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.LabelIdleTimeOut);
|
||||
this.Controls.Add(this.ApplicationPathTextBox);
|
||||
this.Controls.Add(this.ShowLogButton);
|
||||
this.Controls.Add(this.VirtualPathTextBox);
|
||||
this.Controls.Add(this.HostNameTextBox);
|
||||
this.Controls.Add(this.RootUrlLinkLabel);
|
||||
this.Controls.Add(this.LabelPhysicalPath);
|
||||
this.Controls.Add(this.LabelVPath);
|
||||
this.Controls.Add(this.GroupBoxIPAddress);
|
||||
this.Controls.Add(this.ButtonStart);
|
||||
this.Controls.Add(this.AddHostEntryCheckBox);
|
||||
this.Controls.Add(this.GroupBoxPort);
|
||||
this.Controls.Add(this.ButtonBrowsePhysicalPath);
|
||||
this.Controls.Add(this.LabelHostName);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FormView";
|
||||
this.ShowInTaskbar = false;
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Text = "Cassini Developer Edition";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
|
||||
this.GroupBoxPort.ResumeLayout(false);
|
||||
this.GroupBoxPort.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PortRangeEndTextBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PortRangeStartTextBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PortTextBox)).EndInit();
|
||||
this.GroupBoxIPAddress.ResumeLayout(false);
|
||||
this.GroupBoxIPAddress.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.TimeOutNumeric)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.LinkLabel RootUrlLinkLabel;
|
||||
private System.Windows.Forms.TextBox ApplicationPathTextBox;
|
||||
private System.Windows.Forms.TextBox VirtualPathTextBox;
|
||||
private System.Windows.Forms.TextBox HostNameTextBox;
|
||||
private System.Windows.Forms.Label LabelPhysicalPath;
|
||||
private System.Windows.Forms.CheckBox AddHostEntryCheckBox;
|
||||
private System.Windows.Forms.Label LabelVPath;
|
||||
private System.Windows.Forms.Button ButtonBrowsePhysicalPath;
|
||||
private System.Windows.Forms.Label LabelHostName;
|
||||
private System.Windows.Forms.GroupBox GroupBoxPort;
|
||||
private System.Windows.Forms.Label LabelPortRangeSeperator;
|
||||
private System.Windows.Forms.RadioButton PortModeFirstAvailableRadioButton;
|
||||
private System.Windows.Forms.RadioButton PortModeSpecificRadioButton;
|
||||
private System.Windows.Forms.GroupBox GroupBoxIPAddress;
|
||||
private System.Windows.Forms.RadioButton RadioButtonIPSpecific;
|
||||
private System.Windows.Forms.RadioButton IPModeAnyRadioButton;
|
||||
private System.Windows.Forms.RadioButton IPModeLoopBackRadioButton;
|
||||
private System.Windows.Forms.Button ButtonStart;
|
||||
private System.Windows.Forms.CheckBox IPV6CheckBox;
|
||||
private System.Windows.Forms.ErrorProvider errorProvider1;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.Label LabelIdleTimeOut;
|
||||
internal System.Windows.Forms.NotifyIcon TrayIcon;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem showToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem browseToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem ShowLogMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.Button ShowLogButton;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hideToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem nTLMAuthenticationRequiredToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem directoryBrowsingEnabledToolStripMenuItem;
|
||||
private System.Windows.Forms.NumericUpDown TimeOutNumeric;
|
||||
private System.Windows.Forms.NumericUpDown PortTextBox;
|
||||
private System.Windows.Forms.NumericUpDown PortRangeStartTextBox;
|
||||
private System.Windows.Forms.NumericUpDown PortRangeEndTextBox;
|
||||
private System.Windows.Forms.ComboBox IPSpecificTextBox;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,834 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using CassiniDev.ServerLog;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev
|
||||
{
|
||||
public partial class FormView : Form
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private bool _automated;
|
||||
|
||||
private LogView _logForm;
|
||||
|
||||
private RunState _runState;
|
||||
|
||||
private Server _server;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public FormView(Server server)
|
||||
{
|
||||
_server = server;
|
||||
InitializeComponent();
|
||||
InitializeUI();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
internal bool AddHost
|
||||
{
|
||||
get { return AddHostEntryCheckBox.Checked; }
|
||||
set { AddHostEntryCheckBox.Checked = value; }
|
||||
}
|
||||
|
||||
internal string ApplicationPath
|
||||
{
|
||||
get { return ApplicationPathTextBox.Text; }
|
||||
set { ApplicationPathTextBox.Text = value; }
|
||||
}
|
||||
|
||||
internal string HostName
|
||||
{
|
||||
get { return HostNameTextBox.Text; }
|
||||
set { HostNameTextBox.Text = value; }
|
||||
}
|
||||
|
||||
internal string IPAddress
|
||||
{
|
||||
get { return IPSpecificTextBox.Text; }
|
||||
set { IPSpecificTextBox.Text = value; }
|
||||
}
|
||||
|
||||
internal IPMode IPMode
|
||||
{
|
||||
get { return GetIpMode(); }
|
||||
set { SetIpMode(value); }
|
||||
}
|
||||
|
||||
|
||||
internal bool NoDirList
|
||||
{
|
||||
get { return !directoryBrowsingEnabledToolStripMenuItem.Checked; }
|
||||
set { directoryBrowsingEnabledToolStripMenuItem.Checked = !value; }
|
||||
}
|
||||
|
||||
internal bool NtmlAuthenticationRequired
|
||||
{
|
||||
get { return nTLMAuthenticationRequiredToolStripMenuItem.Checked; }
|
||||
set { nTLMAuthenticationRequiredToolStripMenuItem.Checked = value; }
|
||||
}
|
||||
|
||||
internal int Port
|
||||
{
|
||||
get { return (int)PortTextBox.Value; }
|
||||
set { PortTextBox.Value = value; }
|
||||
}
|
||||
|
||||
internal PortMode PortMode
|
||||
{
|
||||
get { return GetPortMode(); }
|
||||
set { SetPortMode(value); }
|
||||
}
|
||||
|
||||
internal int PortRangeEnd
|
||||
{
|
||||
get { return (int)PortRangeEndTextBox.Value; }
|
||||
set { PortRangeEndTextBox.Value = value; }
|
||||
}
|
||||
|
||||
internal int PortRangeStart
|
||||
{
|
||||
get { return (int)PortRangeStartTextBox.Value; }
|
||||
set { PortRangeStartTextBox.Value = value; }
|
||||
}
|
||||
|
||||
internal string RootUrl
|
||||
{
|
||||
get { return RootUrlLinkLabel.Text; }
|
||||
set
|
||||
{
|
||||
RootUrlLinkLabel.Text = value;
|
||||
RootUrlLinkLabel.Visible = !string.IsNullOrEmpty(value);
|
||||
}
|
||||
}
|
||||
|
||||
internal RunState RunState
|
||||
{
|
||||
get { return _runState; }
|
||||
}
|
||||
|
||||
internal int TimeOut
|
||||
{
|
||||
get { return (int)TimeOutNumeric.Value; }
|
||||
set { TimeOutNumeric.Value = value; }
|
||||
}
|
||||
|
||||
internal bool V6
|
||||
{
|
||||
get { return IPV6CheckBox.Checked; }
|
||||
set { IPV6CheckBox.Checked = value; }
|
||||
}
|
||||
|
||||
internal string VirtualPath
|
||||
{
|
||||
get { return VirtualPathTextBox.Text; }
|
||||
set { VirtualPathTextBox.Text = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
|
||||
if (disposing && _server != null)
|
||||
{
|
||||
_server.Dispose();
|
||||
_server = null;
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If the form is closing we need to determine whether to exit
|
||||
/// or to minimize to tray.
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
// if explicit closure or we are doing nothing then exit app.
|
||||
if (RunState == RunState.Idle)
|
||||
{
|
||||
InvokeStop();
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowState = FormWindowState.Minimized;
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
//protected override void OnShown(EventArgs e)
|
||||
//{
|
||||
// if (_automated)
|
||||
// {
|
||||
// WindowState = FormWindowState.Minimized;
|
||||
// Hide();
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
|
||||
private void InitializeUI()
|
||||
{
|
||||
ButtonStart.Text = SR.GetString(SR.WebdevStart);
|
||||
toolStripStatusLabel1.Text = SR.GetString(SR.WebdevAspNetVersion, Common.GetAspVersion());
|
||||
|
||||
|
||||
// if sqlite is missing then just silently enable in-memory logging,
|
||||
// hide the enable logging item and enable view log item
|
||||
|
||||
|
||||
|
||||
ShowLogButton.Enabled = false;
|
||||
|
||||
|
||||
|
||||
toolStripStatusLabel1.Text = SR.GetString(SR.WebdevAspNetVersion, Common.GetAspVersion());
|
||||
|
||||
List<IPAddress> localAddresses = new List<IPAddress>(CassiniNetworkUtils.GetLocalAddresses());
|
||||
localAddresses.Insert(0, System.Net.IPAddress.IPv6Loopback);
|
||||
localAddresses.Insert(0, System.Net.IPAddress.Loopback);
|
||||
|
||||
IPSpecificTextBox.Items.AddRange(localAddresses.Select(i => i.ToString()).ToArray());
|
||||
if (IPSpecificTextBox.Items.Count > 0)
|
||||
{
|
||||
IPSpecificTextBox.SelectedIndex = 0;
|
||||
IPSpecificTextBox.Text = IPSpecificTextBox.Items[0].ToString();
|
||||
}
|
||||
|
||||
InvokeSetRunState(RunState.Idle);
|
||||
if (_server == null)
|
||||
{
|
||||
ShowMainForm();
|
||||
}
|
||||
else
|
||||
{
|
||||
_automated = true;
|
||||
_server.TimedOut += OnTimedOut;
|
||||
IPMode = IPMode.Specific;
|
||||
PortMode = PortMode.Specific;
|
||||
|
||||
UpdateUIFromServer();
|
||||
|
||||
|
||||
InvokeSetRunState(RunState.Running);
|
||||
base.Text = SR.GetString(SR.WebdevNameWithPort, _server.Port);
|
||||
TrayIcon.Visible = true;
|
||||
DisplayTrayTip();
|
||||
}
|
||||
}
|
||||
|
||||
private void DisplayTrayTip()
|
||||
{
|
||||
|
||||
if (_server==null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
TrayIcon.Text = _server.RootUrl;
|
||||
string trayBaloonText = _server.RootUrl;
|
||||
TrayIcon.ShowBalloonTip(5000, base.Text, trayBaloonText, ToolTipIcon.Info);
|
||||
}
|
||||
|
||||
private void UpdateUIFromServer()
|
||||
{
|
||||
base.Text = SR.GetString(SR.WebdevNameWithPort, _server.Port);
|
||||
RootUrl = _server.RootUrl;
|
||||
ApplicationPath = _server.PhysicalPath;
|
||||
IPAddress = _server.IPAddress.ToString();
|
||||
Port = _server.Port;
|
||||
HostName = _server.HostName;
|
||||
NtmlAuthenticationRequired = _server.RequireAuthentication;
|
||||
NoDirList = _server.DisableDirectoryListing;
|
||||
TimeOut = _server.TimeoutInterval;
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
if (WindowState == FormWindowState.Minimized)
|
||||
{
|
||||
Hide();
|
||||
DisplayTrayTip();
|
||||
ShowInTaskbar = false;
|
||||
}
|
||||
base.OnResize(e);
|
||||
}
|
||||
|
||||
|
||||
private void ShowMainForm()
|
||||
{
|
||||
Show();
|
||||
WindowState = FormWindowState.Normal;
|
||||
ShowInTaskbar = true;
|
||||
|
||||
|
||||
//TrayIcon.Visible = false;
|
||||
//ShowInTaskbar = true;
|
||||
|
||||
//TopMost = true;
|
||||
//Focus();
|
||||
//BringToFront();
|
||||
//TopMost = false;
|
||||
}
|
||||
|
||||
private void InvokeSetRunState(RunState state)
|
||||
{
|
||||
// use invoke, runstate may come from another thread.
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new ParameterizedThreadStart(SetRunState), state);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRunState(state);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets RunState and enables/disables form fields accordingly
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
private void SetRunState(object state)
|
||||
{
|
||||
_runState = (RunState)state;
|
||||
|
||||
switch (_runState)
|
||||
{
|
||||
case RunState.Idle:
|
||||
if (!_automated)
|
||||
{
|
||||
EnableForm();
|
||||
}
|
||||
// if not automated we are on our way out
|
||||
break;
|
||||
case RunState.Running:
|
||||
DisableForm();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void EnableForm()
|
||||
{
|
||||
ShowLogMenuItem.Enabled = ShowLogButton.Enabled = false;
|
||||
base.Text = SR.GetString(SR.WebdevName);
|
||||
ButtonStart.Text = "&Start";
|
||||
ButtonStart.Enabled = true;
|
||||
nTLMAuthenticationRequiredToolStripMenuItem.Enabled = true;
|
||||
directoryBrowsingEnabledToolStripMenuItem.Enabled = true;
|
||||
ApplicationPathTextBox.Enabled = true;
|
||||
ButtonBrowsePhysicalPath.Enabled = true;
|
||||
VirtualPathTextBox.Enabled = true;
|
||||
HostNameTextBox.Enabled = true;
|
||||
GroupBoxIPAddress.Enabled = true;
|
||||
GroupBoxPort.Enabled = true;
|
||||
LabelHostName.Enabled = true;
|
||||
LabelPhysicalPath.Enabled = true;
|
||||
LabelVPath.Enabled = true;
|
||||
TimeOutNumeric.Enabled = true;
|
||||
RootUrl = null;
|
||||
|
||||
AddHostEntryCheckBox.Enabled = !String.IsNullOrEmpty(HostName);
|
||||
|
||||
switch (IPMode)
|
||||
{
|
||||
case IPMode.Loopback:
|
||||
RadioButtonIPLoopBack_CheckedChanged(null, EventArgs.Empty);
|
||||
break;
|
||||
case IPMode.Any:
|
||||
RadioButtonIPAny_CheckedChanged(null, EventArgs.Empty);
|
||||
break;
|
||||
case IPMode.Specific:
|
||||
RadioButtonIPSpecific_CheckedChanged(null, EventArgs.Empty);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (PortMode)
|
||||
{
|
||||
case PortMode.FirstAvailable:
|
||||
RadioButtonPortFind_CheckedChanged(null, EventArgs.Empty);
|
||||
break;
|
||||
case PortMode.Specific:
|
||||
RadioButtonPortSpecific_CheckedChanged(null, EventArgs.Empty);
|
||||
break;
|
||||
}
|
||||
|
||||
HostNameChanged(null, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void DisableForm()
|
||||
{
|
||||
ShowLogMenuItem.Enabled = ShowLogButton.Enabled = true;
|
||||
|
||||
TimeOutNumeric.Enabled = false;
|
||||
ButtonStart.Text = "&Stop";
|
||||
directoryBrowsingEnabledToolStripMenuItem.Enabled = false;
|
||||
nTLMAuthenticationRequiredToolStripMenuItem.Enabled = false;
|
||||
ApplicationPathTextBox.Enabled = false;
|
||||
ButtonBrowsePhysicalPath.Enabled = false;
|
||||
VirtualPathTextBox.Enabled = false;
|
||||
HostNameTextBox.Enabled = false;
|
||||
GroupBoxIPAddress.Enabled = false;
|
||||
GroupBoxPort.Enabled = false;
|
||||
AddHostEntryCheckBox.Enabled = false;
|
||||
LabelHostName.Enabled = false;
|
||||
LabelPhysicalPath.Enabled = false;
|
||||
LabelVPath.Enabled = false;
|
||||
}
|
||||
|
||||
private void HostNameChanged()
|
||||
{
|
||||
if (string.IsNullOrEmpty(HostName))
|
||||
{
|
||||
AddHostEntryCheckBox.Enabled = false;
|
||||
AddHost = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHostEntryCheckBox.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void StartStop()
|
||||
{
|
||||
if (RunState != RunState.Running)
|
||||
{
|
||||
DisableForm();
|
||||
Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
InvokeStop();
|
||||
}
|
||||
}
|
||||
|
||||
private CommandLineArguments GetArgs()
|
||||
{
|
||||
CommandLineArguments args = new CommandLineArguments
|
||||
{
|
||||
AddHost = AddHost,
|
||||
ApplicationPath = ApplicationPath,
|
||||
HostName = HostName,
|
||||
IPAddress = IPAddress,
|
||||
IPMode = IPMode,
|
||||
IPv6 = V6,
|
||||
Port = Port,
|
||||
PortMode = PortMode,
|
||||
PortRangeEnd = PortRangeEnd,
|
||||
PortRangeStart = PortRangeStart,
|
||||
VirtualPath = VirtualPath,
|
||||
TimeOut = TimeOut,
|
||||
WaitForPort = 0,
|
||||
Ntlm = NtmlAuthenticationRequired,
|
||||
Nodirlist = NoDirList
|
||||
};
|
||||
return args;
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
// use CommandLineArguments as a pre validation tool
|
||||
|
||||
CommandLineArguments args = GetArgs();
|
||||
ClearError();
|
||||
|
||||
try
|
||||
{
|
||||
args.Validate();
|
||||
}
|
||||
|
||||
catch (CassiniException ex)
|
||||
{
|
||||
SetError(ex.Field, ex.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
IPAddress = args.IPAddress;
|
||||
|
||||
Port = args.Port;
|
||||
|
||||
HostName = args.HostName;
|
||||
|
||||
_server = new Server(args.Port, args.VirtualPath, args.ApplicationPath,
|
||||
System.Net.IPAddress.Parse(args.IPAddress), args.HostName, args.TimeOut, args.Ntlm,
|
||||
args.Nodirlist);
|
||||
|
||||
if (args.AddHost)
|
||||
{
|
||||
HostsFile.AddHostEntry(_server.IPAddress.ToString(), _server.HostName);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_server.Start();
|
||||
_server.TimedOut += OnTimedOut;
|
||||
UpdateUIFromServer();
|
||||
InvokeSetRunState(RunState.Running);
|
||||
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
SetError(ErrorField.None, ex.Message);
|
||||
_server.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The server could be stopped either by user action,
|
||||
/// timeout or exception. If by timeout, the call will be
|
||||
/// coming from another thread in another appdomain far far
|
||||
/// away, so we execise caution and wrap the method that
|
||||
/// actual does the stoppage in this invokable wrapper.
|
||||
/// </summary>
|
||||
private void InvokeStop()
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new MethodInvoker(Stop));
|
||||
}
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void Stop()
|
||||
{
|
||||
// kill the start button so we don't get a start
|
||||
// signal before completely stopped.
|
||||
ButtonStart.Enabled = false;
|
||||
|
||||
// revert the host file modification, if necessary
|
||||
if (AddHost && RunState == RunState.Running)
|
||||
{
|
||||
HostsFile.RemoveHostEntry(_server.IPAddress.ToString(), _server.HostName);
|
||||
}
|
||||
|
||||
if (_server != null)
|
||||
{
|
||||
_server.TimedOut -= OnTimedOut;
|
||||
_server.Dispose();
|
||||
}
|
||||
|
||||
RootUrl = string.Empty;
|
||||
|
||||
InvokeSetRunState(RunState.Idle);
|
||||
|
||||
if (_automated)
|
||||
{
|
||||
ExitApp();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void ExitApp()
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
|
||||
private static void ShowHelp()
|
||||
{
|
||||
MessageBox.Show("help/about TODO");
|
||||
}
|
||||
|
||||
private void ShowLog()
|
||||
{
|
||||
if (_logForm == null || _logForm.IsDisposed)
|
||||
{
|
||||
_logForm = new LogView(_server);
|
||||
}
|
||||
_logForm.Show();
|
||||
_logForm.BringToFront();
|
||||
}
|
||||
|
||||
|
||||
private void BrowsePath()
|
||||
{
|
||||
FolderBrowserDialog fbd = new FolderBrowserDialog();
|
||||
|
||||
if (fbd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ApplicationPath = fbd.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
private void LaunchBrowser()
|
||||
{
|
||||
Process.Start(RootUrlLinkLabel.Text);
|
||||
}
|
||||
|
||||
|
||||
private IPMode GetIpMode()
|
||||
{
|
||||
IPMode result;
|
||||
if (IPModeAnyRadioButton.Checked)
|
||||
{
|
||||
result = IPMode.Any;
|
||||
}
|
||||
else if (IPModeLoopBackRadioButton.Checked)
|
||||
{
|
||||
result = IPMode.Loopback;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = IPMode.Specific;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private PortMode GetPortMode()
|
||||
{
|
||||
return PortModeSpecificRadioButton.Checked ? PortMode.Specific : PortMode.FirstAvailable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void SetIpMode(IPMode value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case IPMode.Loopback:
|
||||
IPModeLoopBackRadioButton.Checked = true;
|
||||
break;
|
||||
case IPMode.Any:
|
||||
IPModeAnyRadioButton.Checked = true;
|
||||
break;
|
||||
case IPMode.Specific:
|
||||
RadioButtonIPSpecific.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPortMode(PortMode value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case PortMode.FirstAvailable:
|
||||
PortModeFirstAvailableRadioButton.Checked = true;
|
||||
break;
|
||||
case PortMode.Specific:
|
||||
PortModeSpecificRadioButton.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void SetError(ErrorField field, string value)
|
||||
{
|
||||
EnableForm();
|
||||
switch (field)
|
||||
{
|
||||
case ErrorField.ApplicationPath:
|
||||
errorProvider1.SetError(ApplicationPathTextBox, value);
|
||||
break;
|
||||
case ErrorField.VirtualPath:
|
||||
errorProvider1.SetError(VirtualPathTextBox, value);
|
||||
break;
|
||||
case ErrorField.HostName:
|
||||
errorProvider1.SetError(HostNameTextBox, value);
|
||||
break;
|
||||
case ErrorField.IsAddHost:
|
||||
errorProvider1.SetError(AddHostEntryCheckBox, value);
|
||||
break;
|
||||
case ErrorField.IPAddress:
|
||||
errorProvider1.SetError(IPSpecificTextBox, value);
|
||||
break;
|
||||
case ErrorField.IPAddressAny:
|
||||
errorProvider1.SetError(IPModeAnyRadioButton, value);
|
||||
break;
|
||||
case ErrorField.IPAddressLoopBack:
|
||||
errorProvider1.SetError(IPModeLoopBackRadioButton, value);
|
||||
break;
|
||||
case ErrorField.Port:
|
||||
errorProvider1.SetError(PortTextBox, value);
|
||||
break;
|
||||
case ErrorField.PortRange:
|
||||
errorProvider1.SetError(PortRangeStartTextBox, value);
|
||||
errorProvider1.SetError(PortRangeEndTextBox, value);
|
||||
break;
|
||||
case ErrorField.PortRangeStart:
|
||||
errorProvider1.SetError(PortRangeStartTextBox, value);
|
||||
break;
|
||||
case ErrorField.PortRangeEnd:
|
||||
errorProvider1.SetError(PortRangeEndTextBox, value);
|
||||
break;
|
||||
case ErrorField.None:
|
||||
MessageBox.Show(value, "Error");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearError()
|
||||
{
|
||||
errorProvider1.Clear();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Handlers
|
||||
|
||||
private void BrowsePath(object sender, EventArgs e)
|
||||
{
|
||||
BrowsePath();
|
||||
}
|
||||
|
||||
private void HideMainForm(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void LaunchBrowser(object sender, EventArgs e)
|
||||
{
|
||||
LaunchBrowser();
|
||||
}
|
||||
|
||||
private void LaunchBrowser(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
LaunchBrowser();
|
||||
}
|
||||
|
||||
private void ShowHelp(object sender, EventArgs e)
|
||||
{
|
||||
ShowHelp();
|
||||
}
|
||||
|
||||
private void ShowLog(object sender, EventArgs e)
|
||||
{
|
||||
ShowLog();
|
||||
}
|
||||
|
||||
private void ShowMainForm(object sender, EventArgs e)
|
||||
{
|
||||
ShowMainForm();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Responds to the Start/Stop button
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void StartStop(object sender, EventArgs e)
|
||||
{
|
||||
StartStop();
|
||||
}
|
||||
|
||||
|
||||
private void ExitApp(object sender, EventArgs e)
|
||||
{
|
||||
ExitApp();
|
||||
}
|
||||
|
||||
private void HostNameChanged(object sender, EventArgs e)
|
||||
{
|
||||
HostNameChanged();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// If a timeout value is specifically set and we
|
||||
/// get a timeout event, just exit the application.
|
||||
/// This should always be the case, but will be
|
||||
/// a bit forgiving here and perform a check before
|
||||
/// dumping.
|
||||
/// </summary>
|
||||
private void OnTimedOut(object sender, EventArgs e)
|
||||
{
|
||||
InvokeStop();
|
||||
|
||||
if (TimeOut > 0)
|
||||
{
|
||||
ExitApp();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowMainForm();
|
||||
}
|
||||
}
|
||||
|
||||
#region Hinky lookin radios that depend on known state. Could be a source of trouble.
|
||||
|
||||
private void RadioButtonIPAny_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
IPSpecificTextBox.Enabled = false;
|
||||
IPV6CheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
private void RadioButtonIPLoopBack_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
IPSpecificTextBox.Enabled = false;
|
||||
IPV6CheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
private void RadioButtonIPSpecific_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
IPSpecificTextBox.Enabled = true;
|
||||
IPV6CheckBox.Enabled = false;
|
||||
IPV6CheckBox.Checked = false;
|
||||
}
|
||||
|
||||
private void RadioButtonPortFind_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
PortTextBox.Enabled = false;
|
||||
PortRangeEndTextBox.Enabled = true;
|
||||
PortRangeStartTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
private void RadioButtonPortSpecific_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
PortTextBox.Enabled = true;
|
||||
PortRangeEndTextBox.Enabled = false;
|
||||
PortRangeStartTextBox.Enabled = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,290 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>147, 17</value>
|
||||
</metadata>
|
||||
<data name="HostNameTextBox.ToolTip" xml:space="preserve">
|
||||
<value>The host name to use in place of 'localhost'.
|
||||
This value must be a valid DNS host name or be present in the local hosts file.
|
||||
You may check 'Add hosts entry' to add such an entry to the hosts file for the duration of the hosting session.
|
||||
Adding a hosts entry requires elevated permissions, both upon adding and again upon removal.</value>
|
||||
</data>
|
||||
<data name="AddHostEntryCheckBox.ToolTip" xml:space="preserve">
|
||||
<value>You may check 'Add hosts entry' to add such an entry to the hosts file for the duration of the hosting session.
|
||||
Adding a hosts entry requires elevated permissions, both upon adding and again upon removal.</value>
|
||||
</data>
|
||||
<data name="LabelHostName.ToolTip" xml:space="preserve">
|
||||
<value>The host name to use in place of 'localhost'.
|
||||
This value must be a valid DNS host name or be present in the local hosts file.
|
||||
You may check 'Add hosts entry' to add such an entry to the hosts file for the duration of the hosting session.
|
||||
Adding a hosts entry requires elevated permissions, both upon adding and again upon removal.
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="errorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>696, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>586, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAMDAAAAAAAACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAgAoAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA////AA+V+QDGiDAAj7euAHsfFQDsxn4ATuv/AKrZ/gC7iH8AAeL+AJpRSQBJqs4Az8jEAHO+
|
||||
/gC3w4gA1axVAPnqygCNTRkAIMXvAK+BVQCVvtkAPqH8APTZpwDXsp8A0en9AK5mKQBpx78A06Z7AKqi
|
||||
kgBw3/4AqNXFAE/D/gC6wa4Ax5BjAIk1KwBiruMALJXkAAa4+ABDw9gAjs3/AKloXgDGm5MAcKu6AB3n
|
||||
/wDu7+4A6s5iALbS5gDOlkUAfs7oAKSVYACzb0QAo4Z1AJpLMQCeucEA4bdtAIHBxgC4xdAA48i5ANy2
|
||||
iQAhqukAVcHLAL2lfwCzemsAvoRNADLM/QCpgTsA6MqYACmY+wDw370At5dwAF2z/gCoXj0Aqq6kAAjN
|
||||
+QCPqaAAu3gvAMazlAC+4v8Au5pOANDBogCjVSQAkTodAGLZ/wCV3P4Au6WgAJLJogCqxaEA1KZqAHiz
|
||||
1wCgb1IAr6+UAGXo/wDFk30AycSHAHfN+wDUqYsAqcrYAES95QCF2f4AhSwfADjK5gCOxOYAyrV+ALGa
|
||||
fAC7flkAosCzAGbH/wCRucAAFLf0AJNHPQDCztsAvIZtAF682ADawnUAsohkAKJcTwDH3/IA1KBQAMa7
|
||||
ogCZsKoAoWo+APfgrQC4u78A8tWaAMmSUQDLpJwAmEUhAI09MACSzN4A0Jk6AK5vWQCw1/IAy5huANW/
|
||||
lwDpwHMAzbBlABjL9ADbvKsAhsT0AKV6bgCod10Asod2ALavqQDqx4cA2K96AKRXLwDIjjwAwZGJAODE
|
||||
ngCbXDkAunpDAOW+ewDAhmAAcNT/ALJuMgCe0/8AhsS5AKOoogAluecAosrBAALY/QB/xf4AYsPNAMOo
|
||||
iwC3hVUAppmGADDD7QDgvJcADcD3AL6gdgCW2PQAiLfNAGzq/wC6s7QAorW3AKtlSgCaTkAAwoM3AKqD
|
||||
ZAC4d04A26xaAM+bWwDHqoIAbLa7AMuchQCsZDMA055IALzNhQC0gS8AV8XZAJ5RKQD45b8AZbn+AKVh
|
||||
KAC2cCsA16+UAK9xZQC03v8AtX1zALaRdwCdTSIAoFlFAKyPcQBMvOAAsXxDANCgcgDXrYMAkTwkAMGA
|
||||
LgDMkTIA0KqiAKp2TgC0eGEArqCJAMfk/gB3ws8A0eLyAK14PADp0akAqWsuAMKHVwCtZT8AxoxFAKm8
|
||||
pwDitWIAot7+AKhkVgDHxcoAzZ93AMCviwDAjXcAn8G6AJRFNgChVDgAnWZGAATL+wA/xOMA16txAIEm
|
||||
GgDOnmQAtnM8AMq3mgCxwaYAizMcACSS6AB62/0A5sugALJvTgCqXiUA9N2zAJy6ygCvvK4Alb/BAKpt
|
||||
RAC4uqUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAH2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAABGoPIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEhISEhLUavxz
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyVHCwtyl2tzN/9ikyQAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAH+SGkx9zzuoO1jwd2J3FLRIfwAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAADQvxrD0e6oQxdDQ/fbUGL9qkyb3kgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI+pphc7u
|
||||
7jtDF/r6wPpDhnHM8kBMmxqS6QAAAAAAAAAAAAAAAAAAAAAAAAAAAAB01WmXsrKTuzdDERHAehcXlTht
|
||||
IUbRTMMaUX8AAAAAAAAAAAAAAAAAAAAAAAAAAOOS+cNMTNED0oK1wMAREXoX9+gm2E1Mw8PDGlHQ7wAA
|
||||
AAAAAAAAAAAAAAAAAAAAsX/5GhrDw9ED0jf6F3p6ehER2yGpp3fNwxoaGvm/0O8AAAAAAAAAAAAAAAAA
|
||||
AADpf1H5+ZvDTNEDtTeQF3p6ehcXRVATqehGwxr5+VFRyfQAAAAAAAAAAAAAAAAAACNSv1GS+RrDTNF2
|
||||
N+EGfBd8fHx8fIbt7L5Nm8P5UVHJyX9kAAAAAAAAAAAAAAAA7/R/v8lR+cPD0TDudgYGBgYGBoeHhzuj
|
||||
7In/pcMa+VHJf3/QZAAAAAAAAAAAAAAAZNB/v8lRGsPDspHSmJCQBgYGBoeHh5id7Eo4PsMa+VHJf1LQ
|
||||
NQAAAAAAAAAAAADv0FJ/yVH5GsNMz5N2kAYGBgaHh4eHNzdX7KFlTdoa+flRf1JSymQAAAAAAAAAAABk
|
||||
9FJ/yVG6m5fOkwMwmJiYmIeHh4c3NxBeSgpK4EbcGvlRyX9S0AsFAAAAAAAAACNk9FJ/kroaQCLw0dED
|
||||
dpiYmJiHhzc3tYJyEwqho+alGvlRyX9S9HRkAAAAAAAAAGRkUjWSUTObGhxM0dEDMJiYmJg3N7vS0tI3
|
||||
J6EKE+ZGl/lRyX9SUuluAAAAAAAAAO/QNX9/Ufn53UDDTNF2MLU3N7V2MjJCvQO1G6EK7ARGpbpRyX9S
|
||||
9PR0BQAAAAAAI2TpUlJ/UVH5hcPDTFh9AwOTA9KT82pniE8QVuwKoSe33GlRyX9/UoDK7wAAAAAA6dD0
|
||||
UlJ/UVGZ8ZtMfTvf0QMDAwMD5vUlKw8uvOwKoalbFBozyZJ/UsrKIwAAAAAAC+9SUlJ/UZKF+RrwO8+R
|
||||
ttGTMAPRPiQWRAI8PUoKCuy4RlEzMzPef8qwgAAAAAAAse9SUn/JUTMz8c7PlRwc7rbR0dHRqllHR8Eg
|
||||
QaEKCqGfPnm6mTMzSOqwbgAAAAAAbu/00H9/yXC6z92FOxzPzxzfst/wt6zBwcFrU60HLKEmS7O6tLTe
|
||||
3t5IbgAAAAAA6WT00FJ/yZkiz5eF5c7OzxwcHBwct2zBwcFrU1xcrVxBDGj+M7TeSEjq6QAAAAAAZLH0
|
||||
0FJ/sN4iz92Z5eUcOxzOzs7Ot68ODg5rmh6trVweX9azM7TnSEjq6QAAAAAA78pSUlJS1ZLlzxzdYM+o
|
||||
O87Ozs7Ot0kOog5fmh4eHh4eX6/IM5kYSEjq6QAAAAAAZGR09NB/cPhgzxwcqKioqKjOhYWF5VuioqKi
|
||||
X/b2BGwxX2Zo1N6KSOrq6QAAAAAAZGSAyurKcGnEYBwcz6g7qKgchYUil2iLKKKiY2NjeEZGHTYNyN5w
|
||||
SOrKIwAAAAAAZO/QPz/V1XDEYM8cHMTOHKioHCKbGkZmKCgoKGNj/XOS/nOKaUhI6up0ZAAAAAAAAO/j
|
||||
xQkqg13ExGBgHBzOHDvPzt3xm3MVKCgoKFRUgcu/f3+/SEjq6uqxZAAAAAAAAG4/P8Uq57nExMTEYMTO
|
||||
hYWFIiJAGnP7nJycnFRUq8uWf5KS6kjq6jUjAAAAAAAAACPHxz+UcBgYxMRgqKhghYWFIiKXl3OvnJyc
|
||||
nJxUVKbrf97qf+rQNTUjAAAAAAAAAAApx8eUxT86isRgYGDEHIUzIiIiIqWenJycnJzi4p5af5I19PRk
|
||||
NbEjAAAAAAAAAACACQkqxz/nijoYYGAchYWStJkimf5JCAgICAji4q+Nf+p/9PTv6W4AAAAAAAAAAAAA
|
||||
KQmUlMc/XRiKOhi5XZLJ3pnektUdCAgICAgICGGzNUiw0NDpdAAAAAAAAAAAAAAAIwmUKgnHxxgYxIqK
|
||||
ikh/f0i6yYNoCMbGxggIxoSzykjVg+Ox7wAAAAAAAAAAAAAAAG4qfgkJx7kYGMRgYBhd53Bpkr/IhMbG
|
||||
xsbGxsY0jXBdyjUjAAAAAAAAAAAAAAAAAAB005QJCQkYGMRgYLmZ3rBd1dWkL05OTk5OxsaPjtXVdOkA
|
||||
AAAAAAAAAAAAAAAAAAAAxX4qlJQqGBjEuefV6kg1f0hwOU5OTk5OTk57yIODsQAAAAAAAAAAAAAAAAAA
|
||||
AAAAAMcqKpSUihgY510/4zU1SPhze9fX19fXTk5vyINuAAAAAAAAAAAAAAAAAAAAAAAAAAApKirTiooY
|
||||
x8fF48o16rBdDa5v19fX19d1jm4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAbgkqKn7TCcfFxSnpsXR0xdU/
|
||||
jlXk2RkZjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALCSp+KgnHP8UpKXR0dMp04z/njo4NLQAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvH036UCZTHx8fjdHTj48qAAAAALQAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAALHFCZSUlAkJKbGA7wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD////n//8AAP///8f//wAA///4A///
|
||||
AAD//8AB//8AAP//AAA//wAA//wAAB//AAD/8AAAB/8AAP/gAAAD/wAA/8AAAAD/AAD/gAAAAH8AAP8A
|
||||
AAAAfwAA/gAAAAA/AAD8AAAAAB8AAPwAAAAAHwAA+AAAAAAPAAD4AAAAAAcAAPAAAAAABwAA8AAAAAAH
|
||||
AADwAAAAAAMAAOAAAAAAAwAA4AAAAAADAADgAAAAAAMAAOAAAAAAAwAA4AAAAAADAADgAAAAAAMAAOAA
|
||||
AAAAAwAA4AAAAAADAADgAAAAAAMAAOAAAAAAAwAA4AAAAAADAADwAAAAAAMAAPAAAAAABwAA8AAAAAAH
|
||||
AAD4AAAAAAcAAPgAAAAADwAA/AAAAAAfAAD8AAAAAB8AAP4AAAAAPwAA/wAAAAB/AAD/gAAAAP8AAP/A
|
||||
AAAB/wAA/+AAAAP/AAD/8AAAB/8AAP/8AAAH/wAA//8AAHf/AAD//+AB//8AAP///////wAA
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="TrayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>346, 17</value>
|
||||
</metadata>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>441, 17</value>
|
||||
</metadata>
|
||||
<data name="TrayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAMDAAAAAAAACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAgAoAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA////AA+V+QDGiDAAj7euAHsfFQDsxn4ATuv/AKrZ/gC7iH8AAeL+AJpRSQBJqs4Az8jEAHO+
|
||||
/gC3w4gA1axVAPnqygCNTRkAIMXvAK+BVQCVvtkAPqH8APTZpwDXsp8A0en9AK5mKQBpx78A06Z7AKqi
|
||||
kgBw3/4AqNXFAE/D/gC6wa4Ax5BjAIk1KwBiruMALJXkAAa4+ABDw9gAjs3/AKloXgDGm5MAcKu6AB3n
|
||||
/wDu7+4A6s5iALbS5gDOlkUAfs7oAKSVYACzb0QAo4Z1AJpLMQCeucEA4bdtAIHBxgC4xdAA48i5ANy2
|
||||
iQAhqukAVcHLAL2lfwCzemsAvoRNADLM/QCpgTsA6MqYACmY+wDw370At5dwAF2z/gCoXj0Aqq6kAAjN
|
||||
+QCPqaAAu3gvAMazlAC+4v8Au5pOANDBogCjVSQAkTodAGLZ/wCV3P4Au6WgAJLJogCqxaEA1KZqAHiz
|
||||
1wCgb1IAr6+UAGXo/wDFk30AycSHAHfN+wDUqYsAqcrYAES95QCF2f4AhSwfADjK5gCOxOYAyrV+ALGa
|
||||
fAC7flkAosCzAGbH/wCRucAAFLf0AJNHPQDCztsAvIZtAF682ADawnUAsohkAKJcTwDH3/IA1KBQAMa7
|
||||
ogCZsKoAoWo+APfgrQC4u78A8tWaAMmSUQDLpJwAmEUhAI09MACSzN4A0Jk6AK5vWQCw1/IAy5huANW/
|
||||
lwDpwHMAzbBlABjL9ADbvKsAhsT0AKV6bgCod10Asod2ALavqQDqx4cA2K96AKRXLwDIjjwAwZGJAODE
|
||||
ngCbXDkAunpDAOW+ewDAhmAAcNT/ALJuMgCe0/8AhsS5AKOoogAluecAosrBAALY/QB/xf4AYsPNAMOo
|
||||
iwC3hVUAppmGADDD7QDgvJcADcD3AL6gdgCW2PQAiLfNAGzq/wC6s7QAorW3AKtlSgCaTkAAwoM3AKqD
|
||||
ZAC4d04A26xaAM+bWwDHqoIAbLa7AMuchQCsZDMA055IALzNhQC0gS8AV8XZAJ5RKQD45b8AZbn+AKVh
|
||||
KAC2cCsA16+UAK9xZQC03v8AtX1zALaRdwCdTSIAoFlFAKyPcQBMvOAAsXxDANCgcgDXrYMAkTwkAMGA
|
||||
LgDMkTIA0KqiAKp2TgC0eGEArqCJAMfk/gB3ws8A0eLyAK14PADp0akAqWsuAMKHVwCtZT8AxoxFAKm8
|
||||
pwDitWIAot7+AKhkVgDHxcoAzZ93AMCviwDAjXcAn8G6AJRFNgChVDgAnWZGAATL+wA/xOMA16txAIEm
|
||||
GgDOnmQAtnM8AMq3mgCxwaYAizMcACSS6AB62/0A5sugALJvTgCqXiUA9N2zAJy6ygCvvK4Alb/BAKpt
|
||||
RAC4uqUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAH2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAABGoPIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEhISEhLUavxz
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyVHCwtyl2tzN/9ikyQAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAH+SGkx9zzuoO1jwd2J3FLRIfwAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAADQvxrD0e6oQxdDQ/fbUGL9qkyb3kgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI+pphc7u
|
||||
7jtDF/r6wPpDhnHM8kBMmxqS6QAAAAAAAAAAAAAAAAAAAAAAAAAAAAB01WmXsrKTuzdDERHAehcXlTht
|
||||
IUbRTMMaUX8AAAAAAAAAAAAAAAAAAAAAAAAAAOOS+cNMTNED0oK1wMAREXoX9+gm2E1Mw8PDGlHQ7wAA
|
||||
AAAAAAAAAAAAAAAAAAAAsX/5GhrDw9ED0jf6F3p6ehER2yGpp3fNwxoaGvm/0O8AAAAAAAAAAAAAAAAA
|
||||
AADpf1H5+ZvDTNEDtTeQF3p6ehcXRVATqehGwxr5+VFRyfQAAAAAAAAAAAAAAAAAACNSv1GS+RrDTNF2
|
||||
N+EGfBd8fHx8fIbt7L5Nm8P5UVHJyX9kAAAAAAAAAAAAAAAA7/R/v8lR+cPD0TDudgYGBgYGBoeHhzuj
|
||||
7In/pcMa+VHJf3/QZAAAAAAAAAAAAAAAZNB/v8lRGsPDspHSmJCQBgYGBoeHh5id7Eo4PsMa+VHJf1LQ
|
||||
NQAAAAAAAAAAAADv0FJ/yVH5GsNMz5N2kAYGBgaHh4eHNzdX7KFlTdoa+flRf1JSymQAAAAAAAAAAABk
|
||||
9FJ/yVG6m5fOkwMwmJiYmIeHh4c3NxBeSgpK4EbcGvlRyX9S0AsFAAAAAAAAACNk9FJ/kroaQCLw0dED
|
||||
dpiYmJiHhzc3tYJyEwqho+alGvlRyX9S9HRkAAAAAAAAAGRkUjWSUTObGhxM0dEDMJiYmJg3N7vS0tI3
|
||||
J6EKE+ZGl/lRyX9SUuluAAAAAAAAAO/QNX9/Ufn53UDDTNF2MLU3N7V2MjJCvQO1G6EK7ARGpbpRyX9S
|
||||
9PR0BQAAAAAAI2TpUlJ/UVH5hcPDTFh9AwOTA9KT82pniE8QVuwKoSe33GlRyX9/UoDK7wAAAAAA6dD0
|
||||
UlJ/UVGZ8ZtMfTvf0QMDAwMD5vUlKw8uvOwKoalbFBozyZJ/UsrKIwAAAAAAC+9SUlJ/UZKF+RrwO8+R
|
||||
ttGTMAPRPiQWRAI8PUoKCuy4RlEzMzPef8qwgAAAAAAAse9SUn/JUTMz8c7PlRwc7rbR0dHRqllHR8Eg
|
||||
QaEKCqGfPnm6mTMzSOqwbgAAAAAAbu/00H9/yXC6z92FOxzPzxzfst/wt6zBwcFrU60HLKEmS7O6tLTe
|
||||
3t5IbgAAAAAA6WT00FJ/yZkiz5eF5c7OzxwcHBwct2zBwcFrU1xcrVxBDGj+M7TeSEjq6QAAAAAAZLH0
|
||||
0FJ/sN4iz92Z5eUcOxzOzs7Ot68ODg5rmh6trVweX9azM7TnSEjq6QAAAAAA78pSUlJS1ZLlzxzdYM+o
|
||||
O87Ozs7Ot0kOog5fmh4eHh4eX6/IM5kYSEjq6QAAAAAAZGR09NB/cPhgzxwcqKioqKjOhYWF5VuioqKi
|
||||
X/b2BGwxX2Zo1N6KSOrq6QAAAAAAZGSAyurKcGnEYBwcz6g7qKgchYUil2iLKKKiY2NjeEZGHTYNyN5w
|
||||
SOrKIwAAAAAAZO/QPz/V1XDEYM8cHMTOHKioHCKbGkZmKCgoKGNj/XOS/nOKaUhI6up0ZAAAAAAAAO/j
|
||||
xQkqg13ExGBgHBzOHDvPzt3xm3MVKCgoKFRUgcu/f3+/SEjq6uqxZAAAAAAAAG4/P8Uq57nExMTEYMTO
|
||||
hYWFIiJAGnP7nJycnFRUq8uWf5KS6kjq6jUjAAAAAAAAACPHxz+UcBgYxMRgqKhghYWFIiKXl3OvnJyc
|
||||
nJxUVKbrf97qf+rQNTUjAAAAAAAAAAApx8eUxT86isRgYGDEHIUzIiIiIqWenJycnJzi4p5af5I19PRk
|
||||
NbEjAAAAAAAAAACACQkqxz/nijoYYGAchYWStJkimf5JCAgICAji4q+Nf+p/9PTv6W4AAAAAAAAAAAAA
|
||||
KQmUlMc/XRiKOhi5XZLJ3pnektUdCAgICAgICGGzNUiw0NDpdAAAAAAAAAAAAAAAIwmUKgnHxxgYxIqK
|
||||
ikh/f0i6yYNoCMbGxggIxoSzykjVg+Ox7wAAAAAAAAAAAAAAAG4qfgkJx7kYGMRgYBhd53Bpkr/IhMbG
|
||||
xsbGxsY0jXBdyjUjAAAAAAAAAAAAAAAAAAB005QJCQkYGMRgYLmZ3rBd1dWkL05OTk5OxsaPjtXVdOkA
|
||||
AAAAAAAAAAAAAAAAAAAAxX4qlJQqGBjEuefV6kg1f0hwOU5OTk5OTk57yIODsQAAAAAAAAAAAAAAAAAA
|
||||
AAAAAMcqKpSUihgY510/4zU1SPhze9fX19fXTk5vyINuAAAAAAAAAAAAAAAAAAAAAAAAAAApKirTiooY
|
||||
x8fF48o16rBdDa5v19fX19d1jm4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAbgkqKn7TCcfFxSnpsXR0xdU/
|
||||
jlXk2RkZjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALCSp+KgnHP8UpKXR0dMp04z/njo4NLQAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvH036UCZTHx8fjdHTj48qAAAAALQAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAALHFCZSUlAkJKbGA7wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD////n//8AAP///8f//wAA///4A///
|
||||
AAD//8AB//8AAP//AAA//wAA//wAAB//AAD/8AAAB/8AAP/gAAAD/wAA/8AAAAD/AAD/gAAAAH8AAP8A
|
||||
AAAAfwAA/gAAAAA/AAD8AAAAAB8AAPwAAAAAHwAA+AAAAAAPAAD4AAAAAAcAAPAAAAAABwAA8AAAAAAH
|
||||
AADwAAAAAAMAAOAAAAAAAwAA4AAAAAADAADgAAAAAAMAAOAAAAAAAwAA4AAAAAADAADgAAAAAAMAAOAA
|
||||
AAAAAwAA4AAAAAADAADgAAAAAAMAAOAAAAAAAwAA4AAAAAADAADwAAAAAAMAAPAAAAAABwAA8AAAAAAH
|
||||
AAD4AAAAAAcAAPgAAAAADwAA/AAAAAAfAAD8AAAAAB8AAP4AAAAAPwAA/wAAAAB/AAD/gAAAAP8AAP/A
|
||||
AAAB/wAA/+AAAAP/AAD/8AAAB/8AAP/8AAAH/wAA//8AAHf/AAD//+AB//8AAP///////wAA
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,356 @@
|
|||
namespace CassiniDev.ServerLog
|
||||
{
|
||||
partial class LogView
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LogView));
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.scrollLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.listView1 = new System.Windows.Forms.ListView();
|
||||
this.TypeHeader = new System.Windows.Forms.ColumnHeader();
|
||||
this.CreatedHeader = new System.Windows.Forms.ColumnHeader();
|
||||
this.StatusHeader = new System.Windows.Forms.ColumnHeader();
|
||||
this.UrlHeader = new System.Windows.Forms.ColumnHeader();
|
||||
this.PathTranslatedHeader = new System.Windows.Forms.ColumnHeader();
|
||||
this.IdentityHeader = new System.Windows.Forms.ColumnHeader();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.headersRichTextBox = new System.Windows.Forms.RichTextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.exceptionRichTextBox = new System.Windows.Forms.RichTextBox();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.bodyBodyView = new CassiniDev.ServerLog.BodyView();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.splitContainer3.Panel1.SuspendLayout();
|
||||
this.splitContainer3.Panel2.SuspendLayout();
|
||||
this.splitContainer3.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.optionsToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(805, 24);
|
||||
this.menuStrip1.TabIndex = 38;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.clearToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// clearToolStripMenuItem
|
||||
//
|
||||
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
|
||||
this.clearToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
|
||||
this.clearToolStripMenuItem.Text = "&Clear";
|
||||
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(96, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// optionsToolStripMenuItem
|
||||
//
|
||||
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.scrollLogToolStripMenuItem});
|
||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
|
||||
this.optionsToolStripMenuItem.Text = "&Options";
|
||||
//
|
||||
// scrollLogToolStripMenuItem
|
||||
//
|
||||
this.scrollLogToolStripMenuItem.Checked = true;
|
||||
this.scrollLogToolStripMenuItem.CheckOnClick = true;
|
||||
this.scrollLogToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.scrollLogToolStripMenuItem.Name = "scrollLogToolStripMenuItem";
|
||||
this.scrollLogToolStripMenuItem.Size = new System.Drawing.Size(119, 22);
|
||||
this.scrollLogToolStripMenuItem.Text = "&Scroll Log";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 24);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.listView1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(805, 436);
|
||||
this.splitContainer1.SplitterDistance = 196;
|
||||
this.splitContainer1.TabIndex = 39;
|
||||
//
|
||||
// listView1
|
||||
//
|
||||
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.TypeHeader,
|
||||
this.CreatedHeader,
|
||||
this.StatusHeader,
|
||||
this.UrlHeader,
|
||||
this.PathTranslatedHeader,
|
||||
this.IdentityHeader});
|
||||
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listView1.FullRowSelect = true;
|
||||
this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.listView1.HideSelection = false;
|
||||
this.listView1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listView1.MultiSelect = false;
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.Size = new System.Drawing.Size(805, 196);
|
||||
this.listView1.TabIndex = 0;
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.listView1.View = System.Windows.Forms.View.Details;
|
||||
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
|
||||
//
|
||||
// TypeHeader
|
||||
//
|
||||
this.TypeHeader.Text = "Type";
|
||||
this.TypeHeader.Width = 80;
|
||||
//
|
||||
// CreatedHeader
|
||||
//
|
||||
this.CreatedHeader.Text = "Created";
|
||||
this.CreatedHeader.Width = 180;
|
||||
//
|
||||
// StatusHeader
|
||||
//
|
||||
this.StatusHeader.Text = "Status";
|
||||
//
|
||||
// UrlHeader
|
||||
//
|
||||
this.UrlHeader.Text = "Url";
|
||||
this.UrlHeader.Width = 160;
|
||||
//
|
||||
// PathTranslatedHeader
|
||||
//
|
||||
this.PathTranslatedHeader.Text = "PathTranslated";
|
||||
this.PathTranslatedHeader.Width = 200;
|
||||
//
|
||||
// IdentityHeader
|
||||
//
|
||||
this.IdentityHeader.Text = "Identity";
|
||||
this.IdentityHeader.Width = 100;
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.splitContainer3);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.groupBox3);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(805, 236);
|
||||
this.splitContainer2.SplitterDistance = 289;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// splitContainer3
|
||||
//
|
||||
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer3.Name = "splitContainer3";
|
||||
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer3.Panel1
|
||||
//
|
||||
this.splitContainer3.Panel1.Controls.Add(this.groupBox2);
|
||||
//
|
||||
// splitContainer3.Panel2
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.groupBox1);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(289, 236);
|
||||
this.splitContainer3.SplitterDistance = 172;
|
||||
this.splitContainer3.TabIndex = 0;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.headersRichTextBox);
|
||||
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox2.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(289, 172);
|
||||
this.groupBox2.TabIndex = 0;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Headers";
|
||||
//
|
||||
// headersRichTextBox
|
||||
//
|
||||
this.headersRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.headersRichTextBox.Location = new System.Drawing.Point(3, 16);
|
||||
this.headersRichTextBox.Name = "headersRichTextBox";
|
||||
this.headersRichTextBox.ReadOnly = true;
|
||||
this.headersRichTextBox.Size = new System.Drawing.Size(283, 153);
|
||||
this.headersRichTextBox.TabIndex = 45;
|
||||
this.headersRichTextBox.Text = "";
|
||||
this.headersRichTextBox.WordWrap = false;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.exceptionRichTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(289, 60);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Exception - TODO";
|
||||
//
|
||||
// exceptionRichTextBox
|
||||
//
|
||||
this.exceptionRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.exceptionRichTextBox.Location = new System.Drawing.Point(3, 16);
|
||||
this.exceptionRichTextBox.Name = "exceptionRichTextBox";
|
||||
this.exceptionRichTextBox.ReadOnly = true;
|
||||
this.exceptionRichTextBox.Size = new System.Drawing.Size(283, 41);
|
||||
this.exceptionRichTextBox.TabIndex = 43;
|
||||
this.exceptionRichTextBox.Text = "This field will contain full exception detail.\nNo more ambiguous HttpExceptions.\n" +
|
||||
"";
|
||||
this.exceptionRichTextBox.WordWrap = false;
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.bodyBodyView);
|
||||
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox3.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(512, 236);
|
||||
this.groupBox3.TabIndex = 0;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Body";
|
||||
//
|
||||
// bodyBodyView
|
||||
//
|
||||
this.bodyBodyView.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
|
||||
this.bodyBodyView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.bodyBodyView.Location = new System.Drawing.Point(3, 16);
|
||||
this.bodyBodyView.Name = "bodyBodyView";
|
||||
this.bodyBodyView.Size = new System.Drawing.Size(506, 217);
|
||||
this.bodyBodyView.TabIndex = 41;
|
||||
this.bodyBodyView.Value = null;
|
||||
//
|
||||
// LogView
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.ClientSize = new System.Drawing.Size(805, 460);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "LogView";
|
||||
this.Text = "LogView";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.ResumeLayout(false);
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem scrollLogToolStripMenuItem;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.SplitContainer splitContainer3;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private BodyView bodyBodyView;
|
||||
private System.Windows.Forms.RichTextBox exceptionRichTextBox;
|
||||
private System.Windows.Forms.RichTextBox headersRichTextBox;
|
||||
private System.Windows.Forms.ListView listView1;
|
||||
private System.Windows.Forms.ColumnHeader TypeHeader;
|
||||
private System.Windows.Forms.ColumnHeader CreatedHeader;
|
||||
private System.Windows.Forms.ColumnHeader StatusHeader;
|
||||
private System.Windows.Forms.ColumnHeader UrlHeader;
|
||||
private System.Windows.Forms.ColumnHeader PathTranslatedHeader;
|
||||
private System.Windows.Forms.ColumnHeader IdentityHeader;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
// **********************************************************************************
|
||||
// CassiniDev - http://cassinidev.codeplex.com
|
||||
//
|
||||
// Copyright (c) Sky Sanders. All rights reserved.
|
||||
//
|
||||
// This source code is subject to terms and conditions of the Microsoft Public
|
||||
// License (Ms-PL). A copy of the license can be found in the license.htm file
|
||||
// included in this distribution.
|
||||
//
|
||||
// You must not remove this notice, or any other, from this software.
|
||||
//
|
||||
// **********************************************************************************
|
||||
|
||||
#region
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CassiniDev.ServerLog
|
||||
{
|
||||
/// <summary>
|
||||
/// If log can persist, then only stack values in the list and tag the items with the RowId for querying the db for heavy values.
|
||||
/// If not, tag the item with the loginfo instance. Memory usage will be much greater but is better than nothing.
|
||||
/// </summary>
|
||||
public partial class LogView : Form
|
||||
{
|
||||
|
||||
|
||||
|
||||
private Server _server;
|
||||
|
||||
public LogView(Server server)
|
||||
{
|
||||
InitializeComponent();
|
||||
_server = server;
|
||||
_server.RequestComplete += RequestComplete;
|
||||
|
||||
|
||||
InitializeList();
|
||||
|
||||
base.Text = SR.GetString(SR.WebdevLogViewerNameWithPort, _server.Port);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not sure if these qualify for disposable
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
_server.RequestComplete -= RequestComplete;
|
||||
_server = null;
|
||||
|
||||
}
|
||||
|
||||
private void AddLogRows(IEnumerable<LogInfo> items)
|
||||
{
|
||||
listView1.SuspendLayout();
|
||||
|
||||
foreach (LogInfo item in items)
|
||||
{
|
||||
ListViewItem a = new ListViewItem(new[]
|
||||
{
|
||||
item.RowType == 0 ? "" : item.RowType == 1 ? "Request" : "Response",
|
||||
item.Created.ToString(),
|
||||
item.StatusCode.ToString(),
|
||||
item.Url,
|
||||
item.PathTranslated,
|
||||
item.Identity
|
||||
})
|
||||
{
|
||||
Tag = item
|
||||
};
|
||||
listView1.Items.Add(a);
|
||||
}
|
||||
|
||||
if (listView1.Items.Count > 0 && scrollLogToolStripMenuItem.Checked)
|
||||
{
|
||||
int lastRow = listView1.Items.Count - 1;
|
||||
listView1.EnsureVisible(lastRow);
|
||||
}
|
||||
listView1.ResumeLayout();
|
||||
}
|
||||
|
||||
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
InitializeList();
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private LogInfo GetSelectedLogItem()
|
||||
{
|
||||
object tag = listView1.Items[listView1.SelectedIndices[0]].Tag;
|
||||
|
||||
LogInfo returnValue = (LogInfo)tag;
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
private void InitializeList()
|
||||
{
|
||||
listView1.SuspendLayout();
|
||||
listView1.Items.Clear();
|
||||
listView1.ResumeLayout();
|
||||
}
|
||||
|
||||
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedIndices.Count > 0)
|
||||
{
|
||||
LogInfo log = GetSelectedLogItem();
|
||||
exceptionRichTextBox.Text = log.Exception;
|
||||
headersRichTextBox.Text = log.Headers;
|
||||
bodyBodyView.Value = log.Body;
|
||||
}
|
||||
else
|
||||
{
|
||||
exceptionRichTextBox.Text = "";
|
||||
headersRichTextBox.Text = "";
|
||||
bodyBodyView.Value = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void RequestComplete(object sender, RequestEventArgs e)
|
||||
{
|
||||
Invoke(new MethodInvoker(() => AddLogRows(new[] { e.RequestLog, e.ResponseLog })));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,194 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>175, 17</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>267, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAMDAAAAAAAACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAgAoAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA////AA+V+QDGiDAAj7euAHsfFQDsxn4ATuv/AKrZ/gC7iH8AAeL+AJpRSQBJqs4Az8jEAHO+
|
||||
/gC3w4gA1axVAPnqygCNTRkAIMXvAK+BVQCVvtkAPqH8APTZpwDXsp8A0en9AK5mKQBpx78A06Z7AKqi
|
||||
kgBw3/4AqNXFAE/D/gC6wa4Ax5BjAIk1KwBiruMALJXkAAa4+ABDw9gAjs3/AKloXgDGm5MAcKu6AB3n
|
||||
/wDu7+4A6s5iALbS5gDOlkUAfs7oAKSVYACzb0QAo4Z1AJpLMQCeucEA4bdtAIHBxgC4xdAA48i5ANy2
|
||||
iQAhqukAVcHLAL2lfwCzemsAvoRNADLM/QCpgTsA6MqYACmY+wDw370At5dwAF2z/gCoXj0Aqq6kAAjN
|
||||
+QCPqaAAu3gvAMazlAC+4v8Au5pOANDBogCjVSQAkTodAGLZ/wCV3P4Au6WgAJLJogCqxaEA1KZqAHiz
|
||||
1wCgb1IAr6+UAGXo/wDFk30AycSHAHfN+wDUqYsAqcrYAES95QCF2f4AhSwfADjK5gCOxOYAyrV+ALGa
|
||||
fAC7flkAosCzAGbH/wCRucAAFLf0AJNHPQDCztsAvIZtAF682ADawnUAsohkAKJcTwDH3/IA1KBQAMa7
|
||||
ogCZsKoAoWo+APfgrQC4u78A8tWaAMmSUQDLpJwAmEUhAI09MACSzN4A0Jk6AK5vWQCw1/IAy5huANW/
|
||||
lwDpwHMAzbBlABjL9ADbvKsAhsT0AKV6bgCod10Asod2ALavqQDqx4cA2K96AKRXLwDIjjwAwZGJAODE
|
||||
ngCbXDkAunpDAOW+ewDAhmAAcNT/ALJuMgCe0/8AhsS5AKOoogAluecAosrBAALY/QB/xf4AYsPNAMOo
|
||||
iwC3hVUAppmGADDD7QDgvJcADcD3AL6gdgCW2PQAiLfNAGzq/wC6s7QAorW3AKtlSgCaTkAAwoM3AKqD
|
||||
ZAC4d04A26xaAM+bWwDHqoIAbLa7AMuchQCsZDMA055IALzNhQC0gS8AV8XZAJ5RKQD45b8AZbn+AKVh
|
||||
KAC2cCsA16+UAK9xZQC03v8AtX1zALaRdwCdTSIAoFlFAKyPcQBMvOAAsXxDANCgcgDXrYMAkTwkAMGA
|
||||
LgDMkTIA0KqiAKp2TgC0eGEArqCJAMfk/gB3ws8A0eLyAK14PADp0akAqWsuAMKHVwCtZT8AxoxFAKm8
|
||||
pwDitWIAot7+AKhkVgDHxcoAzZ93AMCviwDAjXcAn8G6AJRFNgChVDgAnWZGAATL+wA/xOMA16txAIEm
|
||||
GgDOnmQAtnM8AMq3mgCxwaYAizMcACSS6AB62/0A5sugALJvTgCqXiUA9N2zAJy6ygCvvK4Alb/BAKpt
|
||||
RAC4uqUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAH2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAABGoPIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEhISEhLUavxz
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyVHCwtyl2tzN/9ikyQAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAH+SGkx9zzuoO1jwd2J3FLRIfwAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAADQvxrD0e6oQxdDQ/fbUGL9qkyb3kgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI+pphc7u
|
||||
7jtDF/r6wPpDhnHM8kBMmxqS6QAAAAAAAAAAAAAAAAAAAAAAAAAAAAB01WmXsrKTuzdDERHAehcXlTht
|
||||
IUbRTMMaUX8AAAAAAAAAAAAAAAAAAAAAAAAAAOOS+cNMTNED0oK1wMAREXoX9+gm2E1Mw8PDGlHQ7wAA
|
||||
AAAAAAAAAAAAAAAAAAAAsX/5GhrDw9ED0jf6F3p6ehER2yGpp3fNwxoaGvm/0O8AAAAAAAAAAAAAAAAA
|
||||
AADpf1H5+ZvDTNEDtTeQF3p6ehcXRVATqehGwxr5+VFRyfQAAAAAAAAAAAAAAAAAACNSv1GS+RrDTNF2
|
||||
N+EGfBd8fHx8fIbt7L5Nm8P5UVHJyX9kAAAAAAAAAAAAAAAA7/R/v8lR+cPD0TDudgYGBgYGBoeHhzuj
|
||||
7In/pcMa+VHJf3/QZAAAAAAAAAAAAAAAZNB/v8lRGsPDspHSmJCQBgYGBoeHh5id7Eo4PsMa+VHJf1LQ
|
||||
NQAAAAAAAAAAAADv0FJ/yVH5GsNMz5N2kAYGBgaHh4eHNzdX7KFlTdoa+flRf1JSymQAAAAAAAAAAABk
|
||||
9FJ/yVG6m5fOkwMwmJiYmIeHh4c3NxBeSgpK4EbcGvlRyX9S0AsFAAAAAAAAACNk9FJ/kroaQCLw0dED
|
||||
dpiYmJiHhzc3tYJyEwqho+alGvlRyX9S9HRkAAAAAAAAAGRkUjWSUTObGhxM0dEDMJiYmJg3N7vS0tI3
|
||||
J6EKE+ZGl/lRyX9SUuluAAAAAAAAAO/QNX9/Ufn53UDDTNF2MLU3N7V2MjJCvQO1G6EK7ARGpbpRyX9S
|
||||
9PR0BQAAAAAAI2TpUlJ/UVH5hcPDTFh9AwOTA9KT82pniE8QVuwKoSe33GlRyX9/UoDK7wAAAAAA6dD0
|
||||
UlJ/UVGZ8ZtMfTvf0QMDAwMD5vUlKw8uvOwKoalbFBozyZJ/UsrKIwAAAAAAC+9SUlJ/UZKF+RrwO8+R
|
||||
ttGTMAPRPiQWRAI8PUoKCuy4RlEzMzPef8qwgAAAAAAAse9SUn/JUTMz8c7PlRwc7rbR0dHRqllHR8Eg
|
||||
QaEKCqGfPnm6mTMzSOqwbgAAAAAAbu/00H9/yXC6z92FOxzPzxzfst/wt6zBwcFrU60HLKEmS7O6tLTe
|
||||
3t5IbgAAAAAA6WT00FJ/yZkiz5eF5c7OzxwcHBwct2zBwcFrU1xcrVxBDGj+M7TeSEjq6QAAAAAAZLH0
|
||||
0FJ/sN4iz92Z5eUcOxzOzs7Ot68ODg5rmh6trVweX9azM7TnSEjq6QAAAAAA78pSUlJS1ZLlzxzdYM+o
|
||||
O87Ozs7Ot0kOog5fmh4eHh4eX6/IM5kYSEjq6QAAAAAAZGR09NB/cPhgzxwcqKioqKjOhYWF5VuioqKi
|
||||
X/b2BGwxX2Zo1N6KSOrq6QAAAAAAZGSAyurKcGnEYBwcz6g7qKgchYUil2iLKKKiY2NjeEZGHTYNyN5w
|
||||
SOrKIwAAAAAAZO/QPz/V1XDEYM8cHMTOHKioHCKbGkZmKCgoKGNj/XOS/nOKaUhI6up0ZAAAAAAAAO/j
|
||||
xQkqg13ExGBgHBzOHDvPzt3xm3MVKCgoKFRUgcu/f3+/SEjq6uqxZAAAAAAAAG4/P8Uq57nExMTEYMTO
|
||||
hYWFIiJAGnP7nJycnFRUq8uWf5KS6kjq6jUjAAAAAAAAACPHxz+UcBgYxMRgqKhghYWFIiKXl3OvnJyc
|
||||
nJxUVKbrf97qf+rQNTUjAAAAAAAAAAApx8eUxT86isRgYGDEHIUzIiIiIqWenJycnJzi4p5af5I19PRk
|
||||
NbEjAAAAAAAAAACACQkqxz/nijoYYGAchYWStJkimf5JCAgICAji4q+Nf+p/9PTv6W4AAAAAAAAAAAAA
|
||||
KQmUlMc/XRiKOhi5XZLJ3pnektUdCAgICAgICGGzNUiw0NDpdAAAAAAAAAAAAAAAIwmUKgnHxxgYxIqK
|
||||
ikh/f0i6yYNoCMbGxggIxoSzykjVg+Ox7wAAAAAAAAAAAAAAAG4qfgkJx7kYGMRgYBhd53Bpkr/IhMbG
|
||||
xsbGxsY0jXBdyjUjAAAAAAAAAAAAAAAAAAB005QJCQkYGMRgYLmZ3rBd1dWkL05OTk5OxsaPjtXVdOkA
|
||||
AAAAAAAAAAAAAAAAAAAAxX4qlJQqGBjEuefV6kg1f0hwOU5OTk5OTk57yIODsQAAAAAAAAAAAAAAAAAA
|
||||
AAAAAMcqKpSUihgY510/4zU1SPhze9fX19fXTk5vyINuAAAAAAAAAAAAAAAAAAAAAAAAAAApKirTiooY
|
||||
x8fF48o16rBdDa5v19fX19d1jm4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAbgkqKn7TCcfFxSnpsXR0xdU/
|
||||
jlXk2RkZjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALCSp+KgnHP8UpKXR0dMp04z/njo4NLQAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvH036UCZTHx8fjdHTj48qAAAAALQAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAALHFCZSUlAkJKbGA7wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD////n//8AAP///8f//wAA///4A///
|
||||
AAD//8AB//8AAP//AAA//wAA//wAAB//AAD/8AAAB/8AAP/gAAAD/wAA/8AAAAD/AAD/gAAAAH8AAP8A
|
||||
AAAAfwAA/gAAAAA/AAD8AAAAAB8AAPwAAAAAHwAA+AAAAAAPAAD4AAAAAAcAAPAAAAAABwAA8AAAAAAH
|
||||
AADwAAAAAAMAAOAAAAAAAwAA4AAAAAADAADgAAAAAAMAAOAAAAAAAwAA4AAAAAADAADgAAAAAAMAAOAA
|
||||
AAAAAwAA4AAAAAADAADgAAAAAAMAAOAAAAAAAwAA4AAAAAADAADwAAAAAAMAAPAAAAAABwAA8AAAAAAH
|
||||
AAD4AAAAAAcAAPgAAAAADwAA/AAAAAAfAAD8AAAAAB8AAP4AAAAAPwAA/wAAAAB/AAD/gAAAAP8AAP/A
|
||||
AAAB/wAA/+AAAAP/AAD/8AAAB/8AAP/8AAAH/wAA//8AAHf/AAD//+AB//8AAP///////wAA
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<generatePublisherEvidence enabled="false"/>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<generatePublisherEvidence enabled="false" />
|
||||
</runtime>
|
||||
</configuration>
|
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 772 B |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 339 B |