Changeset 6927
- Timestamp:
- 10/13/11 21:05:21 (13 years ago)
- Location:
- branches/ClientUserManagement
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.GeoIP/1.12/HeuristicLab.GeoIP.csproj
r6826 r6927 49 49 <Compile Include="Country.cs" /> 50 50 <Compile Include="DatabaseInfo.cs" /> 51 <Compile Include="GeoIPLookupService.cs" /> 51 52 <Compile Include="Location.cs" /> 52 53 <Compile Include="LookupService.cs" /> … … 54 55 <Compile Include="Region.cs" /> 55 56 <Compile Include="RegionName.cs" /> 56 <None Include="GeoIP201109.dat" /> 57 <Compile Include="Settings.Designer.cs"> 58 <AutoGen>True</AutoGen> 59 <DesignTimeSharedInput>True</DesignTimeSharedInput> 60 <DependentUpon>Settings.settings</DependentUpon> 61 </Compile> 62 <None Include="app.config" /> 63 <None Include="GeoIP201109.dat"> 64 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 65 </None> 57 66 <None Include="Properties\AssemblyInfo.frame" /> 67 <None Include="Settings.settings"> 68 <Generator>SettingsSingleFileGenerator</Generator> 69 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 70 </None> 58 71 </ItemGroup> 59 72 <ItemGroup> -
branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs
r6858 r6927 24 24 using System.Linq; 25 25 using System.ServiceModel; 26 using System.ServiceModel.Channels; 26 27 using System.Web.Security; 28 using HeuristicLab.GeoIP; 27 29 using DA = HeuristicLab.Services.Access.DataAccess; 28 30 using DT = HeuristicLab.Services.Access.DataTransfer; … … 77 79 78 80 public Guid AddClient(DT.Client client) { 81 string country = string.Empty; 82 83 OperationContext opContext = OperationContext.Current; 84 85 if (opContext != null) { 86 MessageProperties properties = opContext.IncomingMessageProperties; 87 RemoteEndpointMessageProperty endpoint = properties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; 88 string ipAdr = endpoint.Address; 89 country = GeoIPLookupService.Instance.GetCountryName(ipAdr); 90 } 91 79 92 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { 80 93 DA.Client entity = Convert.ToEntity(client); 94 95 if (country != string.Empty) { 96 var query = from c in context.GetTable<DA.Country>() 97 where c.Name == country 98 select c; 99 100 if (query.Count() > 0) { 101 entity.CountryId = query.First().Id; 102 } 103 } 104 81 105 context.Resources.InsertOnSubmit(entity); 82 106 context.SubmitChanges(); -
branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/HeuristicLab.Services.Access-3.3.csproj
r6852 r6927 84 84 </ItemGroup> 85 85 <ItemGroup> 86 <ProjectReference Include="..\..\HeuristicLab.GeoIP\1.12\HeuristicLab.GeoIP.csproj"> 87 <Project>{BE9B0229-9150-49A4-AEA6-BB58E055992F}</Project> 88 <Name>HeuristicLab.GeoIP</Name> 89 </ProjectReference> 86 90 <ProjectReference Include="..\..\HeuristicLab.Services.Access.DataAccess\3.3\HeuristicLab.Services.Access.DataAccess-3.3.csproj"> 87 91 <Project>{0F652437-998A-4EAB-8BF1-444B5FE8CE97}</Project>
Note: See TracChangeset
for help on using the changeset viewer.