Use DotNet OpenID Together With Membership?
Sep 13, 2010I would like to know if is possible to use DotNet OpenID together with ASP.NET membership. Or other way or allow OpenId account in ASP.NET membership.
View 1 RepliesI would like to know if is possible to use DotNet OpenID together with ASP.NET membership. Or other way or allow OpenId account in ASP.NET membership.
View 1 RepliesI'm looking to implement a membership system using OpenID for my ASP.NET application, similar to the system used here on StackOverflow. I'm aware that the OpenAuth library is generally recognized as the way to go, but I'm having trouble figuring out how to implement it.
I use NHibernate to persist my domain objects. I have a Users table with a username column, email column, etc. I'm not sure how to integrate OpenID with my own users table, and I haven't found any good tutorials on this. Does anyone have any experience with this? What is the best way to go about doing it?
I'm using DotNetOpenAuth as my membership system, and the way I have it working now seems to be working quite well. What I'd like to do however is build into my website the ability to check user credentials against the AuthCookie rather than a session. In the membership provider, I can check for the username like this
string UserName = System.Web.HttpContext.Current.User.Identity.Name;
''# which returns the OpenId ClaimedIdentifier
What I'm wondering is if there is a way to extend this so that I can retrieve custom properties from the AuthCookie rather than having to create my own session object. Currently I have this setup.
UserSessionModal
Namespace Domain
Public Class UserSessionModel
Public Property ID As Integer
Public Property RegionID As Integer
Public Property Username As String
Public Property Slug As String
Public Sub New(ByVal user As User)
_ID = user.ID
_RegionID = user.RegionID
_Username = user.UserName
_Slug = Replace(user.UserName, " ", "-")
End Sub
End Class
End Namespace
BaseController (inherited by all controllers)
Protected Overrides Function CreateActionInvoker() As System.Web.Mvc.IActionInvoker
''# Create a UserInfo object for the logged in user
''# and store it in a session state.
If Session("UserInfo") Is Nothing AndAlso User.Identity.IsAuthenticated Then
Dim user As Domain.UserSessionModel = New Domain.UserSessionModel(OpenIdService.GetOpenId(HttpContext.User.Identity.Name).User)
Session("UserInfo") = user
End If
Return MyBase.CreateActionInvoker()
End Function
Then in my views I do something like this
<%
Dim user As MyApp.Core.Domain.UserSessionModel = DirectCast(Session("UserInfo"), MyApp.Core.Domain.UserSessionModel)
%>
<%: Html.ActionLink(user.UserName, "Details", "Users", New With {.id = user.ID, .slug = user.Slug}, Nothing)%>
What I really need to be able to do is remove the Session stuff all together and just simply check the AuthCookie for my custom properties ID, RegionID, Username, and Slug. I can already get the "ClaimedIdentifier" out of the AuthCookie using HttpContext.User.Identity.Name... I just need to be able to extend it.
I have two questions, could anybody please answer to those:1) Do I need to install Dotnet framework 2.0 if dotnet framework 3.5 is already installed on the same server?2) Also do I need to install "ASP.NET 2.0 AJAX Extensions 1.0" if higher version is installed on the same server?
View 8 RepliesI would like to create a site that authenticates using Google's OpenID. How would I do this? Also, how would I use roles with custom tables?
View 3 RepliesI am using layered architecture in dotnet (mostly I work on web projects). I am confuse what layers should I use ?
I have small idea that there should be the following layers.
user interface
customer types (custom entities)
business logic layer
data access layer
My purpose is sure quality of work and maximum re-usability of code.
some one suggested to add common types layer in it. Please guide me what should be layers ? and in each layer what part should go ?
can we make our own SSL or SSL macanism in SSL? Or please advice if there is any way that we can provide such security to web applicaiton without getting services from other companies ?
View 1 RepliesI am intend to create a web application and host it.But i want to develop something fresh in the internet world, buti feed the ideas are saturated for me though it is not.Any guys who have any idea can share with..[If u dont mind]Also refer me URL's that are already implemented with really good ideas.I tried but i was not creative enough to think something different :)
View 2 RepliesMultithreading in dotnet apps?
View 3 RepliesI need to create chat application in asp.net.But I don't need to store chat messages in database. Only I retrieve user list from database. I have to create group chat also. I have to show list users but online user's image in green color offline user image in red color for differentiating people.
View 7 RepliesWhen I run in visual studio I am able to connect to openid provider, But if I host app in IIS ,I am not able to connect to openid provider. (I am getting error at CreateRequest)
what settings has to be done in IIS so that I can connect to the Openid Provider. Below is the error I am getting
[InvalidOperationException: Sequence
contains no elements]
System.Linq.Enumerable.First(IEnumerable`1
source) +336
DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.CreateRequest(Identifier
userSuppliedIdentifier)
[ProtocolException: No OpenID endpoint
found.]
DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.CreateRequest(Identifier
userSuppliedIdentifier)
I'm wanting to save some OpenId fields to a localdatabase table, such as
-Full Name
-openid url
-passworg
how to get those attributes from openid server? send me some example code in asp.net, c#...
There are sample codes on the net for OpenId Client but none for OpenId Server. Do you know some? I know about dotnetopenAuth but there seem to be no tut on how to use as OpenId Provider. I don't even know if it can do that. Maybe it can just be used to create openid consumer app.
View 1 Repliesi have implemented the the openid in my page using dotnet open id when i get authenticated iam storing the details provided by openid provider in my database and creating a session of that username and redirecting the user to login protected page it is working fine but some time if i left the page idle for some time and then do any kind of postback then the session is lost and my page do not allows me to do any thing as it is login protected some time it is working fine without any problem. can you suggest me why is it so.
View 1 RepliesI need to know how we can add OpenID Authentication in asp.net. For example, in some web site we can login using gmail account or wordpress account or twitter account some other public sites. I want know how we can add that in our site too. Let me know the code for that or can you give me more details where I can get that information or sample code.
View 1 RepliesI am still reading on using dotnetopenauth and google openid. In the google docs they mention some parameters that need to be passed like:
"openid.ns", "openid.claimed_id", "openid.identity", "openid.ax.type.email" etc ...
Does DotNetOpenAuth send all those params on its own seamlessly?
string pdfpath = Server.MapPath("images");
string imagepath = Server.MapPath("Images");
using (Stream inputPdfStream = new FileStream(pdfpath + "\NLI_Filled_out.pdf", FileMode.Open, FileAccess.Read, FileShare.Read))
using (Stream inputImageStream = new FileStream(imagepath + "\sign2.gif", FileMode.Open, FileAccess.Read, FileShare.Read))
using (Stream outputPdfStream = new FileStream(pdfpath + "\NLI_Filled_output.pdf", FileMode.Create, FileAccess.Write, FileShare.None))
{
var reader = new PdfReader(inputPdfStream);
var stamper = new PdfStamper(reader, outputPdfStream);
var pdfContentByte = stamper.GetOverContent(3);
iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(inputImageStream);
image.ScalePercent(24f);
image.SetAbsolutePosition(100, 130);
pdfContentByte.AddImage(image);
stamper.Close();
}
I have the above code in 3.5 using linq..i want to convert it into dotnet 2.0..
create web application to connect to MySpace Offsite App and I want to authenticate I used the following code
var openid = new OpenIdRelyingParty();
IAuthenticationRequest request = openid.CreateRequest("http://www.myspace.com/thabet084");
[code]...
how i can add new admin tab in BlogEngine?and refer to sample page
View 2 Repliescan different versions of dotnet framework co-exist in a same machine ? will it have any impact while developing ? can we choose required framework within VS2005 IDE as and when needed?
View 7 RepliesFirstly, This question may be asked. But I could not get the information i am looking for.
I am creating a website which should take to [URL] where the user enters his account information and it redirect back to my website similar to how stack over flow is doing when we click on gmail image.
I am trying to implement a website in .net.
list a step by step procedure to implement it or suggest some documentation to follow.
I clearly dont want other types of openID implemention where u enter the open id and pick ur open id provider.
1. Can you explain me what is component based development ? What I am already doing is using layers (user interface, custom types, data access layer and busines logic layer). For example for filling a drop down list with countries what I do is getting data from DAL using custom types in my BLL and BLL return a list of countries to user interface. Now in my opinion it is a plug-able component that I can use anywhere. Should it be called a component ?
2. What is a component a method ? or class or a assambly ?
3. Can components be like that (methods and assemblies) or they are services to embed ?
4. Actually I never have used services, if component can be in both ways (services & classes and assemblies) than what approach is better, should component be made in form of assemblies or services ?
5. Without being so technical any general rules on making re-usable components ?
I had accidently moved a dll which sits in the BIN directory from my local machine to Production server. Later I realised that the same dll exists in the production server in it's GAC. Now I do not have ermissions to delete that dll from the bin directory on the production server. I am planning to use assemblybinding codebase and redirect attributes to make the application to search for the dll in the BIN directory instead of the in the GAC
I get the following error
The type 'myassembly' exists in both 'c:WINNTMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesdw82f12d83c45d61ceassemblydl3e45c2bc4�06e4169_8855cb01myassembly.DLL' and 'c:WINNTassemblyGAC_MSILmyassembly3.1.21.0__7780ffc6c71e90a4myassembly.dll
how I have use this assemblybinding attribute in Web.Config to point to the dll in the bin directory.
I am storing response from opeid provider using
NameValueCollection query = HttpContext.Current.Request.QueryString;
I am sending request for emailid as
"&openid.ax.type.email=" +
HttpUtility.UrlEncode("http://schema.openid.net/contact/email"))
but receiving emailid in openid.ext1.value.email in some case and openid.ax.value.email in others.
Coding Platform: ASP.NET 4.0 with C#
Building a website using ASP.NET membership(forms authentication) and options to link Open IDs to it. I would like to have Microsoft Live as an OpenID option in this website. Well I have not seen Login using Windows Live ID except at forums.asp.net, but then both are Microsoft websites.
Today, I stumbled upon a website that seems to be using Microsoft Live Connect or whatever. I tried searching for it but I couldn't get any documentation regarding an API for Live Connect.
Here's the URL: http://messengerconnectidentity.mslivelabs.com/