473,486 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

asp to asp.net conversion

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

Sep 10 '06 #1
3 1412
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" <Jo**@nospam.infovis.co.ukwrote in message news:Ou**************@TK2MSFTNGP03.phx.gbl...
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

Sep 10 '06 #2
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" <Jo**@nospam.infovis.co.ukwrote in message
news:Ou**************@TK2MSFTNGP03.phx.gbl...
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

Sep 10 '06 #3
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
Sep 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5632
by: Stub | last post by:
Docs says that "The compiler does not use an explicit constructor to implement an implied conversion of types. It's purpose is reserved explicitly for construction." I put up code of three cases...
7
3244
by: Michael Lehn | last post by:
Hi, I have a question regarding the conversion of objects. When is the conversion done by the constructor and when by the operator. My feeling tells me that the constructor is preferred. But...
16
5097
by: TTroy | last post by:
Hello, I'm relatively new to C and have gone through more than 4 books on it. None mentioned anything about integral promotion, arithmetic conversion, value preserving and unsigned preserving. ...
31
6572
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
11
7588
by: Steve Gough | last post by:
Could anyone please help me to understand what is happening here? The commented line produces an error, which is what I expected given that there is no conversion defined from type double to type...
2
6856
by: Alex Sedow | last post by:
Why explicit conversion from SomeType* to IntPtr is not ambiguous (according to standart)? Example: // System.IntPtr class IntPtr { public static explicit System.IntPtr (int); public...
3
4430
by: Steve Richter | last post by:
here is a warning I am getting in a C++ .NET compile: c:\SrNet\jury\JuryTest.cpp(55) : warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied while...
0
2266
by: Lou Evart | last post by:
DOCUMENT CONVERSION SERVICES Softline International (SII) operates one of the industry's largest document and data conversion service bureaus. In the past year, SII converted over a million...
0
1839
by: dataentryoffshore | last post by:
Get a Discount up to 60% on data entry, data capture, dataentry services, large volume data processing and data conversion services through offshore facilities in India. Offshore data entry also...
21
2416
by: REH | last post by:
It it permissible to use the constructor style cast with primitives such as "unsigned long"? One of my compilers accepts this syntax, the other does not. The failing one chokes on the fact that the...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.