开发者

Calling ASP.net from Classic ASP

I a开发者_JS百科m new to ASP and 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.

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

Are you they compatible.

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

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?


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

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.

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


There's no easy way, the best I've seen is a "session transfer" similar to this, which at least allows you to keep a user logged in and transfer all the login variables between Classic and .Net. It can take a while to transfer though...

Bear in mind though, that ASP's idea of a session ID, and ASP.Net's are VERY different indeed...

http://www.eggheadcafe.com/articles/20021207.asp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