Embedding Winform control in asp.net page

Posted on 2011-04-26
Medium Priority
Last Modified: 2012-05-11
Hi, has anyone managed to successfully embed a Winform control in a browser/asp.net page using .Net v4.0.  I have had this working for years in a .Net v1.1 app using the <object> element.  I am now trying to upgrade to .Net v4.0 but I can't get the winform control to display.  I appreciate that I should really be upgrading  the control to something like silverlight but there is a lot of code/functionality and as an interim solution I just want to host the winform control in the asp.net page as I did before.

To get it working in v1.1 I had to assign full trust to the local intranet zone (the web app is running in an intranet) using the .Net configuration wizard.  To test that my problem was a security issue I could disable code access security using 'caspol -s off' command.  Neither of these exist in .Net v4 so I am a bit stumped.

Any help would be appreciated.

Question by:nicksbell
  • 3

Expert Comment

ID: 35468781
Ots rolled out and different in 4.0.

For ur ref http://www.codeproject.com/KB/aspnet/ASP_NET4_0ClientIDFeature.aspx 

Author Comment

ID: 35468842
I am not sure how you reply helps me.  The linked article seems to be about ClientIDs on WebForms.  My issue relates to embedding WinForms in a web page.

Accepted Solution

nicksbell earned 0 total points
ID: 35475850
ok, after a lot more research it appears that this functionality is no longer supported in .Net Framework v4.  The best explanation I have found is in the following forum post:


It seems that if you need to be able to embed a winform in a browser then the latest .net version you can use is v3.5.

Author Closing Comment

ID: 35735821
I now have this working in .Net v3.5 which confirms the problem was v4 not allowing it.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question