473,785 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Forms In Internet Explorer

Hi folks,

I'm embedding a Windows Forms User Control into an aspx web page. I've
created the class library in C# and added the user control to it.

If the control just has simple Windows Forms Controls (like TextBoxes or
Buttons), it works fine. IE treats it wonderfully

If I do something a little more advanced though (like connecting to the
Outlook Object Model in code, or embedding the Web Browser Control...), then
it doesn't work. It will work while debugging through Visual Studio, but if
I open the site outside of Visual Studio, then it just gives me a blank box
where the control should be.

Is there anyway to overcome this? This is for a local intranet, so I can
have changes made to the local security policy of the client PCs if
neccessary. Right now though, I'm not sure what the solution is. Do You?

Thanks!
Nov 19 '05 #1
5 1264
Woops...Sorry take that back. The first few times I went to that site, that
is what I got, but then eventually it started displaying. I guess it was
still downloading or something.

Not sure how to overcome that either...but at least it's working for now.
"John Smith" <m@ty.com> wrote in message
news:e4******** ******@TK2MSFTN GP14.phx.gbl...
Hi folks,

I'm embedding a Windows Forms User Control into an aspx web page. I've
created the class library in C# and added the user control to it.

If the control just has simple Windows Forms Controls (like TextBoxes or
Buttons), it works fine. IE treats it wonderfully

If I do something a little more advanced though (like connecting to the
Outlook Object Model in code, or embedding the Web Browser Control...), then it doesn't work. It will work while debugging through Visual Studio, but if I open the site outside of Visual Studio, then it just gives me a blank box where the control should be.

Is there anyway to overcome this? This is for a local intranet, so I can
have changes made to the local security policy of the client PCs if
neccessary. Right now though, I'm not sure what the solution is. Do You?

Thanks!

Nov 19 '05 #2
There are a lot of security restrictions when using windows forms controls in
a webform. That is almost certainly your problem.

Here's more info:
http://www.aspnetpro.com/features/20...200509so_f.asp
http://www.15seconds.com/issue/030610.htm

--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net

"John Smith" wrote:
Hi folks,

I'm embedding a Windows Forms User Control into an aspx web page. I've
created the class library in C# and added the user control to it.

If the control just has simple Windows Forms Controls (like TextBoxes or
Buttons), it works fine. IE treats it wonderfully

If I do something a little more advanced though (like connecting to the
Outlook Object Model in code, or embedding the Web Browser Control...), then
it doesn't work. It will work while debugging through Visual Studio, but if
I open the site outside of Visual Studio, then it just gives me a blank box
where the control should be.

Is there anyway to overcome this? This is for a local intranet, so I can
have changes made to the local security policy of the client PCs if
neccessary. Right now though, I'm not sure what the solution is. Do You?

Thanks!

Nov 19 '05 #3
a couple issues:

1) .net code hosted by IE runs in a security sandbox. to access outlook (or
call unmanged code like a com object), the users must mark your assembly
trusted (see caspol.exe).

2) it takes a while for IE to spinup a windows forms user control, it must
load the .net vm, jit the control, etc . this can take up to minute or two
depending on the assembly.

3) the user must have .net framework installed

-- bruce (sqlwork.com)
"John Smith" <m@ty.com> wrote in message
news:e4******** ******@TK2MSFTN GP14.phx.gbl...
Hi folks,

I'm embedding a Windows Forms User Control into an aspx web page. I've
created the class library in C# and added the user control to it.

If the control just has simple Windows Forms Controls (like TextBoxes or
Buttons), it works fine. IE treats it wonderfully

If I do something a little more advanced though (like connecting to the
Outlook Object Model in code, or embedding the Web Browser Control...),
then
it doesn't work. It will work while debugging through Visual Studio, but
if
I open the site outside of Visual Studio, then it just gives me a blank
box
where the control should be.

Is there anyway to overcome this? This is for a local intranet, so I can
have changes made to the local security policy of the client PCs if
neccessary. Right now though, I'm not sure what the solution is. Do You?

Thanks!

Nov 19 '05 #4
Darn...The first link requires a subscription to get to it. Did it say
anything beneficial related to the security restrictions? The other link
just mentioned making the site a Trusted Site which I did.
"Steve C. Orr" <St***@Orr.ne t> wrote in message
news:35******** *************** ***********@mic rosoft.com...
There are a lot of security restrictions when using windows forms controls in a webform. That is almost certainly your problem.

Here's more info:
http://www.aspnetpro.com/features/20...200509so_f.asp
http://www.15seconds.com/issue/030610.htm

--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net

"John Smith" wrote:
Hi folks,

I'm embedding a Windows Forms User Control into an aspx web page. I've
created the class library in C# and added the user control to it.

If the control just has simple Windows Forms Controls (like TextBoxes or
Buttons), it works fine. IE treats it wonderfully

If I do something a little more advanced though (like connecting to the
Outlook Object Model in code, or embedding the Web Browser Control...), then it doesn't work. It will work while debugging through Visual Studio, but if I open the site outside of Visual Studio, then it just gives me a blank box where the control should be.

Is there anyway to overcome this? This is for a local intranet, so I can have changes made to the local security policy of the client PCs if
neccessary. Right now though, I'm not sure what the solution is. Do You?
Thanks!

Nov 19 '05 #5
Cool. Thx. I couldn't run the Outlook code without getting a security
exception error. I used caspol (actually mscorcfg.msc) and got it
working...at least I got working from the dev machine which also hosts the
site. Next test will be accomplishing this from the client machine, and
then deploying the security policy to all client machines.
"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:OS******** ******@TK2MSFTN GP09.phx.gbl...
a couple issues:

1) .net code hosted by IE runs in a security sandbox. to access outlook (or call unmanged code like a com object), the users must mark your assembly
trusted (see caspol.exe).

2) it takes a while for IE to spinup a windows forms user control, it must
load the .net vm, jit the control, etc . this can take up to minute or two
depending on the assembly.

3) the user must have .net framework installed

-- bruce (sqlwork.com)
"John Smith" <m@ty.com> wrote in message
news:e4******** ******@TK2MSFTN GP14.phx.gbl...
Hi folks,

I'm embedding a Windows Forms User Control into an aspx web page. I've
created the class library in C# and added the user control to it.

If the control just has simple Windows Forms Controls (like TextBoxes or
Buttons), it works fine. IE treats it wonderfully

If I do something a little more advanced though (like connecting to the
Outlook Object Model in code, or embedding the Web Browser Control...),
then
it doesn't work. It will work while debugging through Visual Studio, but if
I open the site outside of Visual Studio, then it just gives me a blank
box
where the control should be.

Is there anyway to overcome this? This is for a local intranet, so I can have changes made to the local security policy of the client PCs if
neccessary. Right now though, I'm not sure what the solution is. Do You?
Thanks!


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3709
by: Bob Everland | last post by:
I have an application that is ISAPI and the only way to secure it is through NT permissions. I need to have a way to login to windows authentication so that when I get to the ISAPI application no boxes come up. I want an ASP page to sit between the user and the ISAPI application. The rest of my application is using authentication that is database driven and wouldn't want the users to know the userid and password. Is this possible? If so...
8
5868
by: doug.h.taylor.accipitersoftware.com | last post by:
Hi, I need a general direction. I don't even know where to start researching how to do this. I have an existing dot net web application (It's mine, I wrote it) that has some text fields and a button. The code-behind click event of the button sends an SNPP conversation to a pager server. I also have an existing dot net windows service running on a dedicated
4
3929
by: Ahmet AKGUN | last post by:
Hi; I will have lots of (150+) windows forms designed using c#, and some cutsomers wants these forms' functionality also on web browser. What would you do if you were obliged to write applications using c# that are expected to run on both windows and internet browser ?
1
2201
by: Frank | last post by:
Hi all, I am using Forms authentication with login.aspx page as below to issue a ticket, then send the cookie to the client such that next request from the client should bring the credential. It works perfectly with Internet Explorer. But if I use Windows Explorer to access the web site, the cookie is missing upon the subsequent request. Does not Windows Explorer also use IE component to access the web site?
8
3091
by: IT | last post by:
I looked thru the 7+ chapters and Microsoft seems vague. Bascially telling you to design it so it makes sense. Duh. Say I have an app that handles processes for the claims, finance and membership departments. First MSDN says the project should be. C:\Projects\MYSystem\MYSolution\MYApp. What is MySystem exactly. Why can't I find a sample that shows me the
44
9457
by: Viken Karaguesian | last post by:
Hello all, On occasion I want to open hyperlinks (images, etc.) in a new window. In the past, I've used target="_blank" to open the link in a new window. However, using the "target" attribute causes my pages to fail validation (strict doctype). The validator says "There is no attribute 'target'.." So...how do I open a link in a new window, without Javscript, and pass strict validation?
69
4179
by: Peter Olcott | last post by:
Does JavaScript represent its controls internally as Microsoft Windows controls, or does it build them from scratch like Java?
8
6095
by: inpuarg | last post by:
I 'm developing a c# (.net 2.0) windows forms application and in this application i want to connect to a java servlet page (HTTPS) (which is servlet 2.4 and which may be using Web Based SSO Sun Java System Access Manager but i 'm not sure), handle session management, get token, send data using post and get methods etc. I listened http traffic using Fiddler and sending the same messages from my application but browser based navigation is...
0
30247
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is a comprehensive list of all autostart locations for Windows OSes: NOTE : These are some abbreviations used in this list. Please note them carefully: HKCU = HKEY_CURRENT_USER HKLM = HKEY_LOCAL_MACHINE
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.