OpenId DotnetOpenAuth Classic ASP Support - asp-classic

My website is in classic ASP. Want to implement openId relying party so using the DotNetOpenAuth.dll
Tried the asp.net WebForm and MVC sample. Both straight froward and works great.
After a bit of struggle i run the classic ASP Sample provided by DotNetOpenAuth.
With WebForms & MVC i tried test with google, google profiles, yahoo/flickr, wordpress, blogspot, myopenid, etc works well
When tried with classic asp Only google, profiles, yahoo/flickr works well. For others like myopenid, blogspot, & wordpess it says openid not found. but it work well with webforms & MVC.
My question is that, for calssic ASP Is there anything like it support only direct openid provider like yahoo/google or am i missing anything.
I am using the sample from dotnetopenauth. Nothing special.
Regards,
Pradeep.

There is some information in this thread that may be useful....
http://groups.google.com/group/dotnetopenid/browse_thread/thread/abcf1439d8b87c44/60b195b36b0207f4

Underneath it's the exact same engine powering OpenID for both classic ASP and ASP.NET. Aside from possible configuration differences, which I'm not aware of any. You may attach a managed debugger to the IIS process and download the DNOA source code matching your version to step through and find out what's going wrong.

Related

Using ASP.NET Forms Authentication and PostgreSQL

I have an ASP.NET C# WebForms application built using the following:
Mono
Apache
PostgreSql
NPGSQL
OS Linux
Because those platforms are used a custom user/role management system was written for the application login.
One of the features we need is to redirect a visitor if they try to access a page if they have not logged in to the application.
I have been researching the Forms Authentication
As expected almost everything I find is using the ASP.NET built-in tools that are prominently used in Windows environments. (Which is not necessarily the case I have in my application)
My question is can Forms Authentication be used in my scenario? Or is there another approach I could take to accomplish the same result.
PLEASE NOTE: Before marking this as a possible duplicate question notice my environment is not the normal ASP.NET stack.
Using [Sessions] is my solution.
This StackoverFlow question gives a really good explanation.

DotNetOpenAuth + classic ASP + oAuth

I am trying to get dotNetOpenAuth to work with facebook and twitter. There are some great examples provided but I am stuck using classic asp. I have the sample that uses classic asp and openID working fine.
Is it possible to use oAuth & dotNetOpenAuth & classic asp? If so, is there an example somewhere that I can reference?
thanks.
There is no built-in support for OAuth on Classic ASP in DotNetOpenAuth, although you can certainly add it yourself by simply writing a .NET COM server .dll that acts as the go-between between classic ASP and DotNetOpenAuth (which is how DotNetOpenAuth itself makes it work for OpenID).
You should realize that Facebook uses OAuth 2.0 while Twitter uses OAuth 1.0. OAuth 2.0 clients are very easy to write, even without a library at all, so you can probably get away without this work. But Twitter does require some serious code on the client (aka consumer) side so if you want that, you'll likely need to shim a .NET library such as DotNetOpenAuth to help you.

Using ASP on ASP.Net site

I have a client that currently has a shopping cart written in ASP that he wants to keep using. We are looking at upgrading the rest of the site to DotNetNuke which is based on ASP.Net.
Does anyone have any guidance on how to use asp pages in an asp.net application? IFrames? I did a little ASP just before dotnet came out, so I"m not that familiar with ASP.
You can combine them pretty easily, you will just need to have the asp have its own global.asa and session timing. As long as your authentication logic is simple, you can write it in both, or consume it as a service from the asp pages.
The main concerns are shared state amongst pages. IFrames are viable options, but hard to get to look natural.
I'm currently doing this in an application that is half converted, its 170 aspx pages, and 210 asp pages.
That said, the context switching of maintaining both parts, is painful. So try and get it rewritten, quickly. On MVC its fairly trivial to have the logic flow like asp.
You can mix the two, but I don't think you'll be able to do things like share state between them unless you cater for this with a third party provider. They'll behave more like two "seperate" sites.
One other thing worth mentioning is that if you are provisioning a new web server for the mix, and planning to pull in the old ASP code, is that ASP is not enabled default on the more recent versions of IIS.
You can't use ASP pages in an ASP.NET application.
You can have an ASP application and an ASP.NET application in the same web site, but they are still two different applications. They work side by side, basically unaware of each other.
You can have the pages communicating with each other, and even use iframes to seamingly mix them in the same page, but communication is not trivial as the web applications can't communicate directly. You can communicate between them on the client side, or through a common backend database (or any other indirect way that you can think of...).
You would be much better off using a single ASP.NET solution.
There is a DNN shopping cart module available from here. There is supposed to be a community edition. [I haven't used it, so can't say how good it is]
Most asp is going to valid as asp.net. You may be able to rename your .asp pages to .aspx and get 80-90% of the old code working under asp.net. Then fix anything that's broken and slowly migrate more and more of the old code to proper asp.net.

New to ASP.NET

