Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ActionResult test(LoginViewModel model)
- {
- string username = model.Email;
- string password = model.Password;
- client.ClientCredentials.UserName.UserName = "Ravi";
- client.ClientCredentials.UserName.Password = "asdas";
- string a=client.GetData(1);
- return View();
- }
- <?xml version="1.0"?>
- <!--
- For more information on how to configure your ASP.NET application, please visit
- http://go.microsoft.com/fwlink/?LinkId=301880
- -->
- <configuration>
- <configSections>
- <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
- <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
- </configSections>
- <connectionStrings/>
- <appSettings>
- <add key="webpages:Version" value="3.0.0.0"/>
- <add key="webpages:Enabled" value="false"/>
- <add key="ClientValidationEnabled" value="true"/>
- <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
- </appSettings>
- <system.web>
- <compilation debug="true"/>
- </system.web>
- <system.webServer>
- <modules>
- <remove name="FormsAuthentication"/>
- </modules>
- </system.webServer>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
- <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
- <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
- <entityFramework>
- <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
- <providers>
- <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
- </providers>
- </entityFramework>
- <system.codedom>
- <compilers>
- <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
- <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE="Web" /optionInfer+"/>
- </compilers>
- </system.codedom>
- <system.serviceModel>
- <behaviors>
- <serviceBehaviors>
- <behavior name="ServiceBehavior"/>
- </serviceBehaviors>
- </behaviors>
- <bindings>
- <basicHttpBinding>
- <binding name="BasicHttpBinding_IService1"/>
- </basicHttpBinding>
- </bindings>
- <client>
- <endpoint address="http://localhost:19009/Service1.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="LocServiceReference.IService1" name="BasicHttpBinding_IService1"/>
- </client>
- </system.serviceModel>
- </configuration>
- <?xml version="1.0"?>
- <configuration>
- <configSections>
- <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
- <!--<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />-->
- </configSections>
- <connectionStrings>
- <add name="MyLocalSQLServer" connectionString="Data Source=RAVI-PCSQL;Initial Catalog=aspnetdb;Integrated Security=True" />
- </connectionStrings>
- <appSettings>
- <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
- </appSettings>
- <system.web>
- <!--<membership defaultProvider="MySqlMembershipProvider" >
- <providers>
- <clear/>
- </providers>
- </membership>-->
- <membership defaultProvider="MySqlMembershipProvider" >
- <providers>
- <clear />
- <add
- name="MySqlMembershipProvider"
- type="System.Web.Security.SqlMembershipProvider"
- connectionStringName="MyLocalSQLServer"
- applicationName="wcf"
- enablePasswordRetrieval="false"
- enablePasswordReset="false"
- requiresQuestionAndAnswer="false"
- requiresUniqueEmail="false"
- minRequiredPasswordLength="1"
- minRequiredNonalphanumericCharacters="0"
- passwordFormat="Hashed" />
- </providers>
- </membership>
- <roleManager enabled="true" defaultProvider="MySqlRoleProvider" >
- <providers>
- <clear/>
- <add name="MySqlRoleProvider"
- connectionStringName="MyLocalSQLServer"
- applicationName="wcf"
- type="System.Web.Security.SqlRoleProvider" />
- </providers>
- </roleManager>
- <authentication mode="None" />
- <compilation debug="true" targetFramework="4.5.1" />
- <httpRuntime targetFramework="4.5.1" />
- </system.web>
- <system.serviceModel>
- <bindings>
- <wsHttpBinding>
- <binding name="MembershipBinding">
- <security mode="Message" >
- <message clientCredentialType="UserName" />
- </security>
- </binding>
- </wsHttpBinding>
- </bindings>
- <behaviors>
- <serviceBehaviors>
- <behavior name="ServiceBehavior">
- <serviceAuthorization principalPermissionMode="UseAspNetRoles"
- roleProviderName="MySqlRoleProvider" />
- <serviceCredentials>
- <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="SqlMembershipProvider" />
- </serviceCredentials>
- </behavior>
- </serviceBehaviors>
- </behaviors>
- <protocolMapping>
- <add binding="basicHttpsBinding" scheme="https" />
- </protocolMapping>
- <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
- </system.serviceModel>
- <system.webServer>
- <modules runAllManagedModulesForAllRequests="true"/>
- <!--
- To browse web app root directory during debugging, set the value below to true.
- Set to false before deployment to avoid disclosing web app folder information.
- -->
- <directoryBrowse enabled="true"/>
- </system.webServer>
- </configuration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement