Security :: Login Contols And A Web Service - Web Service To Do The Membership Authentication And Authorization?

Jan 23, 2010

I am writing two ASP.NET apps. One is a web service that provides xml data and the other is a web client that will use the service to display and manipulate data. I would like for the web service to do the membership authentication and authorization. Is there any way to simply point the login controls in my client application to the web service instead of to a database. I assume I would have to provide the necesarry methods in my web service interface, which would then use the membership provider database I created and pass the results back through to the client.

Is this possible? I have seen many articles on security provisioin from a web service but none has really been what I am looking for. I was hoping that, since my service and my client are both written in ASP.NET, there might be some built functionality that would benefit me.

View 8 Replies


Similar Messages:

Security :: Get The Website To Authorization Via The WCF Service And Membership - Roles And Profile

Jan 16, 2010

I have a client asp.net website that uses ASP.Net Membership, Roles and Profile providers and Login controls. I need to expand the application so was going to use WCF Workflows, the ASP.Net website will be hosted on a different server than the WCF Services so what I want to do is get the ASP.Net Website to auth via the WCF Service. So process will go:

ASP.Net Website ------------------> WCF Service ------------------> SQL Database (Membership, Roles, Profile, Workflow Persistence Data and Business Data)

I tried creating a custom Membership and Role providers but I have had problems managing the users (Membershipuser class) saying null when a vaild user has been return by the WCF Service as can access the properies but not the methods.

View 5 Replies

Security :: Login Form Rejecting Valid Login With Forms Based Security And Membership Service

Jan 21, 2010

I've set up a system with forms based authentication and using the asp:Login control. When I put in an invalid password I get the approriate invalid password message. However when I put in a valid password, it does nothing...just returns to the login page again. I'm triple checked the login info. There is no error message, and the invalid attempts counter doesn't increment. When I put a break point in the Login_LoggedIn event of the Login form, it hits it, but User.Identity.IsAuthenticated is false. I'm not 100% sure it should be true at this point, as I'm pretty new to .NET but it seems kind of odd.

My user database is stored in a sqlserver 2005 db that already existed. I've added a new connection for it.In the authorization I have

<authorization>deny
users="?"/><authorization>

View 2 Replies

Security :: Membership Provider (Authentication Service): From A *.htm File Calling The AuthenticationService?

May 4, 2010

I'm developing a web application using EF4, POCO's, WCF Data Services and the presentation tier (HTML, CSS, JavaScript, Ajax - NO WebForms). For security I would like using ASP.NET Membership Provider (Authentication Service): from a *.htm file calling the AuthenticationService. I executed aspnet_regsql.exe (to create the necessary database tables) and modified my web.config file:

<configuration>
<system.web>
<roleManager enabled="true" />

[code]...

View 1 Replies

Membership / Authorization Over A REST Service?

Mar 23, 2011

I'm investigating creating a WCF REST service for an existing asp.net application to be consumed by various clients including Windows Phone 7, Android, iPhone apps etc.Creating a simple WCF REST service and consuming it from the above platforms is not a problem and works really well. What I am struggling to get my head around is authorization.The asp.net application uses the Membership provider to provide authentication and authorization and I'm comfortable in using that API from the REST service.

How do I secure my REST service so that the first call has to be to authenticate (passing the username and password) and following calls know who is 'logged in'. I'm guessing the authenticate method will have to pass back some sort of token to be used in subsequent calls identifying the caller. Is this secure enough as the whole site / service is over SSL?

View 2 Replies

Security :: Migrating Classic ASP Authentication & Authorization To Membership

Apr 28, 2010

I have an old website running fine in Classic ASP with large customer base registered onto the site. The current site allows users to have their own user name(unique) registered against an ID assigned to them. They can change the User name later as well provided it is still Unique in the database(Database is SQLServer2005).

The Problem: Now i want to move the website to .NET and want to use the .NET Membership. I know how to create the database structure in SQL Server through aspnet_regsql script but my problem is how should i import the existing username and passwords as the password stored in MembershipDB is Hashed (salt). Also i might want to allow admins to impersonate as users later.

View 5 Replies

Membership Provider Authentication Not Working Authenticating WCF Service

Oct 27, 2010

I have a SqlMembershipProvider store with Roles enabled. This is configured and has the user "devtest" in the roles "xxUser" and "xxAdmin".

I also have a WCF service, which I want to authenticate and authorize against. My problem is that:

the authorisation is not happening, code just executes despite the policy attribute I don't get any identity or security context so do not know who is calling the service I need: to know which user is calling the
method some degree of rejecting users if permissions don't match (ideally this should be performed
within the RoleProvider/MembershipProvider/WCF but can do it myself if I have to) SSL in transport

I have my service contract set up thus:

[ServiceContract]
public interface ISupportService
{
[OperationContract]
[PrincipalPermission(SecurityAction.Demand, Role = "ThisRoleDoesNotExist")]
List<BaseInterestRate> GetAllBaseInterestRates();
}
the code is simple enough:
public class SupportService : ISupportService
{
public List<BaseInterestRate> GetAllBaseInterestRates()
{
OperationContext operationContext = OperationContext.Current;
ServiceSecurityContext serviceSecurityContext = ServiceSecurityContext.Current; // is always null
using (xxxEntities entities = new xxxEntities())
{
return new List<BaseInterestRate>(entities.BaseInterestRates);
}
}}
My service configuration is thus:
-->
<behaviors>
<serviceBehaviors>
<behavior name="SupportServiceBehavior">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
membershipProviderName="SqlMembershipProvider" />
</serviceCredentials>
</behavior>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

Having already configured the MembershipProvider:

<membership defaultProvider="SqlMembershipProvider" >
<providers>
<clear/>
<add name="SqlMembershipProvider"
connectionStringName="SqlMembershipProvider"
applicationName="xxx"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
<roleManager enabled="true">
<providers>
<clear />
<add connectionStringName="SqlMembershipProvider" applicationName="xxx"
name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
<add applicationName="xxx" name="AspNetWindowsTokenRoleProvider
type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>

I have followed the instructions at these pages to the letter:

