在Web应用程序上使用Windows窗体 [英] use windows form on web application

查看:91
本文介绍了在Web应用程序上使用Windows窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个Windows应用程序,现在我想在Web应用程序中使用这个Windows应用程序。我很高兴,终于找到了以下解决方案。请看下面的链接。





在网络上使用Windows应用程序 [ ^ ]



但我现在卡在第11步:我试图运行RegEdit.exe并找到WindowsToWeb.dll但是我收不到结果,即使我可以在文件夹C:\ Windows \Assembly中看到,我已经在那里成功注册了WindowsToWeb.dll程序集。



可以帮助我解决这个问题。

Hi all,
I have a windows application, now i want to use this windows application in web application. i goggled lot and finally found the following solution. please see the below link.


Using Windows Application on web[^]

but I am now stuck at step 11: I attempted to run RegEdit.exe and Find the WindowsToWeb.dll but I receive no result even I can see in the folder C:\Windows\Assembly, I have the WindowsToWeb.dll assembly is successfully registered there.

can any one help me out on this.

推荐答案

我对这个问题有正确的认识吗?



你在第11步,所以你在ASPX页面中创建对象标签,你进入注册表寻找CLSID,对吗?



如果是这样,我相信你已经在第10步发生了一次事故,因为这一步将您想要的信息写入注册表。尝试在命令行上使用此命令重复步骤10> regasm[完整路径] \ WindowsToWeb.dll/ regfile:[完整路径] \ WindowsToWeb.reg



这将创建.reg文件而不是执行它。



现在您可以导航到WindowsToWeb.reg文件并在记事本中打开以查看CLSID 。



要执行此WindowsToWeb.reg,只需双击它,Windows将负责其余部分。



另外,在第9步,作者谈到要添加的AssemblyInfo.cs文件,

Do I have the correct understanding of the issue?

Your on step 11 so your creating the Object Tag within your ASPX page and you are going into the Registry looking for the CLSID, correct?

If so, I believe you''ve had a mishap on Step 10 because this step will write it information your looking for into the Registry. Try repeating Step 10 using this on the command line >regasm "[full path]\WindowsToWeb.dll" /regfile:"[full path]\WindowsToWeb.reg"

This will create the .reg file instead of executing it.

Now you can navigate to the WindowsToWeb.reg file and open in notepad to view the CLSID.

To execute this WindowsToWeb.reg, simply double click on it and Windows will take care of the rest.

Also, on Step 9 the author talks about the "AssemblyInfo.cs" file to add the,
引用:

[assembly:AssemblyKeyFile(c:\strongname.snk)] attribute

[assembly: AssemblyKeyFile("c:\strongname.snk")] attribute





在此文件中,您可以设置以下Assembly属性(从VS 2010 C#类库模板复制):



Within this file you can set the following Assembly attributes (copied from VS 2010 C# Class Library Template):

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components.  If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(true)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("281ba28c-387b-44ae-8197-2ae99dd71b82")]





启用ComVisible并为你的dll生成一个新的GUID。



我记得as_prabahar在发布后不久阅读在网上使用Windows应用程序,这是一个有趣的概念。我希望这有帮助。



Enable ComVisible and generate a new GUID for your dll.

I remember reading "Using Windows Application on web" by as_prabahar shortly after it was published, it was an interesting concept. I hope this helped.


这篇关于在Web应用程序上使用Windows窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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