473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1228
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**************@TK2MSFTNGP14.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**************@TK2MSFTNGP14.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.net> wrote in message
news:35**********************************@microsof t.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.com> wrote in message
news:OS**************@TK2MSFTNGP09.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**************@TK2MSFTNGP14.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
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...
8
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...
4
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...
1
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. ...
8
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...
44
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...
69
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
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.