从经典ASP调用ASP.net [英] Calling ASP.net from Classic ASP

查看:112
本文介绍了从经典ASP调用ASP.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的ASP和ASP.net。

I am new to ASP and ASP.net.

我刚开始工作的一个传统的ASP经典的项目,被赋予了一个样本,使得在ASP.net远程调用。

I have just started working on a legacy ASP classic project and been given a sample that makes a remote call in ASP.net.

是否有可能从ASP调用ASP.net页面?

Is it possible to call the ASP.net page from ASP?

您他们兼容。

我的IM $ P $到目前为止pssion是,他们是不兼容的,但也许。我错了。

My impression so far is that they aren't compatible, but perhaps. I'm wrong.

我的意思是.NET项目可以通过参数来调用,并保持独立的我猜?

I mean the .net project could be called with parameters and kept seperate I guess?

有没有人有类似问题的经验还是有它们可以共享任何提示?

Does anyone have any experience with similar problems or have any tips they can share?

推荐答案

您可以创建一个asp.net DLL COM包装,例如,看到的这篇文章。

You can create a COM wrapper for an asp.net dll, for example, see this article.

如果你只是想有两个可以共享信息并排端应用程序,这可能是更容易。 Cookies是饼干 - 你可以通过它们之间的会话信息用一个cookie,只要这两个应用理解的格式(和他们在同一个域中运行)。在asp.net 会话数据可能不容易提供给传统的ASP(如对方的回答笔记),但什么也没有强迫你使用asp.net会话来跟踪用户。你可以随时创建自己的会话密钥,把他们在您选择的cookie的这两个应用程序知道,它们存储在数据库中,并根据您的需要使用它们。只要这两个应用可以访问同一个数据库,了解饼干的格式,没有任何问题。

If you just want to have two side-by-side applications that can share information, this is probably easier. Cookies are cookies - you can pass session info between them with a cookie as long as both apps understand the format (and they are running in the same domain). The asp.net Session data may not be easily available to traditional asp (as the other answer notes) but nothing's forcing you to use asp.net sessions to track your users. You can always just create your own session keys, put them in a cookie of your choosing that both applications know about, store them in a database, and use them as you need. As long as both apps have access to the same database and understand the format of the cookies, no problem.

旧的ASP应用程序可能已经在做这样的事情,只是同样的模式复制到asp.net应用程序。

The old asp application probably already does something like this, just copy the same model into the asp.net app.

这篇关于从经典ASP调用ASP.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