I have a ASP.Net web application with around 100 forms. The coding is in VB.Net. We now want to add servicestack.net services inside this application. We want to do this so that session can be shared between the asp.net application and the web service and authentication can also be done via the web application. Please let me know if this is possible, if yes can one anyone point me to a sample application or provide me with the web.config and global asax file configuration that I should use for this.
Yup, servicestack supports asp.net web forms. You can try this nuget package . I don't really sure about session as service stack using something different mechanism for session. But yes you can share the session explained here in session section.
I hope this will help. Please let me know if any further details are needed.
Related
I have two applications, one in asp.net and the other in asp.net core. I want to share a common database, as well as the same login. Ie, a user can register via asp.net application, and then their identity will be shared with asp.net core application.
Is this possible? I notice that each have their own identity models, and I am looking for a way of sharing this, ie. some documentation to resolve this.
Looking for:
- Is this possible?
- Documentation and more information on implementation (how to)
I am resolving by use of Identity Server, which both applications will hook into. Will just take a bit of re-jigging.
I have been tasked to set up Single Signon for asp.net application (SAAS) using IIS server with a client who has ADFS3.0 for providing identity credentials. the users authenticated will be allowed to log in to the web application but i have been going through a lot of information as how to set up service provider files as the application is already running.
what settings and where do i need to configure them. any help will be greatly appreciated.
The "modern" way to do this is by using OWIN.
You will have to change your application as per Use the OWIN Security Components in ASP.NET to Implement Web Sign On with ADFS.
Then add your RP to ADFS and you are good to go.
For completeness. the "old" way to do this is to use WIF as in How To: Build Claims-Aware ASP.NET MVC Web Application Using WIF.
I am relatively new to asp.net so sorry if the question sounds silly.
I have to build an Asp.net web application able to login on a OpenId custom server (i.e. not included in the DotNetOpenAuth library). I am using vs2010 and .net framework 4.0.
After many searches I found these posts where it is explained.
http://blogs.msdn.com/b/webdev/archive/2012/08/23/plugging-custom-oauth-openid-providers.aspx
How to use OpenID providers with unique identifier URLs in ASP.NET MVC4
http://blogs.msdn.com/b/webdev/archive/2012/08/15/oauth-openid-support-for-webforms-mvc-and-webpages.aspx
All of them refer to MVC and to a directory/file called /App_Start/AuthConfig.cs where you have to register your new provider in order to be able to use the client that comes built-in with the library.
From other searching I have understood this directory is not available in Asp.net web application.
Does exist a way/workaround for achieving the same results in Asp.net web application?
Do you have any suggestion/link on how to implements such custom client in my server?
Thank you
stmod
thanks for your help.
After your comment I was back to the provider for asking clarification, but so far, they cannot help me more than providing that link.
So I tried to manage it working in Java and I did it using openid4java library and the following code:
URL u = new URL("https://logint2.idm.toon.sul.t-online.de/gcp-web/login/10000112/");
Identifier i = new MyIdentifier();
*//myIdentifier is my implementation of interface openid4java.discovery.Identifier and returns* "http://specs.openid.net/auth/2.0/identifier_select"
DiscoveryInformation discovered = new DiscoveryInformation(u,i);
AuthRequest authReq = manager.authenticate(discovered, returnToUrl);
With this code (and others for managing the response) I have it working.
I am trying now to apply the same to my dot.net solution.
Can you help me in writing the code for having the DotnethOpenauth working with this endpoint?
I think I have to override the Identifier class as I did in Java, but I am stuck.
Thanks stmod
Adding OpenID Relying Party support to your ASP.NET web application is actually quite easy, and does not require an AuthConfig.cs file. If you are using web forms, the easiest way to go is just drop an OpenIdLogin control onto your web form. If you are using MVC, it's just a few lines of code to write, and you can check out the OpenIdRelyingPartyMvc sample that is included in the dotnetopenauth .zip download from SourceForge to see how it can be done.
Iam new to asp.net and working on a web project. There are different users and each user has specific role.Like admin, visitor, registered user etc. The question is what method to use to implement security. Is there any standard way to implement both authentication and authorization. I am using SQL Server 2008. Please tell a standard method.
Thanks
Look into the following topics:
Asp.net roleprovider : http://msdn.microsoft.com/en-us/library/system.web.security.roleprovider.aspx
Asp.net memberschipprovider: http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx
Additional information: http://www.asp.net/security/tutorials/role-based-authorization-cs
You need to understand the basic principles before you proceed.
Start with ASP.NET Web Application Security
How ASP.NET Security Works
Guide to Claims–based Identity and Access Control
You can use a database, which is most definately the best way to go about it, this will be supported if you are running SQL server. This should help you build the database, and give you some insight into how to implement users and permissions.
http://publib.boulder.ibm.com/infocenter/wpdoc/v510/index.jsp?topic=/com.ibm.wp.ent.doc/wpf/setup_sql.html
Good luck!
Does anybody have a clue how I might embed an ASP.NET 3.5 app inside a Visual Basic 6 application?
My other option is to provide a hyperlink inside the VB6 application that will open the ASP.NET app.....BUT I would prefer to embed the ASP.NET app within a tab control in VB6 if at all possible.
thanks in advance
For the auto-login to the .net app (assuming it's ASP.net) I would have the vb6 application login process write a session GUID to the database, and use it as a get or post variable when building a link to the .net application.
On the ASP.NET side, modify your MembershipProvider to honor a guid and username as evidence of successful authentication to the vb6 app.
There may be some additional security precautions you should take depending on how guarded your environment needs to be.
Realistically, your best option is probably to use the Web Browser control on a new tab, and point that at your ASP.NET application.
For auto-login, you SHOULD be able to have users login once. You'll probably need to enable a "remember me" feature in your ASP.NET application.
It'd be a two part process.
Create a .NET library to host asp.net, http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp.
Then use interopt to launch the library. Sounds like a really bad idea though.
That sounds like a terrible idea.
I think you should give more background on the situation so alternatives can be suggested.
EDIT: You say the VB6 app cannot be rewritten... but can it be edited? Depending on the complexity of the functionality in the ASP.Net app you could alter the ASP.Net app to include a web service and access that functionality from the VB6 app.