I am wanting to learn ASP.Net and am just a beginner. I have done some windows c# forms development before but have no experience of web development.
I have looked at the ASP.net website but beyond this, does anyone have any ideas as to good learning resources particulary in relation to the differences to windows development. For instance, It seems that the way events work is quite different under ASP to windows forms.
Thanks you all.
Thank you very much. I will have a look at MVC. It looks even more complicated but if this is the way things are going then I would be better maybe to invest my learning in this.
I would advise you at this stage in ASP.NETs life to instead direct your attention at ASP.NET-MVC. This url http://www.asp.net/mvc/ is a very good resource for learning.
ASP.NET Forms do a good job of hiding the nature of a connection-less HTTP/browser based technology and presenting a familiar Form with controls and lots of useful events environment that Windows Forms developers are used to.
However this approach comes with a price. For any serious project there is no avoiding getting under the hood of ASP.NET forms and properly understanding the underlying technology. At this point you start to realise the significant compromises the ASP.NET Forms has had to make in order to make Windows Forms developers feel at home.
ASP.NET-MVC, on the other, makes no such compromises. Learning MVC means learning how HTTP works up-front. It also has the advantage of being a much more test friendly approach which when used properly will save you days of debugging.
ASP.NET website - seriously, it's a really good resource.
I'd seriously consider starting with ASP.NET MVC. You'll end up learning what you need from ASP.NET "classic" but you'll pick up all the goodness of MVC (testability, seperation of concerns in your code etc) instead of learning bad habits.
Google for "ASP.NET MVC", check out ScottGu's blog, Scott Hanselmans's blog, or search StackOverflow for ASP.NET MVC (use the ASP.NET MVC tag too).
One good place to start...
http://weblogs.asp.net/scottgu/archive/2009/04/01/asp-net-mvc-1-0.aspx
I know they are a bit out of date, but I still think the two Fritz Onion books give a great look at what's happening in ASP.NET under the hood.
Some resources:
asp.net (as you mentioned)
channel9
scott hanselman's blog (some useful entries)
Windows Client Homepage
W3Schools Tutorials (Useful for more than just .NET, but this is the .NET page)
I've been a .NET Windows Forms (not Web forms) developer for 1 and a half years. Then I switched jobs and started using WebForms for like... 2 years. Then I discovered ASP.NET MVC (January 2008) and since then although I still master ASP.NET WebForms I will always prefer ASP.NET MVC.
My recommendation also goes into ASP.NET MVC. You will have to learn HTTP, HTML and a bit of Javascript but after these you will master web development on ALL PLATFORMS.
A great alternative to ASP.NET MVC is ASP.NET Web Pages with Razor syntax. In fact, the latest release of ASP.NET MVC and the latest release of ASP.NET Web Pages both use the same view engine.
Here is a link to the complete ASP.NET Web Pages book:
Getting Started with WebMatrix and ASP.NET Web Pages
Also, here is the complete WebMatrix Content Guide:
WebMatrix Content Guide
Here's the description:
WebMatrix is a free, lightweight set of web development tools that provides the easiest way to build websites. It includes IIS Express (a development web server), ASP.NET (a web framework), and SQL Server Compact (an embedded database). It also includes a simple tool that streamlines website development and makes it easy to start websites from popular open source apps. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server.

OpenID authentication in ASP.NET?

I am starting to build a new web application that will require user accounts. Now that I have an OpenID that I am using for this site I thought it would be cool if I could use OpenID for authentication in my application. Are there any good tutorials on how to integrate OpenID with an ASP.NET site?
See Scott Hanselman's post on using DotNetOpenID in ASP.NET. Andrew Arnott's blog is full of samples on using DotNetOpenID with ASP.NET, including ASP.NET MVC.
I recently hooked up DotNetOpenID for the Subtext 2.0 release. It went really smoothly - the code samples included with the DotNetOpenID download are pretty helpful. The one thing I'd recommend is that you just use the library and avoid the ASP.NET control. It uses table based layout (hardcoded) and is pretty difficult to restyle.
DotNetOpenId available at http://code.google.com/p/dotnetopenid
Are there any good tutorials on how to integrate OpenId with an ASP.NET site?
Andrew Arnott's post titled "How to add OpenID to your ASP.NET web site (in C# or VB.NET)"
I'm considering the same thing. On the Open ID site, there's a link 'For Developers' # http://openid.net/developers/ and from there is a link to 'Open Libraries' # http://wiki.openid.net/Libraries and finally from there is one called 'DotNetOpenID' # http://dotnetopenid.googlecode.com/ which is probably what you're looking for.
Good luck.
DotNetNuke may not be a good current example. When we did the integration, DotNetOpenID was not currently supporting OpenID 2.0 spec. I hacked together a fork to get the 2.0 support and have not had a chance to rip it back out for the official DotNetOpenID 2.0 release.
You should check out the DotNetNuke codebase as well, they have been using OpenID for the last several revisions, and you'll find working code for implementing it there.

Resources