P
pfurb
Hi.
We are developing a windows application that is deployed using
No-Touch-Deployment (with Full-trust).
I have implemented Axhost handling microsoft web browser control
SHDocvw.dll.
In order to make it work i have to start the application in
partmentState.STA. So I am creating a new thread in main(), explicitly
specifying STA, otherwise I can not get the Web browser control to
work.
In the application I also use a System.Windows.Forms.Timer. Everything
works fine when I run it in debug or release mode from my disk, but
when I deploy the application using NTD the Timer causes an error. But
the error does not occur until the application closes. If I remove the
timer, there is no problem.
I have had a lot of problems with ApartmentState.STA and
No-Touch-Deployment. In some circumstances Control.Invoke do not
marshal the thread correctly, which causes the application to get an
security exception. The stacktrace saying something about
InvokeMarshaled... Maybe the timer-problem is also caused by incorrect
Invoke Marshaling.
I hope to find a workaround for these problem, which I think is a bug
inside IEExe.exe. At least to get the Timer to work. There must be a
way to handle No-Touch-Deployment and ApartmentState.STA!!!
If someone could help me with this I would be very grateful.
We are developing a windows application that is deployed using
No-Touch-Deployment (with Full-trust).
I have implemented Axhost handling microsoft web browser control
SHDocvw.dll.
In order to make it work i have to start the application in
partmentState.STA. So I am creating a new thread in main(), explicitly
specifying STA, otherwise I can not get the Web browser control to
work.
In the application I also use a System.Windows.Forms.Timer. Everything
works fine when I run it in debug or release mode from my disk, but
when I deploy the application using NTD the Timer causes an error. But
the error does not occur until the application closes. If I remove the
timer, there is no problem.
I have had a lot of problems with ApartmentState.STA and
No-Touch-Deployment. In some circumstances Control.Invoke do not
marshal the thread correctly, which causes the application to get an
security exception. The stacktrace saying something about
InvokeMarshaled... Maybe the timer-problem is also caused by incorrect
Invoke Marshaling.
I hope to find a workaround for these problem, which I think is a bug
inside IEExe.exe. At least to get the Timer to work. There must be a
way to handle No-Touch-Deployment and ApartmentState.STA!!!
If someone could help me with this I would be very grateful.