我可以在CAB WinForms应用程序中托管ASP.NET应用程序吗?

时间:2022-10-09 07:30:55

I have a .NET 2.0 WinForms application that was developed using the Composite Application Block and Smart Client Software Factory.

我有一个使用Composite Application Block和Smart Client Software Factory开发的.NET 2.0 WinForms应用程序。

I'm considering the development of a module that would contain a browser control that would access the ASP.NET website using credentials established when the user logged into the WinForms client.

我正在考虑开发一个包含浏览器控件的模块,该控件将使用用户登录WinForms客户端时建立的凭据访问ASP.NET网站。

My goal is to use this strategy to transition all of the modules that are currently in the client to ASP.NET and retire the 'smart' client. Security for the WinForms client is currently implemented using the ASP.NET Membership functionality.

我的目标是使用此策略将当前位于客户端的所有模块转换为ASP.NET并退出“智能”客户端。目前,使用ASP.NET Membership功能实现了WinForms客户端的安全性。

Is this possible? Sensible?

这可能吗?明智?

2 个解决方案

#1


Yes, you can. Make a SmartPart that hosts the WebBrowser control, add some buttons for forward and backward navigation, and a url textbox; then point the WebBrowser control at your web application's URL.

是的你可以。创建一个承载WebBrowser控件的SmartPart,添加一些前进和后退导航按钮,以及一个url文本框;然后将WebBrowser控件指向Web应用程序的URL。

It is sensible. We used CAB/SCSF to create an application we called "The Integrated Desktop". This application serves as the platform for all internal apps for the company; everything is integrated into this one desktop application. We added a foundational module, basically a beefy version of what I described in the above paragraph, to facilitate web browsing since a few pre-existing apps were web-based and our users wanted access to those at the same place they were doing all their other work. One cool thing was the use of the WebBrowser's ObjectForScripting property that allowed for somewhat seamless integration between the desktop app and the web app being hosted inside.

这是明智的。我们使用CAB / SCSF创建了一个名为“The Integrated Desktop”的应用程序。该应用程序可作为公司所有内部应用程序的平台;一切都集成到这个桌面应用程序中。我们添加了一个基础模块,基本上是我在上一段中所描述的强大版本,以方便网页浏览,因为一些预先存在的应用程序是基于网络的,我们的用户希望访问那些他们正在做的所有他们其他工作。一个很酷的事情是使用WebBrowser的ObjectForScripting属性,允许桌面应用程序和托管在其中的Web应用程序之间的某种程度的无缝集成。

#2


What are your requirements?

你有什么要求?

You would choose a web app over a smart client mainly

您将主要通过智能客户端选择Web应用程序

  1. if you have to reach people that are not on the Windows platform or
  2. 如果您必须联系不在Windows平台上的人或

  3. you have a need for a zero-install app
  4. 您需要零安装应用程序

By having your app users having to access the web app via the smart client (browser-control) you would be missing (1) and (2). In my opinion it would defeat its purpose.

通过让您的应用用户通过智能客户端(浏览器控制)访问Web应用程序,您将丢失(1)和(2)。在我看来,它会破坏它的目的。

#1


Yes, you can. Make a SmartPart that hosts the WebBrowser control, add some buttons for forward and backward navigation, and a url textbox; then point the WebBrowser control at your web application's URL.

是的你可以。创建一个承载WebBrowser控件的SmartPart,添加一些前进和后退导航按钮,以及一个url文本框;然后将WebBrowser控件指向Web应用程序的URL。

It is sensible. We used CAB/SCSF to create an application we called "The Integrated Desktop". This application serves as the platform for all internal apps for the company; everything is integrated into this one desktop application. We added a foundational module, basically a beefy version of what I described in the above paragraph, to facilitate web browsing since a few pre-existing apps were web-based and our users wanted access to those at the same place they were doing all their other work. One cool thing was the use of the WebBrowser's ObjectForScripting property that allowed for somewhat seamless integration between the desktop app and the web app being hosted inside.

这是明智的。我们使用CAB / SCSF创建了一个名为“The Integrated Desktop”的应用程序。该应用程序可作为公司所有内部应用程序的平台;一切都集成到这个桌面应用程序中。我们添加了一个基础模块,基本上是我在上一段中所描述的强大版本,以方便网页浏览,因为一些预先存在的应用程序是基于网络的,我们的用户希望访问那些他们正在做的所有他们其他工作。一个很酷的事情是使用WebBrowser的ObjectForScripting属性,允许桌面应用程序和托管在其中的Web应用程序之间的某种程度的无缝集成。

#2


What are your requirements?

你有什么要求?

You would choose a web app over a smart client mainly

您将主要通过智能客户端选择Web应用程序

  1. if you have to reach people that are not on the Windows platform or
  2. 如果您必须联系不在Windows平台上的人或

  3. you have a need for a zero-install app
  4. 您需要零安装应用程序

By having your app users having to access the web app via the smart client (browser-control) you would be missing (1) and (2). In my opinion it would defeat its purpose.

通过让您的应用用户通过智能客户端(浏览器控制)访问Web应用程序,您将丢失(1)和(2)。在我看来,它会破坏它的目的。