473,657 Members | 2,554 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combining ASP and ASP.NET projects together

Hi there

I have several bigger applications programmed with the old ASP (vbscript). A
lot of data is stored in the session object.

Now I have to extend the application with new functionality (-complete new
part). My idea is to develop the new part in ASP.NET (C#) and leave the old
parts in the ASP environment. With this way I can migrate the old code step
by step into C# and I don't need to migrate the whole project in one step (->
I also have to migrate all test cases as well. And there are a lot of test
cases).

Is it possible to share data in the session object? I think this is not
possible because there are different session managers for the asp and the
asp.net session. Or am I wrong?

Any help is welcome.

Regards
Roger
Dec 4 '06 #1
3 2360
"Roger" <Ro***@discussi ons.microsoft.c omwrote in message
news:30******** *************** ***********@mic rosoft.com...
Is it possible to share data in the session object? I think this is not
possible because there are different session managers for the asp and the
asp.net session. Or am I wrong?
You are wrong - all you have to do is use a database.
Any help is welcome.
There are hundreds of examples on the web - that's what Google is for:
http://www.google.co.uk/search?sourc...+Session+share
Dec 5 '06 #2
Right. You cannot share session objects because of different session
managers.

What I've done in similar situations is to have a "gateway page" between
both apps.

Something like this :

mypage.asp -ASPGateway.asp -ASPNETGateway.a spx -DestinationPage .aspx

1. mypage.asp has a link like:
ASPGateway.asp? destination=Des tinationPage.as p&optionalQuery StringElements= XXX

2. ASPGateway.asp adds all your session object Collection (works only on
simple datatypes) and dump them in to a HTML form, wich immediately posts
itself to ASPNETGateway.a spx

-- ASPGATEWAY.asp --
<HTML>
<BODY>
<FORM id="form1" action="ASPNETG ateway.aspx?<% = Request.querySt ring %>"
method="post">
<input type="hidden" name="SessionOb ject_Item1" value = "<%=
Session("item1" )%>">
<input type="hidden" name="SessionOb ject_item2" value = "<%=
Session("item2" )%>">
<input type="hidden" name="SessionOb ject_item3" value = "<%=
Session("item3" )%>">
<%
'include what is being sent in the request.Form
for each item in Request.Form
response.write "<input type=hidden name='" & item & "' value='" &
Request.Form(it em) & "'>"
Next
%>
</FORM>
<script language="JavaS cript" type="text/JavaScript">
form1.submit();
</script>
</BODY>
</HTML>
-- End of ASPGATEWAY.asp --

3. ASPNETGateway.a spx is an aspnet page. here you pick everything from the
ASPGATEWAY.asp post and put it on the aspnet session object (if its name
starts with "SessionObject_ " )

-- ASPNETGATEWAY.a spx ---
<HTML>
<BODY>
<FORM id="form1" method="post">
<%
for each item in Request.Form
if item.toString() .startsWith("Se ssionObject_") then
Session(item.to String().replac e("SessionObjec t_", ""),
request.Form(it em))
else
response.write "<input type=hidden name='" & item & "' value='" &
Request.Form(it em) & "'>"
end if
Next
%>
</FORM>
<script language="JavaS cript" type="text/JavaScript">
form1.action="< % = request.Queryst ring("destinati on") & "&" &
request.queryst ring("optionalQ uerystring")%>"
form1.__VIEWSTA TE.name='ignore ';
form1.__VIEWSTA TE.value='';
form1.submit();
</script>
</BODY>
</HTML>
-- ASPNETGATEWAY.a spx ---

That should help you pass session variables between asp and aspnet
applications. this would help also if you used forms authentication to
authenticate between apps.

(I'm doing this on my mind... there might be mistakes all over)

Hope it helps,

Armando Canez
Dec 5 '06 #3
Could there be a better way? ... well... it depends...

Your ASP app could be easyly converted using a tool, depending on the size
and complexity of it, but there's no assurance it wouldn't have problems
after conversion.

Depending on the design of the app, maybe the way to go is to keep the ASP
app and use .NET web services for new or unavailable functionality in ASP.

Another way is to keep developing it in 100% ASP. Maybe the time and money
needed to rewrite that particular app is not worth it (if the customer is
not going to pay for it). Remember COBOL :)

And a third would be to try and design the new ASPNET pages in a sessionless
environment, and pass the ASP session variables in form hidden inputs

I was in your particular spot once, and I decided to do a COMPLETE rewrite
of my ASP app. It took A LOT of time and money, but it was the right
decision FOR MY CASE.

Armando Canez
-------------------------
"Roger" <Ro***@discussi ons.microsoft.c omwrote ...
Could it be a better way to completly convert an asp application into an
asp.net application (with a converter if exists)? Did you have a lot of
problems after converting an asp application (-dynamic code like client
side java scripts or other "features") ??

Dec 6 '06 #4

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

Similar topics

2
6663
by: Mike Nau | last post by:
I've been trying to get a concrete answer to this for the last few days, but have come up short. I'm hoping someone here can help. Is there a way to take a set of c# modules (c# code compiled using csc with the /t:module option) and combine them into a single assembly using the assembly linker or any other tool. For example I have the following compiled c# modules: foo1.netmodule foo2.netmodule
5
1567
by: davidw | last post by:
I am using microsoft development enviroment 2003. I created a solution, and have some projects, I put the root dir as my IIS home, and each project has their own directory, so it is like c:\solution c:\solution\project1 c:\solution\project2 ....
16
2227
by: Robert W. | last post by:
I'm building a solution that has 1 component for the Desktop and 1 component for the Pocket PC. (Though this isn't a mobile question). I have a data library that will be shared on both platforms. So I've adopted the approach of having two projects share the same set of files. In my case, I have two similarly named projects: DataObjects DataObjectsCF The former is for the Desktop app and the latter is for the Compact Framework.
5
2417
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the web part page? Does it take place at the page level? ...or the content area level? 3. Where is the Web Part Manager instantiated? ...in the Master Page? ....Content Page? ...elsewhere?
7
1165
by: Joe | last post by:
Hello All: I have a solution with four projects (UI, Business, Database and Messaging). UI has references to Business and Messaging; Business has a refernce to Database; Messaging has a reference to Business. UI handles the presentation; Business provides Presentation with an abstract layer through which to retrieve data; Database handles database calls. Messaging handles calls to a third-party system; it is similar to Database. I...
2
1092
by: y1799 | last post by:
Hi, I have such problem: I created 1 solutions that contains 1 exe project and 1 dll one. I Added reference of dll project (not file, project) to exe project, set dependencies (exe depends of dll) and set solution Debug configuration. I hope it enoung for debuging 2 projects together.
1
1627
by: kkjensen | last post by:
Hi there, I've got a problem that I'm sure is simple to someone with more experience. I have three tables: clients, tools and projects. Two of the fields in projects are linked to clients and tools (each project has a client and a tool). I would like one field in the "projects" table to be a combination of some of the info from all three tables. For example: client: bob (in the "client" table) tool: 25 (in the "tools" table)
1
1360
by: Rowan | last post by:
Hi there, I recently posted an architecural question that I got quite a bit of help from and am now stuck again. I have two projects though I look at them as one with two presentation layers...a website and a windows app that will use the same DAL and BLL and I find I am unsure how to put them together. I developed my first version of the DAL and I developed an assembly Common for my constants and a basic BLL and part of the website...
3
1407
by: Koolioman | last post by:
I've made several programs, and I want to make another that links through a linked label to all of them. How do I do that? I've tried copying the entire project into a message box, but of course that didn't work.
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.