Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > asp to asp.net conversion

Reply
Thread Tools

asp to asp.net conversion

 
 
John
Guest
Posts: n/a
 
      09-10-2006
Hi

I have a pure asp app which I need to integrate into an asp.net app in terms
of the asp.net membership/roles/login that asp.net app uses. I understand
there is no way for a pure asp app to share session etc. with asp.net i.e.
it can't work with asp.net membership/login. In which case is there a way to
convert asp app into some sort of psuedo asp.net app to make it work with
asp.net membership?

Thanks

Regards



 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      09-10-2006
re:
> I understand there is no way for a pure asp app to share session etc. with asp.net


There is...

See :
http://msdn.microsoft.com/asp.net/re...rttoaspnet.asp




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"John" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hi
>
> I have a pure asp app which I need to integrate into an asp.net app in terms of the asp.net
> membership/roles/login that asp.net app uses. I understand there is no way for a pure asp app to
> share session etc. with asp.net i.e. it can't work with asp.net membership/login. In which case is
> there a way to convert asp app into some sort of psuedo asp.net app to make it work with asp.net
> membership?
>
> Thanks
>
> Regards
>
>
>



 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      09-10-2006
Well no, not really. You either have ASP.NET code or you don't. You *can*
have both running in one application and simply persist your data in a
database, rather than using sessions. Both Classic ASP and ASP.NET can
access databases.


"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I have a pure asp app which I need to integrate into an asp.net app in
> terms of the asp.net membership/roles/login that asp.net app uses. I
> understand there is no way for a pure asp app to share session etc. with
> asp.net i.e. it can't work with asp.net membership/login. In which case is
> there a way to convert asp app into some sort of psuedo asp.net app to
> make it work with asp.net membership?
>
> Thanks
>
> Regards
>
>
>



 
Reply With Quote
 
Brennan Stehling
Guest
Posts: n/a
 
      09-11-2006
John,

Can you provide more detail on how you expect to use the membership and
roles features?

What you can do is mix classic ASP and ASP.NET pages for the same
website. From there you can provide an ASP.NET login screen and place
the ASP.NET 2.0 login control on it and configure web.config for how
the ASP.NET website will function, either Forms or Windows
authentication as well as what locations are protected.

>From that point you could use Javascript to send requests from the

classic pages to the ASP.NET sites to get access to the features which
you want protected by the membership and roles features. Depending on
what you need to do this could be easy or very tricky.

One technique which I have used is to pull a URL with an AJAX request
for a full ASPX page which has all of the content with comment markers
placed around the results, such as...

<!-- RESULTS START -->
... results go here ...
<!-- RESULTS END -->

For the AJAX reponse, you can parse the responseText with the indexOf
function. Here is some code to do that...

var startMarker = "<!-- RESULTS START -->";
var endMarker = "<!-- RESULTS END -->";
var startIndex = t.responseText.indexOf(startMarker) +
startMarker.length;
var endIndex = t.responseText.indexOf(endMarker);
var contentBlock = document.getElementById('content');

if (startIndex != -1) {
var contentResults = t.responseText.substring(startIndex,
endIndex);
contentBlock.innerHTML = contentResults;
}

You can then place whatever content the ASP.NET page generated into you
classic ASP page. The AJAX request will provide the membership
information with the same cookies as a normal request, so the
authentication token use for the ASP.NET membership will be available.

In your case I would also check for a status block because a user may
not be authenticated or their session may have expired or somehow
become invalid.

<!-- STATUS START -->
OK
<!-- STATUS END -->

And check that the page was returned OK, or with access denied based on
the role.

Over time you can phase in more and more of the ASP.NET content and
reduce the classic ASP pages. Just be sure to create these content
bits as User Controls so it is easy to wrap them in different pages
based on their use. That will give you a great deal of flexibility.

Brennan Stehling
http://brennan.offwhite.net/blog/

John wrote:
> Hi
>
> I have a pure asp app which I need to integrate into an asp.net app in terms
> of the asp.net membership/roles/login that asp.net app uses. I understand
> there is no way for a pure asp app to share session etc. with asp.net i.e.
> it can't work with asp.net membership/login. In which case is there a way to
> convert asp app into some sort of psuedo asp.net app to make it work with
> asp.net membership?
>
> Thanks
>
> Regards


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PSD to XHTML Conversion Services and PSD to HTML CSS ConversionServices, PSD to Joomla, Drupal, Wordpress Conversion xhtml champs Python 0 06-21-2011 11:59 AM
PSD to XHTML Conversion Services and PSD to HTML CSS ConversionServices, PSD to Joomla, Drupal, Wordpress Conversion PSD to XHTML Conversion Services and PSD to HTML CSS Conversion Services, PSD to Joomla, Drupal, Wor VHDL 0 04-25-2011 06:43 AM
conversion operator and conversion ctor subramanian100in@yahoo.com, India C++ 2 09-15-2009 12:46 PM
Conversion from ASP to ASP .NET steps Marcel Balcarek ASP .Net 1 07-26-2004 08:55 PM
ASP to ASP.NET conversion question Framework fan ASP .Net 2 04-11-2004 07:50 AM



Advertisments