How to: Use the SQL Server Role Provider with Windows Authentication in WCF Calling from Windows Forms (MSDN)
How to: Create and Install Temporary Client Certificates in WCF During Development (MSDN)
How to: Use wsHttpBinding with Username Authentication and TransportWithMessageCredentials in WCF Calling from Windows Forms (MSDN)
Also quite useful found via SO: Use Asp.Net Membership provider with a WCF .svc service (Alkampfer's Place)

I would at lest expect an issue with certificates/transport/etc. to fail with exceptions, but I can debug right in and over the WCF call. I have no security context/ user context available to me and when I use a user not in the two mentioned roles (which I do in the code example above), I don't get "kicked out".

My client app is currently a Web App, but will ultimately also serve a Windows Forms app and Test suite. I'm currently using the ASP.NET WebDev server and am running .NET 4.0.

Am I missing something?

View 1 Replies

C# - Authentication ASP.Net Service Loses Login?

Apr 8, 2010

I have been making use of the WCF Authentication Service in ASP.Net but I have found that whenever you navigate all session, user, login data is lost.I have tested using the Standard ASP.Net Login page and mechanism and everything works fine.Why is nothing persisting from one page to another?

View 1 Replies

C# - Login And Authentication System In A Service (wcf) Based Application

Sep 22, 2010

i want to design a authentication system for a service oriented application.i have a wcf service based asp.net application.

View 1 Replies

Security :: .NET Membership Within A Windows Service App?

Jan 5, 2011

I have a web application that uses a SQL database which contains all the standard asp membership tables.Within my Web application I use the standard asp.net membersip logic for adding new users, roles, etc...The point here is I dont use any custom providers for anything.Now on that same machine that is hosting my web application I am writing a Windows service in c# .net.As part of one of the method calls to the windows service application I was curious if I would be able to use any type of membership classes that would connect to my existing database and perform the same functionality as does the ASP.NET membership classes.

View 1 Replies

Security :: Using Membership Services Through Web Service?

Sep 13, 2010

Is there any way to use Asp.net's membership services through a web service? My boss, for some reason, wants this...

View 1 Replies

Security :: Can Use The Membership Provider Api On A Hosted Service

Oct 16, 2010

Can I use the membership provider api on a hosted service? I can create mssql databases but have no control over iis. Will I be able to use the membership admin webpage on the hosted service?

Am I correct in stating that the api uses ASPNETDB.MDF in the app_data folder as it's database?

View 2 Replies

Security :: How To Create A Customized Login Control And Calls For Membership Authentication

Mar 18, 2010

I just like to know how can i create my own authentication(calling the ASP .net membership, role) page with the same function as the LOGIN Control. Your wondering, why not use the Login control instead. I have my own design and i don't know how to pattern my design to the built in Login Control. I tried editing the login template, but it's pretty hard to pattern it to my design.

This is my design

Basically what would like to know how the Login Control calls for the authentication, and when authenticated, it will pass the user(full name) to my LoginView Control without any coding. Or is it possible that I remove default login button in the LOGIN Control then create my own button and trigger the authentication or validation? But if you have other suggestion that can follow my design and call the authentication, i would be happy to know.

View 3 Replies

Security :: Webservice Security And Windows Authentication - Invoke SSIS Packages From Web Service

Dec 15, 2010

I have to invoke SSIS packages from web service in the most secure way. I think that windows authentication will be secure but i am not sure. I do not have much knowledge about how to achieve this and the information on the internet is very distributed.

View 1 Replies

How To Set WCF Security When Calling WCF From A Web Applicaion That Shares Same Membership With WCF Service

Dec 12, 2010

I have an ASP.NET web application and a WCF Application that share the same ASP.NET membership database.

They are both sharing the same ASP.NET membership database.

It is basically like:

WCF: is [URL]
ASP.NET: is [URL]

(both are two virtual folders in the same web application and both are using the same ASP.NET membership database).

The user logs on to the ASP.NET application and can then decide to call the WCF service.

What are my options for setting the security for the call between the ASP.NET and the WCF service that make the call using the credentials supplied by the user when logging to the ASP.NET application?

View 2 Replies

Security :: Custom Authentication With WCF Service?

Aug 11, 2010

I have created a WCF service that will serve as authentication service for Silverlight client.The problem is that when I make a call to FormsAuthentication.SetAuthCookie in the Login method below, I get a null reference exception. I am following the 'Securing Applications Built on Silverlight and WCF' (http://www.componentart.com/community/blogs/milos/archive/2009/05/07/securing-applications-built-on-silverlight-and-wcf.aspx)

[Code]....

View 1 Replies

Security :: Form Authentication In A Web Service?

Dec 4, 2010

I want to create a web service that can authenticate user from my application. I will be sending user name and password from my app to the web service and that will deny or accept the user. I want to use form authentication using sql server. that this web service can be used by other team in my office so that they can just call the web service and the user will be authenticated.

Also, is it possible to use both form and windows authentication in my web service and authenticate the user both ways.

View 3 Replies

Security :: Authentication When Web Service Is Being Request?

Feb 10, 2010

I am using .NET roles and membership model to manage user accounts in my system back-end.

If the request is come from within my web-app, I can authenticate through form.

But if the user is requesting from else where, maybe their own apps, how to I do authentication?

attach username and password (GET/POST) and then secure the line by SSL? is that what I should do?

View 3 Replies

Security :: How To Delete The Forms Users Of The Membership Service From Database

Apr 21, 2010

I had created a Membership ASP.NET 3.5 website and selected the Forms authentication. Therefore, I created several users with related information into the ASPNETDB database. Yesterday, I changed the website security to Windows authentication.

This morning, when reviewing the ASPNETDB data for another website, I still can see those Membership Forms users and their ApplicationIDs in the aspnet_Users and aspnet_membership tables. How can I delete those Forms users?

Another question: In aspnet_Applications table, I can see the ApplicationName (e.g. /WebPartsDemo) for the Web Parts websites. I have 2 ApplicationIDs in the aspnet_Membership table. I can not see only one ApplicationID in the aspnet_Applications table, but with an empty ApplicationName, i.e. / only.

Do I miss something when creating the Membership website? What is the ApplicationName for the Membership website?

View 2 Replies

Security :: Access Membership And Profile Objects From Windows Service?

Feb 19, 2010

I want to access membership and profile objects and wants to access profile properties that I have defined in my web app web.config file, from a windows service. Anyone have any idea on how to do this?

View 3 Replies

Security :: LDAP Authentication Using Service Account?

Aug 14, 2010

I am looking for a code which does authentication using service account username and password. I mean username and password which has permission to access the active directory and then authenticate the actual username and password provided by end-user. Googled everywhere but could not find any suitable code.

View 1 Replies

Security :: Accessing .NET WCF Authentication Service In Winforms Application?

Jul 30, 2010

I'm trying to use ASP.NET WCF Authentication Service from a Winforms Application.

I am referring to this article as a tutorial.

for silverlight clients, the WCF Auth service works well.

but for Winforms Apps,

[Code]....the AuthenticationServiceClient.IsLoggedIn() always returns false even after login.

what is the cause of this and is there another approach I should take when I leverage ASP.NET authentication from Winforms?

View 1 Replies

Security :: Authenticate User Using The Central Authentication Service?

Mar 25, 2010

how to authenticate a user using the central authentication service?

I created a login page to enter the user name etc. I have the server for the authentication.

View 1 Replies

Security :: Login User Into Windows From The Service

Nov 22, 2010

Is it possible to remotly login into Windows using ASP? What I'm trying to accomplish is, that I could remotly call a ASP page on my server (Apache on Win Vista) that logs in a user on that system. For example remotly I start a Wake-On-Lan to start the computer (server). It boots up to the user login screen where I would have to enter my password to login to the desktop. Because the service is already running at that time, I would like to open a ASP page from my client that I could pass the windows user/password and the ASP-service would login the user on the server machine.

View 1 Replies

Security :: Digest Authentication In Web Service Error / The Request Failed With HTTP Status 401

Apr 20, 2010

I am connecting to remote server for web service using ASP.NET 3.5 web site. something like, [URL]. Remote server is providing digest authentication to access the web service. I dont have access to modify authentication on the remote server but I have an windows account on that server. If I try to Access service WSDL through programming I get the following error:

The request failed with HTTP status 401: Unauthorized. Same web service if I try to access through browser, [URL], it asks for user name and password. Entered windows account user name and password, still getting error: You are not authorized to view this page, HTTP Error 401.1 - Unauthorized. How to pass the digest authentication credentials to the web service through visual studio or any other programmatic method?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved