经典的ASP Intranet和新的ASP.NET应用程序 [英] Classic ASP Intranet and New ASP.NET Applications

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

问题描述

我们有一个现有的传统的ASP内部网,包含上百个页面。其目录结构看起来像这样...

We have an existing classic ASP intranet consisting of hundreds of pages. Its directory structure looks like this...

/root
    app_1
    app_2
    ...
    img
    js
    style

显然APP_1等方面有实际的目录结构更好的名字。

Obviously app_1 and so on have better names in the actual directory structure.

尽管许多应用程序有不同的行为,它们是同一个企业内部网的一部分,因此具有共同的外观和包括威盛/ JS / IMG和客户端脚本通过/风格样式表,图片感觉。

Even though the many applications have different behaviour, they are all part of the same intranet and therefore share a common look and feel by including stylesheets via /style, images via /img and client script via /js.

麻烦(至少对我来说)是当我想要添加在ASP.NET的Intranet应用程序。

The trouble (for me at least) comes when I want to add an intranet application in ASP.NET.

最后,我想这样的结构:

Ultimately, I'd like this structure:

/root
    app_1
    app_2
    dotnetapp_1
    dotnetapp_2
    ...
    img
    js
    style

在我看来,那ASP.NET应用程序喜欢把自己从周围的一切独立的(这可能只是他们是如何我COM prehension)。创建在Visual Studio中一个新的项目,它就像你有一个新的根实际的根我想用以下的水平。这就像这个新的应用程序是一个东西,独自站在那里,用自己的形象和风格和诸如此类的东西。不过,我希望它是现有的企业内部网的一个子部分。

It seems to me that ASP.NET "applications" like to think of themselves as separate from everything around them (this may just be my comprehension of how they are). You create a new "project" in Visual Studio and it's like you have a new "root" a level below the actual root I want to use. It's like this new application is a thing, standing alone, with its own images and style and whatnot. However, I want it to be a sub-part of the existing intranet.

最后,我希望能够让我的整个传统的ASP内部网的根,并有ASP.NET子应用程序,可仍然接入/风格/ IMG和,我想对于ASP.NET我会有/ masterpages。

Ultimately I want to be able to make my whole classic ASP intranet the "root" and have ASP.NET "sub-applications" that can still access /style and /img and, I guess for ASP.NET I'll have /masterpages.

我以前尝试过这一点,但我觉得VS哽咽了几百传统的ASP页面,它添加到项目时,我做了我已有的Intranet根目录下的ASP.NET项目的根(通过文件>打开 - >网站)。我很高兴我的编辑使用现有的VS 2008 SP1(我目前使用的优秀的记事本++ ),因为我想获得更多的手在VS,但我想这不是绝对必要的。

I've tried this before, but I think VS choked on the couple of hundred classic ASP pages that it added to the "project" when I made my existing intranet root directory the ASP.NET project root (via File->Open->Web Site). I'd be nice to edit my existing classic ASP intranet using VS 2008 SP1 (I currently use the excellent Notepad++) because I'd like to get more hands on with VS but I guess this isn't absolutely necessary.

我也试过对待每一个新的ASP.NET应用程序在自己的权利的应用,有效地使/ dotnetapp_1目录中的应用程序的根(再次,通过文件 - >打开 - >网站在VS2008)。然而,VS然后抱怨说,当我试图引用/ masterpages因为它属于另一个应用程序。我想我加入的每个ASP.NET目录指出到根/ masterpages内的虚拟目录kludged,但我不知道VS能够愉快地提供所见即所得的编辑我这样做的时候,而不是制作副本在每一个ASP.NET应用程序的母版的我加入到企业内部网。

I also tried treating each new ASP.NET application as an application in its own right, effectively making the /dotnetapp_1 directory the "root" of the application (again, via File->Open->Web Site in VS2008). However, VS then complained when I tried to reference /masterpages because it "belonged to another application." I think I kludged it by adding a virtual directory inside each ASP.NET directory that "pointed" to the root /masterpages but I'm not sure VS was able to happily provide WYSIWYG editing when I did this, as opposed to making a copy of the masterpage in every ASP.NET application I add to the intranet.

我也很可能会访问.NET MVC框架,所以请提供带记住,任何框架的答案。我希望工程不太重要与MVC和,而这只是一个创建,有助于整个应用程序的文件一束(即是内网)。

I'm also quite likely to visit the .NET MVC framework so please offer any answers with that framework in mind. I'm hoping "projects" aren't quite to important with MVC and that rather it's just a bunch of files that creates an application that contributes to the whole (that being the intranet).

所以,问题是:如何,我可以最好附加ASP.NET应用程序到现有的传统的ASP内部网(我不关心会话共享经典的ASP和ASP.NET之间的技术性问题,只有目录和项目的结构布局),并能够通过一个共同的,内网看看编辑在Visual Studio 2008 SP1这些单独的应用程序,但有这些应用程序相关的,彼此感觉*?


  • 请不要只是发布答案用MasterPages。我AP preciate MasterPages是在相同的应用程序相关页面之间共享样式(多可能).NET的方法。我明白了。我正在寻找的是将ASP.NET应用程序到现有的企业内部网的那样顺利的最好的方法,我可以使编辑每个应用程序简单,其中每个应用程序可以共享(如果可能)内联网常见的风格。

  • Please don't just post the answer "use MasterPages." I appreciate MasterPages are .NET's method of sharing styles (and more probably) between related pages in the same application. I get that. What I'm looking for is the best method of adding ASP.NET applications into the existing intranet as smoothly as I can that makes editing each application simple and where each application can share (if possible) an intranet-common style.

推荐答案

由于ASP.NET现在是微软标准的Web开发平台,您可能会更好开始一个全新的ASP.NET网站,导入现有的ASP页面和文件夹进去。一旦你的设置和运行,在ASP.NET中增加新的功能将是小菜一碟。

Since ASP.NET is now the Microsoft standard web development platform, you might be better off starting with a brand-new ASP.NET web site and importing your existing ASP pages and folders into it. Once you have that set up and running, adding new functionality in ASP.NET will be a snap.

微软了解,一些客户会被混合经典的ASP和ASP.NET一段时间,他们accomodated这种需要通过传统的ASP页面的ASP.NET站点内工作。你现在要做的是这种逆向(ASP.NET得到内ASP工作,八九不离十),而你已经运行陷入困境。

Microsoft understood that some customers would be mixing classic ASP and ASP.NET for awhile, and they accomodated this need by making classic ASP pages work within an ASP.NET site. What you're trying to do is the reverse of this (get ASP.NET to work within ASP, sorta), and you're already running into difficulties.

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

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